@clickview/lite 0.72.0 → 0.72.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.
Files changed (25) hide show
  1. package/dist/bundles.json +1 -1
  2. package/dist/scripts/1109-4f5b0dab9b-lite.chunk.js +2 -0
  3. package/dist/scripts/1109-4f5b0dab9b-lite.chunk.js.map +1 -0
  4. package/dist/scripts/1667-fcdff22585-lite.chunk.js +3 -0
  5. package/dist/scripts/1667-fcdff22585-lite.chunk.js.map +1 -0
  6. package/dist/scripts/{3596-d760a67a58-lite.chunk.js → 3596-89a39d3781-lite.chunk.js} +3 -3
  7. package/dist/scripts/{3596-d760a67a58-lite.chunk.js.map → 3596-89a39d3781-lite.chunk.js.map} +1 -1
  8. package/dist/scripts/3816-ca44792dca-lite.chunk.js +2 -0
  9. package/dist/scripts/3816-ca44792dca-lite.chunk.js.map +1 -0
  10. package/dist/scripts/7601-c1b07b72c6-lite.chunk.js +2 -0
  11. package/dist/scripts/7601-c1b07b72c6-lite.chunk.js.map +1 -0
  12. package/dist/scripts/{bundle-6e723fdeb1.min.js → bundle-23f3b64e36.min.js} +3 -3
  13. package/dist/scripts/{bundle-6e723fdeb1.min.js.map → bundle-23f3b64e36.min.js.map} +1 -1
  14. package/package.json +1 -1
  15. package/dist/scripts/1109-98508a03fe-lite.chunk.js +0 -2
  16. package/dist/scripts/1109-98508a03fe-lite.chunk.js.map +0 -1
  17. package/dist/scripts/1667-ac162f04d0-lite.chunk.js +0 -3
  18. package/dist/scripts/1667-ac162f04d0-lite.chunk.js.map +0 -1
  19. package/dist/scripts/3816-abed23a1ce-lite.chunk.js +0 -2
  20. package/dist/scripts/3816-abed23a1ce-lite.chunk.js.map +0 -1
  21. package/dist/scripts/7601-b439c82e82-lite.chunk.js +0 -2
  22. package/dist/scripts/7601-b439c82e82-lite.chunk.js.map +0 -1
  23. /package/dist/scripts/{1667-ac162f04d0-lite.chunk.js.LICENSE.txt → 1667-fcdff22585-lite.chunk.js.LICENSE.txt} +0 -0
  24. /package/dist/scripts/{3596-d760a67a58-lite.chunk.js.LICENSE.txt → 3596-89a39d3781-lite.chunk.js.LICENSE.txt} +0 -0
  25. /package/dist/scripts/{bundle-6e723fdeb1.min.js.LICENSE.txt → bundle-23f3b64e36.min.js.LICENSE.txt} +0 -0
@@ -0,0 +1,3 @@
1
+ /*! For license information please see 1667-fcdff22585-lite.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[1667],{86974:(t,e,r)=>{r.d(e,{w:()=>a});var n=r(32735);function o(){return n.createElement("svg",{viewBox:"0 0 24 24"},n.createElement("path",{d:"M11.959 10.641l4.402-4.296a.964.964 0 0 1 1.358 0 .951.951 0 0 1 0 1.35l-4.403 4.297 4.403 4.378a.951.951 0 0 1 0 1.35.964.964 0 0 1-1.358 0l-4.402-4.378-4.32 4.378a.964.964 0 0 1-1.358 0 .951.951 0 0 1 0-1.35l4.32-4.378-4.32-4.362a.951.951 0 0 1 0-1.35.964.964 0 0 1 1.358 0l4.32 4.361z"}))}var a=n.forwardRef((function(t,e){var r=t.onClickClear,a=t.showClearButton,i=t.clearClassName,c=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(t,["onClickClear","showClearButton","clearClassName"]);return n.createElement("div",{className:"position-relative"},n.createElement("input",Object.assign({},c,{ref:e,className:"".concat(t.className," ").concat("aYpO7")})),(!!t.value||a)&&n.createElement("span",{className:"".concat("ygMgF"," position-absolute cursor-pointer text-secondary ").concat(i||""),role:"button",onClick:r,onKeyDown:function(t){return"Enter"===t.key&&r()},tabIndex:0},n.createElement("div",{className:"d-inline-block svg-container md"},n.createElement(o,null))))}))},49036:(t,e,r)=>{r.d(e,{f:()=>o});var n=r(32735);function o(t){return n.createElement(n.Fragment,null,"Have a ClickView account already?",n.createElement("a",{href:t.link,className:"info-link ms-1",onClick:t.onClick},"Sign in"))}},5798:(t,e,r)=>{r.d(e,{b:()=>c});var n=r(32735);const o={globalIdpButton:"tAlj0",globalIdpImage:"O94yo"};function a(t){var e=t.idp,r=t.onClick,a=t.backgroundColour,i=void 0===a?"F8981D":a,c=t.foregroundColour,l=void 0===c?"FFF":c,u=t.last,s=t.isGlobalIdp,f=u?"":"mb-3",p={backgroundColor:"#".concat(e.backgroundColour||i),color:"#".concat(e.foregroundColour||l)},d=s?"btn btn-lg btn-outline-dark w-100 ".concat(f," ").concat(o.globalIdpButton):"btn btn-lg w-100 ".concat(f),h=s?{}:p,m=s?"Continue with ".concat(e.name):e.name;return n.createElement("button",{className:d,style:h,onClick:function(){return r(e)}},s&&e.logoUrl&&n.createElement("img",{src:e.logoUrl,className:o.globalIdpImage,alt:"".concat(e.name," logo")}),m)}const i={divider:"FfyN0"};function c(t){var e;if(!(null===(e=t.idps)||void 0===e?void 0:e.length))return n.createElement(n.Fragment,null);function r(e){var r=window.location.pathname+window.location.search,n="/challenge?idp=".concat(e.id)+"&redirectUrl="+encodeURIComponent(r);"attribution"in t&&(n+="&attribution="+encodeURIComponent(t.attribution)),window.location.href=n}return n.createElement("div",{className:"".concat(t.className?t.className:"")},n.createElement("div",{className:"my-3 border-bottom position-relative ".concat(i.divider)}),t.idps.map((function(e,o){return n.createElement(a,{key:o,idp:e,onClick:"onClick"in t?t.onClick:r,attribution:"attribution"in t?t.attribution:null,isGlobalIdp:!0})})))}},85461:(t,e,r)=>{r.d(e,{h:()=>Wr});var n=r(32735),o=r(57900),a=r(49985),i=r(63093),c=r(74254),l=r(86974),u=r(82631),s=r(86664);function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function p(t){if(!t)return{firstName:"",surname:""};var e,r=function(t){if(Array.isArray(t))return t}(e=t.split(" ").filter((function(t){return t.length})))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return f(t,e);var r={}.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)?f(t,e):void 0}}(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.")}(),n=r[0],o=r.slice(1);return{firstName:n,surname:null==o?void 0:o.join(" ")}}var d=r(66122),h=r(2102);function m(t){return m="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},m(t)}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var v,g,b=/\$+[\w\s]?/,w=/^\+?\d{4,255}$/,S=255;function E(t){var e,r,o,a,i,c,f,v,g,E=(v=n.useState({fullname:"",jobTitle:"",phone:""}),g=2,function(t){if(Array.isArray(t))return t}(v)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(v,g)||function(t,e){if(t){if("string"==typeof t)return y(t,e);var r={}.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)?y(t,e):void 0}}(v,g)||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.")}()),x=E[0],k=E[1];function j(e){null==e||e.preventDefault(),function(e){var r=e.fullname,n=e.jobTitle,o=e.phone,a=p(r),i=a.firstName,c=a.surname,l={};return i&&c||(l.fullname="Please enter your full name."),(b.test(i)||b.test(c))&&(l.fullname="Please enter your full name."),r.length>S&&(l.fullname="Full name cannot exceed max length of ".concat(S," characters.")),(null==n?void 0:n.length)||(l.jobTitle="Please enter your job title."),b.test(n)&&(l.jobTitle="Please enter a valid job title."),n.length>S&&(l.jobTitle="Job title cannot exceed max length of ".concat(S," characters.")),(null==o?void 0:o.length)||(l.phone="Please enter your phone number."),!b.test(o)&&w.test(o)||(l.phone="Please enter a valid phone number."),t.setErrors(l),!Object.keys(l).length}(x)&&t.handleSubmitForm(x)}function L(t,e){k((function(r){return Object.assign(Object.assign({},r),function(t,e,r){return(e=function(t){var e=function(t){if("object"!=m(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==m(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}({},t,e))}))}function C(e){if(Object.keys(t.errors).length&&t.errors[e]){var r=Object.assign({},t.errors);delete r[e],t.setErrors(r)}}return n.createElement("div",{className:"text-center"},n.createElement("h1",{className:"text-center h4"},"A little more about you"),n.createElement("p",null,"Please enter your details."),n.createElement("form",{onSubmit:j,"aria-errormessage":"brazeFormError"},n.createElement("div",{className:"form-group text-start"},n.createElement("label",{className:"d-block fw-bold mb-1",htmlFor:"fullname-input"},"Full name"),n.createElement(l.w,{value:x.fullname,onChange:function(t){t.preventDefault(),L("fullname",t.target.value),C("fullname"),C("submission")},name:"fullname-input",id:"fullname-input",type:"text",className:"form-control form-control-lg ".concat((null===(e=t.errors.fullname)||void 0===e?void 0:e.length)?"is-invalid":""),placeholder:"Enter your name",onClickClear:function(){L("fullname",""),C("fullname"),C("submission")},autoFocus:!0,"aria-errormessage":"fullname-inputError"}),t.errors.fullname&&n.createElement(d.A,{name:"fullname-input"},t.errors.fullname)),n.createElement("div",{className:"form-group text-start"},n.createElement("label",{className:"d-block fw-bold mb-1",htmlFor:"phone-input"},"Contact number"),n.createElement(l.w,{value:x.phone,onChange:function(t){t.preventDefault(),L("phone",t.target.value.trim()),C("phone"),C("submission")},name:"phone-input",id:"phone-input",type:"tel",className:"form-control form-control-lg ".concat((null===(r=t.errors.phone)||void 0===r?void 0:r.length)?"is-invalid":""),placeholder:"Enter your phone number",onClickClear:function(){L("phone",""),C("phone"),C("submission")},"aria-errormessage":"phone-inputError"}),t.errors.phone&&n.createElement(d.A,{name:"phone-input"},t.errors.phone)),n.createElement("div",{className:"form-group text-start"},n.createElement("label",{className:"d-block fw-bold mb-1",htmlFor:"jobTitle-select"},"Job title"),n.createElement(u.B,{id:"jobTitle-select",countryCode:s.I.getCountryCode(t.country),onChange:function(t){L("jobTitle",t),C("jobTitle"),C("submission")},error:null===(o=t.errors)||void 0===o?void 0:o.jobTitle,size:"lg",labelClassName:"d-none",isTertiary:t.isTertiary})),!!(null===(a=t.errors)||void 0===a?void 0:a.submission)&&n.createElement(d.A,{name:"brazeForm",className:"form-group"},t.errors.submission),n.createElement("div",{className:"form-group mb-1"},n.createElement(h.m,{className:"btn-lg w-100",variant:"dark",onClick:function(){return j()},showSpinner:t.loading,disabled:t.loading||(i=x.fullname,c=x.jobTitle,f=x.phone,!(i.length&&c.length&&f.length&&!Object.keys(t.errors).length))},"Submit"))))}!function(t){t.Unavailable="unavailable",t.Expired="expired",t.Active="active",t.NotRequired="not-required",t.Available="available",t.Unsupported="unsupported",t.UserAutoJoinAllowed="user-auto-join-allowed",t.UserJoinApprovalRequired="user-join-approval-required",t.InvalidEmail="invalid-email",t.BdmTrialAvailable="bdm-trial-available"}(v||(v={})),function(t){t.Staff="staff",t.Learner="learner"}(g||(g={}));var x=r(76153),k=r(66187);function j(t){return j="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},j(t)}function L(){L=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new I(n||[]);return o(i,"_invoke",{value:O(t,r,c)}),i}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 p="suspendedStart",d="suspendedYield",h="executing",m="completed",y={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(P([])));E&&E!==r&&n.call(E,i)&&(w=E);var x=b.prototype=v.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function r(o,a,i,c){var l=f(t[o],t,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==j(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function O(e,r,n){var o=p;return function(a,i){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=N(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?m:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=m,n.method="throw",n.arg=u.arg)}}}function N(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,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function A(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=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 a.next=a}}throw new TypeError(j(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"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,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(C.prototype),u(C.prototype,c,(function(){return this})),e.AsyncIterator=C,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new C(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"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=P,I.prototype={constructor:I,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(T),!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 a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.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 a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},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),y},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),T(r),y}},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;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function C(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,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return O(t,e);var r={}.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)?O(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 O(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var N=r(65858),A=r(72688),T=r(99504),I=r(45157),P=function t(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){if(e.constructor!==r.constructor)return!1;var n,o,a;if(Array.isArray(e)){if((n=e.length)!=r.length)return!1;for(o=n;0!=o--;)if(!t(e[o],r[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((n=(a=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,a[o]))return!1;for(o=n;0!=o--;){var i=a[o];if(!t(e[i],r[i]))return!1}return!0}return e!=e&&r!=r};const U="__googleMapsScriptId";var F;!function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"}(F||(F={}));class _{constructor({apiKey:t,authReferrerPolicy:e,channel:r,client:n,id:o=U,language:a,libraries:i=[],mapIds:c,nonce:l,region:u,retries:s=3,url:f="https://maps.googleapis.com/maps/api/js",version:p}){if(this.CALLBACK="__googleMapsCallback",this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=t,this.authReferrerPolicy=e,this.channel=r,this.client=n,this.id=o||U,this.language=a,this.libraries=i,this.mapIds=c,this.nonce=l,this.region=u,this.retries=s,this.url=f,this.version=p,_.instance){if(!P(this.options,_.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(_.instance.options)}`);return _.instance}_.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?F.FAILURE:this.done?F.SUCCESS:this.loading?F.LOADING:F.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let t=this.url;return t+=`?callback=${this.CALLBACK}`,this.apiKey&&(t+=`&key=${this.apiKey}`),this.channel&&(t+=`&channel=${this.channel}`),this.client&&(t+=`&client=${this.client}`),this.libraries.length>0&&(t+=`&libraries=${this.libraries.join(",")}`),this.language&&(t+=`&language=${this.language}`),this.region&&(t+=`&region=${this.region}`),this.version&&(t+=`&v=${this.version}`),this.mapIds&&(t+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(t+=`&auth_referrer_policy=${this.authReferrerPolicy}`),t}deleteScript(){const t=document.getElementById(this.id);t&&t.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((t,e)=>{this.loadCallback((r=>{r?e(r.error):t(window.google)}))}))}loadCallback(t){this.callbacks.push(t),this.execute()}setScript(){if(document.getElementById(this.id))return void this.callback();const t=this.createUrl(),e=document.createElement("script");e.id=this.id,e.type="text/javascript",e.src=t,e.onerror=this.loadErrorCallback.bind(this),e.defer=!0,e.async=!0,this.nonce&&(e.nonce=this.nonce),document.head.appendChild(e)}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(t){if(this.errors.push(t),this.errors.length<=this.retries){const t=this.errors.length*Math.pow(2,this.errors.length);console.log(`Failed to load Google Maps script, retrying in ${t} ms.`),setTimeout((()=>{this.deleteScript(),this.setScript()}),t)}else this.onerrorEvent=t,this.callback()}setCallback(){window.__googleMapsCallback=this.callback.bind(this)}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((t=>{t(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading||(this.loading=!0,this.setCallback(),this.setScript())}}}function G(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,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return D(t,e);var r={}.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)?D(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 D(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function R(t){return new _({apiKey:t.apiKey,version:"weekly",libraries:t.libraries,retries:3})}function M(t){var e={apiKey:t.apiKey,libraries:t.libraries||["places"]},r=G(n.useState(!1),2),o=r[0],a=r[1],i=G(n.useState(R(e)),2),c=i[0],l=i[1];function u(t,r){c?c.loadCallback((function(e){if(e)return a(!1),void(r&&r(e));a(!0),t&&t()})):l(R(e))}return n.useEffect((function(){u()}),[]),{loader:c,scriptLoaded:o,onGoogleApiReady:u}}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function z(t){var e,r,o=M({apiKey:t.googleApiKey}).scriptLoaded,a=(e=n.useState(),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,r)||function(t,e){if(t){if("string"==typeof t)return B(t,e);var r={}.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)?B(t,e):void 0}}(e,r)||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.")}()),i=a[0],c=a[1];return n.useEffect((function(){o&&c(new google.maps.places.AutocompleteService)}),[o]),i}function Y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var K="country:placeholder:text";function q(t){var e,r,a=t.apiKey,i=t.geoLocation,c=t.makeRequest,l=void 0===c||c,u=t.template,f=void 0===u?"E.g. [placeholder]":u,p=t.templateKey,d=void 0===p?"[placeholder]":p,h=z({googleApiKey:a}),m=n.useState((function(){return function(t){var e=s.I.getLocalizedLocalityPlaceholderText(null==t?void 0:t.countryCode);return e||(o.SG.cacheGet("".concat(K,":").concat(null==t?void 0:t.countryCode))||void 0)}(i)})),y=(r=2,function(t){if(Array.isArray(t))return t}(e=m)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,r)||function(t,e){if(t){if("string"==typeof t)return Y(t,e);var r={}.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)?Y(t,e):void 0}}(e,r)||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.")}()),v=y[0],g=y[1];function b(t,e){o.SG.cacheSet("".concat(K,":").concat(e),t,86400),g(t)}return n.useEffect((function(){if(!v&&h&&l){var t=(null==i?void 0:i.countryCode)||"us",e={input:String.fromCharCode(96+I.Y.getRandomInt(26)),types:["(cities)"],region:t,componentRestrictions:{country:t}};h.getPlacePredictions(e,(function(e,r){return function(t,e,r){if(e===google.maps.places.PlacesServiceStatus.OK&&t){var n=t[I.Y.getRandomInt(t.length)].description;b(f.replace(d,n),r)}else b(s.I.getLocalizedLocalityPlaceholderText("us"),r)}(e,r,t)}))}}),[v,h,i,l]),v}function V(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,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return $(t,e);var r={}.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=Array(e);r<e;r++)n[r]=t[r];return n}function W(t){var e=V(n.useState(0),2),r=e[0],o=e[1],a=n.useRef(null),i=V(n.useState(!!t.hideInitially),2),c=i[0],l=i[1];function u(){var t;a.current&&(null===(t=a.current.children[r-1])||void 0===t||t.scrollIntoView({block:"center"}))}return{selectedIndex:r,onKeyDown:function(e){if(t.hideOnEnter&&l(!1),"ArrowDown"===e.code){e.stopPropagation(),e.preventDefault();var n=r+1;return n>t.itemCount&&(n=1),o(n),void u()}if("ArrowUp"===e.code){e.stopPropagation(),e.preventDefault();var a=r-1;return a<=0&&(a=t.itemCount),o(a),void u()}if("Enter"===e.code&&r>0)return e.stopPropagation(),e.preventDefault(),t.onSelected(r-1),void(t.hideOnEnter&&l(!0));o(0)},containerRef:a,hide:c,onFocus:function(){t.hideOnBlur&&l(!1)},onBlur:function(){t.hideOnBlur&&l(!0)}}}function J(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Z(t,e);var r={}.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)?Z(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function Z(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var H=function(t){var e,r,n,o,a,i=t.formatted_address,c=J(t.address_components);try{for(c.s();!(a=c.n()).done;){var l,u=a.value,s=J(u.types);try{for(s.s();!(l=s.n()).done;){var f=l.value;"locality"===f&&(e=u.short_name),"administrative_area_level_1"===f&&(r=u.short_name),"postal_code"===f&&(o=u.short_name),"country"===f&&(n=u.short_name)}}catch(t){s.e(t)}finally{s.f()}}}catch(t){c.e(t)}finally{c.f()}return{locality:i,country:n,postalCode:o,city:e,province:r}};function X(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var Q={1:"geocoderPermissionDenied",2:"geocoderUnavailable",3:"geocoderTimeout"},tt=r(28329);function et(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var rt=r(11607);function nt(){return n.createElement("svg",{viewBox:"0 0 24 24"},n.createElement("path",{d:"m12.00559,20.40189c4.60881,0 8.37242,-3.78424 8.37242,-8.40189c0,-4.61764 -3.76361,-8.40187 -8.37242,-8.40187c-4.62002,0 -8.38365,3.78422 -8.38365,8.40187c0,4.61765 3.76364,8.40189 8.38365,8.40189zm0,-1.65557c-3.75235,0 -6.67085,-2.96208 -6.67085,-6.74632c0,-3.7842 2.91851,-6.74625 6.67085,-6.74625c3.74105,0 6.67084,2.96206 6.67084,6.74625c0,3.78424 -2.92978,6.74632 -6.67084,6.74632zm-10.14151,-6.02552l6.01731,0c0.40566,0 0.72118,-0.31536 0.72118,-0.7208c0,-0.40544 -0.31552,-0.7208 -0.72118,-0.7208l-6.01731,0c-0.40566,0 -0.72117,0.31536 -0.72117,0.7208c0,0.40544 0.31551,0.7208 0.72118,0.7208l-0.00001,0zm14.25442,0l6.0174,0c0.40565,0 0.72118,-0.31536 0.72118,-0.7208c0,-0.40544 -0.31553,-0.7208 -0.72118,-0.7208l-6.0174,0c-0.40565,0 -0.72118,0.31536 -0.72118,0.7208c0,0.40544 0.31553,0.7208 0.72118,0.7208zm-4.12417,-4.1221c0.40566,0 0.72118,-0.31534 0.72118,-0.70952l0,-6.02547c0,-0.40544 -0.31552,-0.7208 -0.72118,-0.7208c-0.3944,0 -0.7099,0.31536 -0.7099,0.7208l0,6.02547c0,0.39418 0.31551,0.70952 0.7099,0.70952zm0,14.25838c0.40566,0 0.72118,-0.3154 0.72118,-0.72077l0,-6.02541c0,-0.39425 -0.31552,-0.70965 -0.72118,-0.70965c-0.3944,0 -0.7099,0.3154 -0.7099,0.70965l0,6.02541c0,0.40538 0.31551,0.72077 0.7099,0.72077z"}))}const ot="I6wQy",at="oI3z7",it="Y78ea",ct="magL7",lt="b0Mz9",ut="ChY5L",st="snnHR";function ft(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,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return pt(t,e);var r={}.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)?pt(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 pt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function dt(t){var e=t.predictions,r=t.getPlaceInfo,o=t.selectedIndex;return n.createElement(n.Fragment,null,e.map((function(t,e){return n.createElement(rt.L,{className:"".concat(ct," ").concat(o-1===e?st:""),key:t.place_id,onKeyDown:function(e){return"Enter"===e.key&&r(t)},onMouseDown:function(){return r(t)},onClick:function(){return r(t)}},t.description)})))}function ht(t){var e,r,o,a,i,c,u=n.useRef(null),s=ft(n.useState((null===(e=t.data)||void 0===e?void 0:e.schoolLocality)||""),2),f=s[0],p=s[1],d=ft(n.useState(!1),2),h=d[0],m=d[1],y=q({apiKey:t.googleMapsApiKey,geoLocation:t.geoLocation}),v=function(t){var e,r,o=t.search,a=t.makePredicition,i=t.geoLocation,c=z({googleApiKey:t.apiKey}),l=(0,tt.N)(o,300),u=(e=n.useState(),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,r)||function(t,e){if(t){if("string"==typeof t)return et(t,e);var r={}.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)?et(t,e):void 0}}(e,r)||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.")}()),s=u[0],f=u[1];function p(t,e){e===google.maps.places.PlacesServiceStatus.OK&&t?f(t):f(void 0)}return n.useEffect((function(){if(c)if(0!==(null==l?void 0:l.length)&&a){var t=(null==i?void 0:i.countryCode)||"us";c.getPlacePredictions({input:l,componentRestrictions:(null==i?void 0:i.isFallback)?void 0:{country:t},region:t,types:["locality","sublocality","postal_code"]},p)}else f(void 0)}),[l,a,c]),{localityPredicitions:s,getPlaceInfo:function(t,e,r){new google.maps.places.PlacesService(e.current).getDetails({placeId:t.place_id,fields:["geometry","address_components","formatted_address"],region:i.countryCode},(function(t,e){if(e===google.maps.places.PlacesServiceStatus.OK){var n=t.geometry.location.lng(),o=t.geometry.location.lat(),a=H(t),i=a.locality,c=a.country,l=a.postalCode,u=a.city,s=a.province;r({longitude:n,latitude:o,locality:i,country:c,city:u,postalCode:l,province:s})}}))}}}({search:f,makePredicition:h,geoLocation:t.geoLocation,apiKey:t.googleMapsApiKey}),g=v.localityPredicitions,b=v.getPlaceInfo,w=function(t){var e,r,o=(e=n.useState({}),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,r)||function(t,e){if(t){if("string"==typeof t)return X(t,e);var r={}.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)?X(t,e):void 0}}(e,r)||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.")}()),a=o[0],i=o[1],c=M(t).onGoogleApiReady;function l(t){var e=t.coords,r=e.latitude,n=e.longitude,o=new google.maps.LatLng(r,n);(new google.maps.Geocoder).geocode({location:o},(function(t,e){if(e===google.maps.GeocoderStatus.OK){var o=t.find((function(t){return t.types.includes("locality")||t.types.includes("administrative_area_level_2")})),a=H(o);i(Object.assign(Object.assign({},a),{longitude:n,latitude:r}))}}))}function u(e){var r=Q[e.code];r||(r="geocoderUnknown"),t.onPositionError("We are unable to access your location. Please try again later.")}return{placeDetails:a,onClickGetCurrentLocation:function(){c((function(){window.navigator.geolocation.getCurrentPosition(l,u)}))}}}({apiKey:t.googleMapsApiKey,onPositionError:function(t){m(!0),U(t)}}),S=w.placeDetails,E=w.onClickGetCurrentLocation,x=window.navigator.geolocation?1:0,k=W({onSelected:function(t){if(g)if(t!==g.length){var e=g[t];e&&G(e)}else D()},itemCount:null!==(r=(null==g?void 0:g.length)+x)&&void 0!==r?r:0,hideOnBlur:t.hideOnBlur}),j=k.selectedIndex,L=k.onKeyDown,C=k.containerRef,O=k.hide,A=k.onBlur,T=k.onFocus,I=ft(n.useState(),2),P=I[0],U=I[1];function F(e){var r,n,o;P&&U(void 0),h||m(!0),((null===(r=t.data)||void 0===r?void 0:r.longitude)||(null===(n=t.data)||void 0===n?void 0:n.latitude)||(null===(o=t.data)||void 0===o?void 0:o.schoolLocality))&&t.clearData(),p(e)}function _(e){t.setData({schoolLocality:e.locality,country:e.country,province:e.province,schoolPostCode:e.postalCode,longitude:e.longitude,latitude:e.latitude}),e.locality&&p(e.locality)}function G(t){h&&m(!1),b(t,u,_)}function D(e){var r;null==e||e.preventDefault(),m(!1),E(),null===(r=t.logUserAction)||void 0===r||r.call(t,{},{actionType:N.Vw.Click,descriptor:N.Yu.UseMyLocation})}n.useEffect((function(){_(S)}),[S]);var R,B=(null==g?void 0:g.length)&&!(null===(a=null===(o=t.data)||void 0===o?void 0:o.schoolLocality)||void 0===a?void 0:a.length),Y=window.navigator.geolocation&&!(null===(c=null===(i=t.data)||void 0===i?void 0:i.schoolLocality)||void 0===c?void 0:c.length),K=t.labelClassName||"d-block text-center mb-3 fw-normal ".concat("KL3Q_"),V="form-group position-relative";return"lg"===t.size&&(V+=" ".concat(lt)),n.createElement("div",{className:V},n.createElement("label",{className:K,htmlFor:"locality-input"},"ZIP code or city",t.required&&n.createElement("span",{className:"text-danger"},"*")),n.createElement(l.w,{type:"text",value:f,onChange:function(t){return F(t.currentTarget.value)},id:"locality-input",className:(R="form-control","lg"===t.size&&(R+=" form-control-lg"),!B||O?"".concat(R," ").concat(ut):"".concat(R," ").concat(ot)),ref:u,autoComplete:"off",placeholder:y||"Loading...",disabled:t.disabled||!y,autoFocus:null==t?void 0:t.autoFocus,onClickClear:function(){F(""),u.current.focus()},onKeyDown:L,onFocus:T,onBlur:A}),n.createElement("div",{className:"position-absolute z-1 w-100 ".concat(at," ").concat(O?"d-none":"")},!!B&&n.createElement("div",{className:it,ref:C},n.createElement(dt,{predictions:g,getPlaceInfo:G,selectedIndex:j}),window.navigator.geolocation&&t.useGeoLocationApi&&n.createElement(rt.L,{className:"".concat(ct," px-1 ").concat(j-1===g.length?st:""),onClick:D},n.createElement("div",{className:"btn btn-link info-link btn-with-icon bg-transparent py-0 pe-1"},n.createElement(nt,null),"Use my current location"))),Y&&!B&&t.useGeoLocationApi&&n.createElement("div",{className:"d-flex ".concat("dwmvC")},n.createElement("button",{onClick:D,className:"btn btn-link info-link bg-white btn-with-icon"},n.createElement(nt,null),"Use my current location")),!!P&&n.createElement("div",{className:"text-danger p-2"},P)))}var mt=r(99940);function yt(t){return yt="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},yt(t)}function vt(t){var e="function"==typeof Map?new Map:void 0;return vt=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return function(t,e,r){if(gt())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var o=new(t.bind.apply(t,n));return r&&bt(o,r.prototype),o}(t,arguments,wt(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),bt(r,t)},vt(t)}function gt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(gt=function(){return!!t})()}function bt(t,e){return bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bt(t,e)}function wt(t){return wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},wt(t)}var St=function(t){function e(t){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Error";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=wt(e),function(t,e){if(e&&("object"==yt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,gt()?Reflect.construct(e,r||[],wt(t).constructor):e.apply(t,r))}(this,e,[n])).body=t,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bt(t,e)}(e,t),r=e,Object.defineProperty(r,"prototype",{writable:!1}),r;var r}(vt(Error));function Et(t){return Et="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},Et(t)}function xt(){xt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new A(n||[]);return o(i,"_invoke",{value:L(t,r,c)}),i}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 p="suspendedStart",d="suspendedYield",h="executing",m="completed",y={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(T([])));E&&E!==r&&n.call(E,i)&&(w=E);var x=b.prototype=v.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var l=f(t[o],t,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Et(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function L(e,r,n){var o=p;return function(a,i){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?m:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=m,n.method="throw",n.arg=u.arg)}}}function C(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,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=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 a.next=a}}throw new TypeError(Et(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"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,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(j.prototype),u(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"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=T,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(N),!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 a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.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 a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},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),y},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),N(r),y}},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;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}var kt=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{l(n.next(t))}catch(t){a(t)}}function c(t){try{l(n.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,c)}l((n=n.apply(t,e||[])).next())}))};function jt(t){var e={method:mt.k.GET,headers:{"Content-type":"application/json"}};t.method&&(e=Object.assign(Object.assign({},e),{method:t.method})),t.init&&(e=Object.assign(Object.assign({},e),t.init));var r,n,o,a=t.url;return e.method===mt.k.GET&&t.data?(r=a,n=t.data,o=r,Object.keys(n).forEach((function(t,e){n[t]&&(o+=0===e?"?":"&",o+="".concat(t,"=").concat(encodeURIComponent(n[t])))})),a=o):t.data&&(e=Object.assign(Object.assign({},e),{body:JSON.stringify(t.data)})),{init:e,url:a}}var Lt={asyncFetch:function(t){return kt(this,void 0,void 0,xt().mark((function e(){var r,n,o;return xt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=jt(t),e.next=3,fetch(r.url,r.init);case 3:if((n=e.sent).ok){e.next=9;break}return e.next=7,n.json();case 7:throw o=e.sent,new St(o);case 9:if(204!==n.status){e.next=11;break}return e.abrupt("return");case 11:return e.next=13,n.json();case 13:return e.abrupt("return",e.sent);case 14:case"end":return e.stop()}}),e)})))},asyncFetchPlain:function(t){return kt(this,void 0,void 0,xt().mark((function e(){var r,n;return xt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=jt(t),e.next=3,fetch(r.url,r.init);case 3:if((n=e.sent).ok){e.next=6;break}return e.abrupt("return");case 6:return e.next=8,n.text();case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e)})))},fetch:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){var e=jt(t);return fetch(e.url,e.init).then((function(t){if(204!==t.status)return t.json()})).then((function(e){return t.success&&t.success(e),e})).catch((function(e){return t.error&&t.error(),e})).finally((function(){t.always&&t.always()}))}))};function Ct(t){return Ct="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},Ct(t)}function Ot(){Ot=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new A(n||[]);return o(i,"_invoke",{value:L(t,r,c)}),i}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 p="suspendedStart",d="suspendedYield",h="executing",m="completed",y={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(T([])));E&&E!==r&&n.call(E,i)&&(w=E);var x=b.prototype=v.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var l=f(t[o],t,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Ct(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function L(e,r,n){var o=p;return function(a,i){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?m:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=m,n.method="throw",n.arg=u.arg)}}}function C(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,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=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 a.next=a}}throw new TypeError(Ct(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"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,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(j.prototype),u(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"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=T,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(N),!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 a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.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 a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},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),y},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),N(r),y}},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;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}var Nt,At={search:function(t,e,r,n,o){var a={longitude:e.longitude,latitude:e.latitude};e.query&&(a.query=e.query),Lt.fetch({url:t,data:a,success:r,error:n,always:o})},create:function(t,e){return r=this,n=void 0,o=void 0,a=Ot().mark((function r(){return Ot().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Lt.asyncFetch({url:t.createProspect,method:mt.k.POST,data:e}));case 1:case"end":return r.stop()}}),r)})),new(o||(o=Promise))((function(t,e){function i(t){try{l(a.next(t))}catch(t){e(t)}}function c(t){try{l(a.throw(t))}catch(t){e(t)}}function l(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o((function(t){t(r)}))).then(i,c)}l((a=a.apply(r,n||[])).next())}));var r,n,o,a},getLookups:function(t,e){return Lt.asyncFetch({url:t.prospectLookups(e)})}},Tt=r(97395),It=r(84789),Pt=function(t,e){if(t.productName!==It.X.Lite)return Promise.reject();var r={email:e.email};return Lt.asyncFetch({url:t.userStatus,data:r})},Ut=function(t,e){return t.productName!==It.X.Lite?Promise.reject():Lt.asyncFetch({url:t.idps,data:{email:e}})},Ft=function(t,e){var r={prospectId:e.prospectId,email:e.email,userType:e.userType,appLink:null==e?void 0:e.appLink,attribution:null==e?void 0:e.attribution};return Lt.asyncFetch({url:t.createTrial,method:mt.k.POST,data:r})},_t=function(t,e,r){if(t.productName!==It.X.Lite)return Promise.reject();var n={email:r.email,appLink:null==r?void 0:r.appLink};return Lt.asyncFetch({url:t.resendTrialEmail(e),method:mt.k.POST,data:n})},Gt=["Primary","Secondary","K12","Special","TAFE","University"],Dt=["Elementary","Middle School","High School","College","Other"],Rt={au:Gt,nz:Gt,uk:["Primary","Secondary","Primary & Secondary","Special","Sixth Form College","FE College","University","Other"],us:Dt};function Mt(t){return Mt="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},Mt(t)}function Bt(){Bt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new A(n||[]);return o(i,"_invoke",{value:L(t,r,c)}),i}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 p="suspendedStart",d="suspendedYield",h="executing",m="completed",y={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(T([])));E&&E!==r&&n.call(E,i)&&(w=E);var x=b.prototype=v.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var l=f(t[o],t,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Mt(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function L(e,r,n){var o=p;return function(a,i){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?m:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=m,n.method="throw",n.arg=u.arg)}}}function C(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,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=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 a.next=a}}throw new TypeError(Mt(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"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,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(j.prototype),u(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"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=T,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(N),!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 a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.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 a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},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),y},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),N(r),y}},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;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function zt(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,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Yt(t,e);var r={}.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)?Yt(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 Yt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}!function(t){t.Published="Published",t.Draft="Draft"}(Nt||(Nt={}));var Kt=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{l(n.next(t))}catch(t){a(t)}}function c(t){try{l(n.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,c)}l((n=n.apply(t,e||[])).next())}))};function qt(t,e){return e?"".concat(t," ").concat(e):t}var Vt=function(t){return n.createElement("h1",{className:qt("text-center mb-2 h4",t.className)},t.children)},$t=function(t){return n.createElement("div",{className:qt("text-center text-sm px-2 px-lg-4",t.className)},t.children)},Wt=function(t){return n.createElement("p",{className:qt("",t.className)},t.children)};function Jt(t){return Jt="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},Jt(t)}function Zt(t,e,r){return(e=function(t){var e=function(t){if("object"!=Jt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Jt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Jt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ht(t){var e=Zt(Zt(Zt(Zt(Zt(Zt(Zt(Zt(Zt(Zt({},v.Available,t.imageUrls.statusImages.available),v.Active,t.imageUrls.statusImages.active),v.Expired,t.imageUrls.statusImages.expired),v.NotRequired,t.imageUrls.statusImages.notRequired),v.Unavailable,t.imageUrls.statusImages.unavailable),v.Unsupported,t.imageUrls.statusImages.unsupported),v.UserAutoJoinAllowed,t.imageUrls.statusImages.notRequired),v.UserJoinApprovalRequired,t.imageUrls.statusImages.notRequired),v.InvalidEmail,""),v.BdmTrialAvailable,"");return n.createElement("div",{className:"d-flex justify-content-center my-4 px-2 px-lg-4"},n.createElement("img",{src:e[t.trialStatus],className:"w-100 h-auto"}))}var Xt=r(69624);function Qt(t){var e=(null==t?void 0:t.previousStepIds)&&"find-school"===t.previousStepIds[t.previousStepIds.length-1],r=(null==t?void 0:t.schoolName)||"Your school";return n.createElement($t,{className:"mb-3"},e?n.createElement(n.Fragment,null,n.createElement(Vt,null,r,n.createElement("br",null),"already has ClickView 🎉"),n.createElement(Wt,{className:"mt-3"},"If your school has SSO ",n.createElement("a",{href:t.getSignInUrl({email:t.email,customerId:t.customerId}),className:"info-link"},"click here to sign in.")),n.createElement(Wt,null,"Otherwise please contact your school admin for access.")):n.createElement(n.Fragment,null,n.createElement(Vt,null,"Good News!"),n.createElement(Wt,null,"An account already exists for:",n.createElement("br",null)," ",n.createElement("strong",null,t.email)),n.createElement(Wt,null,n.createElement("a",{href:t.getSignInUrl({email:t.email}),className:"btn btn-dark btn-lg w-100"},"Sign into ClickView"))),n.createElement(Wt,null,"Need Help? ",n.createElement("a",{href:Xt.F.getSupportUrlForGeoLocation(t.geoLocation),className:"info-link",target:"_blank"},"Contact our Help Centre.")))}function te(t){return te="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},te(t)}function ee(){ee=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new A(n||[]);return o(i,"_invoke",{value:L(t,r,c)}),i}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 p="suspendedStart",d="suspendedYield",h="executing",m="completed",y={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(T([])));E&&E!==r&&n.call(E,i)&&(w=E);var x=b.prototype=v.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var l=f(t[o],t,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==te(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function L(e,r,n){var o=p;return function(a,i){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?m:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=m,n.method="throw",n.arg=u.arg)}}}function C(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,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=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 a.next=a}}throw new TypeError(te(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"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,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(j.prototype),u(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"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=T,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(N),!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 a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.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 a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},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),y},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),N(r),y}},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;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function re(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,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ne(t,e);var r={}.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)?ne(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 ne(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function oe(t){return oe="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},oe(t)}function ae(t,e,r){return(e=function(t){var e=function(t){if("object"!=oe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=oe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==oe(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ie=ae(ae(ae(ae(ae(ae(ae(ae(ae(ae({},v.Available,(function(t){var e=re(n.useState(0),2),r=e[0],o=e[1],a=re(n.useState(!1),2),i=a[0],c=a[1];if(null==t?void 0:t.email)return n.createElement($t,null,n.createElement(Vt,null,"Check your inbox!"),n.createElement(Wt,null,"An email has been sent to ",n.createElement("strong",null,t.email),"."),!!t.userId&&n.createElement(n.Fragment,null,r<1?n.createElement("button",{onClick:function(e){return n=this,a=void 0,i=void 0,l=ee().mark((function n(){return ee().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return null==e||e.preventDefault(),n.prev=1,n.next=4,_t(t.ajaxUrls,t.userId,{email:t.email,appLink:t.pageAppLinkString});case 4:o(r+1),n.next=10;break;case 7:n.prev=7,n.t0=n.catch(1),c(!0);case 10:t.logUserAction({},{actionType:N.Vw.Click,descriptor:N.Yu.ResendEmail});case 11:case"end":return n.stop()}}),n,null,[[1,7]])})),new(i||(i=Promise))((function(t,e){function r(t){try{c(l.next(t))}catch(t){e(t)}}function o(t){try{c(l.throw(t))}catch(t){e(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof i?n:new i((function(t){t(n)}))).then(r,o)}c((l=l.apply(n,a||[])).next())}));var n,a,i,l},className:"btn btn-outline-dark btn-lg mb-3"},"Resend verification email"):n.createElement(Wt,null,"✅ Email has been resent!"),n.createElement(Wt,null,"Wrong email? ",n.createElement("button",{onClick:function(e){null==e||e.preventDefault(),t.logUserAction({},{actionType:N.Vw.Click,descriptor:N.Yu.WrongEmail}),t.nextStep({step:"enter-email",userType:g.Staff})},className:"btn info-link p-0"},"Update email address")),i&&n.createElement(Wt,{className:"mb-0 text-danger"},"❌ There was a problem resending the email. Please try again later or contact our  ",n.createElement("a",{href:Xt.F.getSupportUrlForGeoLocation(t.geoLocation),className:"info-link"},"support"))))})),v.Active,Qt),v.Expired,(function(t){var e=Xt.F.getMarketingSalesContactForGeoLocation(t.geoLocation),r=(null==t?void 0:t.previousStepIds)&&"find-school"===t.previousStepIds[t.previousStepIds.length-1],o=(null==t?void 0:t.schoolName)||"Your school";return n.createElement($t,null,n.createElement(Vt,null,r?"".concat(o," trial has expired"):"Your trial has expired"),n.createElement(Wt,null,"Please contact our ",n.createElement("a",{href:e,className:"info-link",target:"_blank"},"ClickView Sales Team")))})),v.NotRequired,Qt),v.Unavailable,(function(t){var e=Xt.F.getMarketingSalesContactForGeoLocation(t.geoLocation);return n.createElement($t,null,n.createElement(Vt,null,"Your school no longer",n.createElement("br",null)," has access to ClickView"),n.createElement(Wt,null,"Please contact our ",n.createElement("a",{href:e,className:"info-link"},"ClickView Sales Team")," for more information."))})),v.Unsupported,(function(){return n.createElement($t,null,n.createElement(Vt,{className:"px-2 px-lg-4"},"ClickView isn't currently ",n.createElement("br",null)," available for your school"),n.createElement(Wt,null,"We're working hard to get ClickView ready for more people."))})),v.UserAutoJoinAllowed,Qt),v.UserJoinApprovalRequired,Qt),v.InvalidEmail,null),v.BdmTrialAvailable,null);function ce(t){var e=ie[t.trialStatus];return e?n.createElement(e,Object.assign({},t)):n.createElement(n.Fragment,null)}var le="young-student",ue={"trial-status":function(t){return n.useEffect((function(){var e={actionType:N.Vw.Create,descriptor:N.Yu.DeadEnd,workflowPhase:N.eu.Discard};t.trialCreated&&(e.descriptor=N.Yu.TrialCreated,e.workflowPhase=N.eu.Complete),t.logUserAction({},e)}),[]),n.createElement(n.Fragment,null,n.createElement(Ht,{trialStatus:t.trialStatus,imageUrls:t.imageUrls}),n.createElement(ce,Object.assign({},t)))},"added-to-braze":function(t){return n.useEffect((function(){t.logUserAction({},{actionType:N.Vw.Create,descriptor:N.Yu.TrialRequested,workflowPhase:N.eu.Complete})}),[]),n.createElement(n.Fragment,null,n.createElement(Ht,{trialStatus:v.Available,imageUrls:t.imageUrls}),n.createElement($t,{className:"mb-3"},n.createElement(Vt,null,"Submitted!"),n.createElement(Wt,null,"Thank you for your interest in trialing ClickView. We will be in touch with you as soon as possible.")))},"young-student":function(t){var e=Xt.F.getFreeResourcesForGeoLocation(t.geoLocation);return n.useEffect((function(){o.SG.set(le,!0)}),[]),n.createElement(n.Fragment,null,n.createElement(Ht,{trialStatus:v.Active,imageUrls:t.imageUrls}),n.createElement($t,{className:"mb-3"},n.createElement(Vt,null,"Discover our free content"),n.createElement(Wt,null,"Click the button below to explore our videos"),n.createElement("a",{href:e,className:"btn btn-lg btn-dark w-100",target:"_blank"},"Start watching now")))},"requested-access":function(t){return n.createElement(n.Fragment,null,n.createElement(Ht,{trialStatus:v.Available,imageUrls:t.imageUrls}),n.createElement($t,{className:"mb-3"},n.createElement(Vt,null,"You've requested access!"),n.createElement(Wt,null,"We've sent a request to your ClickView admin. Once your account is ready, you'll receive an email notification with instructions on how to get started with ClickView.")))}};function se(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,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return fe(t,e);var r={}.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)?fe(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 fe(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function pe(t,e,r){return"".concat(t.padStart(4,"0"),"-").concat(e.padStart(2,"0"),"-").concat(r.padStart(2,"0"))}var de=r(49036),he=r(5798),me=r(98027),ye=r(93824);function ve(t){return ve="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},ve(t)}function ge(){ge=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new A(n||[]);return o(i,"_invoke",{value:L(t,r,c)}),i}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 p="suspendedStart",d="suspendedYield",h="executing",m="completed",y={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(T([])));E&&E!==r&&n.call(E,i)&&(w=E);var x=b.prototype=v.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var l=f(t[o],t,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==ve(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function L(e,r,n){var o=p;return function(a,i){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?m:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=m,n.method="throw",n.arg=u.arg)}}}function C(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,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=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 a.next=a}}throw new TypeError(ve(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"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,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(j.prototype),u(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"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=T,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(N),!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 a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.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 a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},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),y},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),N(r),y}},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;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function be(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,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return we(t,e);var r={}.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)?we(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 we(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function Se(t,e,r){return(e=function(t){var e=function(t){if("object"!=ve(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ve(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ve(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ee=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{l(n.next(t))}catch(t){a(t)}}function c(t){try{l(n.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,c)}l((n=n.apply(t,e||[])).next())}))},xe=new RegExp(/^[^\s@]+@[^\s@]+\.[^\s@]+$/),ke=Se(Se(Se(Se({},ye.C.AU,"valerie.frizzle@school.edu.au"),ye.C.UK,"valerie.frizzle@school.gov.uk"),ye.C.US,"valerie.frizzle@school.gov"),ye.C.NZ,"valerie.frizzle@school.nz"),je=Se(Se(Se(Se({},ye.C.AU,"/contact-us/support"),ye.C.US,"/contact-us/support"),ye.C.NZ,"/contact-us/"),ye.C.UK,"/contact-us/technical/");function Le(t){return ke[s.I.getCountryCode(t.countryCode)]||ke.us}var Ce=[v.Expired,v.NotRequired,v.Unavailable,v.Unsupported,v.Active];function Oe(t){var e;switch(null===(e=null==t?void 0:t.body)||void 0===e?void 0:e.type){case"user-type-not-supported":return"Students may not request to join schools.";case"join-request-already-pending":return"Your request is awaiting administrator approval.";case"join-request-already-denied":return"Your request has been denied by an administrator.";default:return"Something went wrong."}}var Ne=r(12238);function Ae(t){return Ae="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},Ae(t)}function Te(){Te=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new A(n||[]);return o(i,"_invoke",{value:L(t,r,c)}),i}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 p="suspendedStart",d="suspendedYield",h="executing",m="completed",y={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(T([])));E&&E!==r&&n.call(E,i)&&(w=E);var x=b.prototype=v.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var l=f(t[o],t,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Ae(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function L(e,r,n){var o=p;return function(a,i){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?m:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=m,n.method="throw",n.arg=u.arg)}}}function C(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,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=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 a.next=a}}throw new TypeError(Ae(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"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,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(j.prototype),u(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"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=T,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(N),!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 a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.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 a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},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),y},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),N(r),y}},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;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Ie(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function Pe(t){return Pe="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},Pe(t)}function Ue(){Ue=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new A(n||[]);return o(i,"_invoke",{value:L(t,r,c)}),i}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 p="suspendedStart",d="suspendedYield",h="executing",m="completed",y={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(T([])));E&&E!==r&&n.call(E,i)&&(w=E);var x=b.prototype=v.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var l=f(t[o],t,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Pe(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function L(e,r,n){var o=p;return function(a,i){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?m:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=m,n.method="throw",n.arg=u.arg)}}}function C(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,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=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 a.next=a}}throw new TypeError(Pe(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"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,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(j.prototype),u(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"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=T,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(N),!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 a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.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 a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},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),y},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),N(r),y}},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;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Fe(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,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return _e(t,e);var r={}.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)?_e(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 _e(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function Ge(t){return Ge="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},Ge(t)}function De(){De=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new A(n||[]);return o(i,"_invoke",{value:L(t,r,c)}),i}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 p="suspendedStart",d="suspendedYield",h="executing",m="completed",y={};function v(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(T([])));E&&E!==r&&n.call(E,i)&&(w=E);var x=b.prototype=v.prototype=Object.create(w);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var l=f(t[o],t,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==Ge(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){u.value=t,i(u)}),(function(t){return r("throw",t,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function L(e,r,n){var o=p;return function(a,i){if(o===h)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?m:d,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=m,n.method="throw",n.arg=u.arg)}}}function C(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,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function O(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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=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 a.next=a}}throw new TypeError(Ge(e)+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"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,u(t,l,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(j.prototype),u(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"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=T,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(N),!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 a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.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 a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},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),y},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),N(r),y}},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;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}var Re=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{l(n.next(t))}catch(t){a(t)}}function c(t){try{l(n.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,c)}l((n=n.apply(t,e||[])).next())}))},Me=r(80247);function Be(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,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ze(t,e);var r={}.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)?ze(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 ze(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function Ye(t){var e=t.filteredSchoolsList,r=t.getSchoolName,o=t.onSchoolSuggestionClick,a=t.selectedIndex;return n.createElement(n.Fragment,null,e.map((function(t,e){return n.createElement(rt.L,{className:"".concat(ct," ").concat(a-1===e?st:""),key:t.id,onKeyDown:function(e){return"Enter"===e.key&&o(t)},onMouseDown:function(){return o(t)},onClick:function(){return o(t)}},r(t)," ",n.createElement("br",null),n.createElement("small",{className:"text-secondary"},function(t){var e=[];return t.city&&e.push(t.city.toLowerCase().split(" ").map((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})).join(" ")),t.province&&e.push(t.province),t.postCode&&e.push(t.postCode),e.join(" ")}(t)))})))}function Ke(t){return n.createElement("div",{className:"info-link ".concat(ct," ").concat("XXSnS"," ").concat(t.selected?st:""),onKeyDown:function(e){return"Enter"===e.key&&t.handleNoSuggestion()},onMouseDown:t.handleNoSuggestion,onClick:t.handleNoSuggestion},"Can't find your school?")}function qe(t){var e,r,o=n.useRef(null),a=Be(n.useState(!0),2),i=a[0],c=a[1],u=Be(n.useState(t.data.schoolName&&t.data.schoolPostCode?t.data.schoolName+", "+t.data.schoolPostCode:t.data.schoolName?t.data.schoolName:""),2),s=u[0],f=u[1],p=Be(n.useState(),2),d=p[0],h=p[1],m=(0,tt.N)(s,250),y=W({onSelected:function(e){if(d||e)if(e!==d.length){var r=d[e];r&&N(r)}else t.onClickNoSuggestions(s)},itemCount:null!==(e=(null==d?void 0:d.length)+1)&&void 0!==e?e:0,hideOnBlur:t.hideOnBlur}),v=y.selectedIndex,g=y.onKeyDown,b=y.containerRef,w=y.hide,S=y.onBlur,E=y.onFocus,x=!!(null===(r=t.data)||void 0===r?void 0:r.prospectId),k=i&&!x,j=!i&&!x&&(null==d?void 0:d.length)<5,L=(null==d?void 0:d.length)&&!x;function C(e){(t.data.schoolName||t.data.prospectId)&&t.clearData(),e!==s&&f(e)}function O(e){if(t.data.latitude||t.data.longitude){c(!0);var r={latitude:t.data.latitude,longitude:t.data.longitude};e&&e.length&&(r.query=e),At.search(t.searchUrl,r,(function(t){return h(t)}),null,(function(){return c(!1)}))}else c(!1)}function N(e){f(A(e)),t.setData({prospectId:e.id,schoolName:e.name,schoolPostCode:e.postCode,schoolType:e.prospectType,province:e.province,city:e.city,country:e.countryCode})}function A(t){return t.name}n.useEffect((function(){x||(m.length?!x&&m.length>1&&m===s&&O(m):O())}),[m,x]);var T=(L||k||j)&&!t.disabled&&!w,I="form-control ".concat(T?ot:ut),P="form-group position-relative";return"lg"===t.size&&(I+=" form-control-lg",P+=" ".concat(lt)),n.createElement("div",{className:P},n.createElement("label",{className:t.labelClassName,htmlFor:"school-input"},"School",t.required&&n.createElement("span",{className:"text-danger"},"*")),n.createElement(l.w,{id:"school-input",value:s,onChange:function(t){return C(t.currentTarget.value)},ref:o,className:I,type:"text",autoComplete:"off",placeholder:t.placeholder||"Select your school below",disabled:t.disabled,autoFocus:!0,onClickClear:function(){C(""),o.current.focus()},onKeyDown:g,onFocus:E,onBlur:S}),n.createElement("div",{className:"position-absolute z-1 w-100 ".concat(at," ").concat(w?"d-none":"")},n.createElement("div",{className:"".concat(it," ").concat(T?"":"d-none"),ref:b},L?n.createElement(Ye,{filteredSchoolsList:d,onSchoolSuggestionClick:N,getSchoolName:A,selectedIndex:v}):k&&n.createElement("div",{className:"".concat("W7rH_"," py-4 d-flex justify-content-center")},n.createElement(Me.Z,{animation:"border"})),!k&&j&&n.createElement(Ke,{selected:v===d.length+1,handleNoSuggestion:function(){t.onClickNoSuggestions(s)}}))))}function Ve(t){return Ve="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},Ve(t)}function $e(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,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return We(t,e);var r={}.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)?We(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 We(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}const Je="DvShO",Ze="WoB0p";function He(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,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Xe(t,e);var r={}.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)?Xe(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 Xe(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function Qe(t){var e=t.items,r=t.getName,o=t.onItemClick,a=t.selectedIndex;return n.createElement(n.Fragment,null,e.map((function(t,e){return n.createElement(rt.L,{className:"".concat(Je," ").concat(a-1===e?Ze:""),key:e,onKeyDown:function(e){return"Enter"===e.key&&o(t)},onMouseDown:function(){return o(t)},onClick:function(){return o(t)}},r(t))})))}function tr(t){var e=n.useRef(null),r=He(n.useState(""),2),o=r[0],a=r[1],i=He(n.useState([]),2),c=i[0],u=i[1],s=W({onSelected:function(e){if(e!==c.length){var r=c[e];r&&S(r)}else t.onCantFind()},itemCount:t.cantFindText?t.items.length+1:t.items.length,hideOnBlur:!0,hideInitially:!0,hideOnEnter:!0}),f=s.selectedIndex,p=s.onKeyDown,d=s.containerRef,h=s.hide,m=s.onBlur,y=s.onFocus,v=!!t.item,g=t.cantFindText?(null==c?void 0:c.length)+1:null==c?void 0:c.length;function b(e){t.item&&t.clearData(),e!==o&&a(e)}function w(e){if(e){var r=t.items.filter((function(r){return t.getName(r).toLowerCase().includes(e.toLowerCase())}));u(r)}else u(t.items)}function S(e){a(t.getName(e)),t.onSelect(e),u(t.items)}n.useEffect((function(){v||(o.length?!v&&o.length>1&&w(o):w())}),[o,v]);var E=g&&!t.disabled&&!h,x="form-select ".concat(E?"W4fIm":"C5let"," ").concat("n4gn0"," cursor-pointer"),k="form-group position-relative";return"lg"===t.size&&(x+=" form-select-lg",k+=" ".concat("gDUIS")),n.createElement("div",{className:k},n.createElement(l.w,{id:t.id,value:o,onChange:function(t){return b(t.currentTarget.value)},ref:e,className:x,type:"text",autoComplete:"off",placeholder:t.placeholder,disabled:t.disabled,onClickClear:function(){b(""),e.current.focus()},onKeyDown:p,onFocus:y,onBlur:m,clearClassName:"A6Y6R"}),n.createElement("div",{className:"position-absolute z-1 w-100 ".concat("VoOjY"," ").concat(h?"d-none":"")},n.createElement("div",{className:"".concat("oFNpM"," ").concat(E?"":"d-none"),ref:d},g&&n.createElement(Qe,{items:c,onItemClick:S,getName:t.getName,selectedIndex:f}),t.cantFindText&&n.createElement("div",{className:"info-link ".concat(Je," ").concat(f===c.length+1?Ze:""),onKeyDown:function(e){return"Enter"===e.key&&t.onCantFind()},onMouseDown:t.onCantFind,onClick:t.onCantFind},t.cantFindText))))}function er(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var rr=["38A2E8","7A76E8","40BCC3","F7847B"];function nr(t){return n.createElement(n.Fragment,null,n.createElement(rt.L,{className:"\n d-flex\n flex-column\n justify-content-between\n h-100\n p-3\n border\n rounded\n rounded-3\n mx-auto\n d-sm-block\n d-none\n ".concat("R8ZPi"," ").concat(t.selected?"SNEmW":""),onClick:function(){return t.onClick(t.type)}},n.createElement("img",{src:t.imageSrc,className:"rounded-top mx-auto pb-2"}),n.createElement("div",{className:"py-2"},n.createElement("span",{className:"h4"},t.buttonText))),n.createElement(rt.L,{className:"btn btn-lg btn-outline-dark w-100 d-sm-none d-block mx-auto ".concat("BSfO7"),onClick:function(){return t.onClick(t.type)}},t.buttonText))}var or={"select-type":function(t){function e(e){t.logUserAction({userType:e},{actionType:N.Vw.Click,workflowPhase:N.eu.Next,descriptor:e===g.Staff?N.Yu.Educator:N.Yu.Student}),e!==g.Staff?t.nextStep({step:"enter-age",userType:e}):t.nextStep({step:"enter-email",userType:e})}return n.createElement("div",{className:"text-center"},n.createElement("h1",{className:"h4"},"Access educational videos at your fingertips"),n.createElement("p",{className:"mb-3"},"Let's get you set up so you can access ClickView."),n.createElement("div",{className:"row"},n.createElement("div",{className:"col-lg-6 mb-3"},n.createElement(nr,{type:g.Staff,buttonText:"I'm an educator",imageSrc:t.imageUrls.educator,onClick:e,selected:t.userType===g.Staff})),n.createElement("div",{className:"col-lg-6 mb-3"},n.createElement(nr,{type:g.Learner,buttonText:"I'm a student",imageSrc:t.imageUrls.student,onClick:e,selected:t.userType===g.Learner}))))},"enter-email":function(t){var e,r,o,a,i=be(n.useState(!1),2),c=i[0],u=i[1],f=be(n.useState((null==t?void 0:t.email)||""),2),p=f[0],m=f[1],y=be(n.useState(),2),b=y[0],w=y[1],S=(e=t.geoLocation,r=Xt.F.getMarketingUrlForGeoLocation(e),o=s.I.getCountryCode(null==e?void 0:e.countryCode),a=je[o],"".concat(r).concat(a));function E(){return Ee(this,void 0,void 0,ge().mark((function e(){var r,n;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w(""),e.prev=1,e.next=4,Pt(t.ajaxUrls,{email:p});case 4:r=e.sent,e.next=11;break;case 7:return e.prev=7,e.t0=e.catch(1),w("Something went wrong! Please try again later."),e.abrupt("return");case 11:if(r.status!==v.InvalidEmail){e.next=14;break}return w("Please use your school email address."),e.abrupt("return");case 14:if(t.logUserAction({},{actionType:N.Vw.Click,workflowPhase:N.eu.Next,descriptor:N.Yu.EnterEmail}),!Ce.includes(r.status)){e.next=18;break}return t.complete({completionStep:"trial-status",email:p,trialStatus:r.status,trialCreated:!1}),e.abrupt("return");case 18:return e.prev=18,e.next=21,Ut(t.ajaxUrls,p);case 21:if(!(n=e.sent).length){e.next=25;break}return t.nextStep({step:"select-idp",email:p,userTrialStatus:r.status,idps:n}),e.abrupt("return");case 25:e.next=31;break;case 27:return e.prev=27,e.t1=e.catch(18),w("Something went wrong! Please try again later."),e.abrupt("return");case 31:t.nextStep({step:"find-school",email:p,userTrialStatus:r.status});case 32:case"end":return e.stop()}}),e,null,[[1,7],[18,27]])})))}function x(t){return Ee(this,void 0,void 0,ge().mark((function e(){return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==t||t.preventDefault(),p.length?xe.test(p)||(w("Please use your school email address."),0):(w("Please enter your school email address."),0)){e.next=3;break}return e.abrupt("return");case 3:return u(!0),e.next=6,E();case 6:u(!1);case 7:case"end":return e.stop()}}),e)})))}return n.createElement(n.Fragment,null,n.createElement("div",{className:"text-center"},n.createElement("h1",{className:"h4"},"Let's set up your account"),n.createElement("p",null,"Enter your school email address")),n.createElement("form",{onSubmit:x,noValidate:!0},n.createElement("div",{className:"form-group mb-3"},n.createElement(l.w,{value:p,onChange:function(t){t.preventDefault(),m(t.target.value),w("")},name:"email-input",id:"email-input",type:"email",className:"form-control form-control-lg ".concat(b?"is-invalid":""),placeholder:Le(t.geoLocation),autoComplete:"false",autoCorrect:"false",autoFocus:!0,onClickClear:function(){return m("")},"aria-errormessage":"email-inputError"}),b&&n.createElement(n.Fragment,null,n.createElement(d.A,{name:"error-input"},b),n.createElement("small",null,"Having an issue with your email?",n.createElement("a",{href:S,className:"info-link ps-1",target:"_blank",onClick:function(){t.logUserAction({},{actionType:N.Vw.Click,descriptor:N.Yu.ContactUs})}},"Contact our team")))),n.createElement(h.m,{showSpinner:c,variant:"dark",className:"btn-lg mb-3 w-100",disabled:c,onClick:x},"Continue")),t.userType===g.Staff&&n.createElement(he.b,{idps:t.globalIdps,className:"mt-n3",attribution:(0,me.w)()}),n.createElement("div",{className:"text-center"},n.createElement(de.f,{link:t.getSignInUrl({email:p}),onClick:function(){t.logUserAction({},{actionType:N.Vw.Click,descriptor:N.Yu.SignIn})}})))},"find-school":function(t){var e,r,o=t.email,a=t.userType,c=$e(n.useState({schoolLocality:t.schoolLocality,country:t.country,longitude:t.longitude,latitude:t.latitude,city:t.city,province:t.province,prospectId:t.prospectId,schoolName:t.schoolName,schoolType:t.schoolType,schoolPostCode:t.schoolPostCode}),2),l=c[0],u=c[1],s=$e(n.useState(t.trialStatus),2),f=s[0],p=s[1],d=$e(n.useState(),2),m=d[0],y=d[1],b=$e(n.useState(!1),2),w=b[0],S=b[1],E=$e(n.useState(!1),2),k=E[0],j=E[1],L=$e(n.useState(!1),2),C=L[0],O=L[1],I=function(t){var e=t.loading,r=t.canSubmitForm,n=t.setSubmissionError,o=t.prospectStatus,a=t.userType,c=t.logStepEvent,l=t.logUserAction,u=t.nextStep,s=t.data,f=t.productName,p=t.ajaxUrls,d=t.complete,h=t.setLoadingState,m=t.email,y=t.userTrialStatus,b=t.pageAppLinkString,w=t.setProperty,S=t.logBrazeEvent,E=t.createOrUpdateProfile;function k(){return Re(this,void 0,void 0,De().mark((function t(){return De().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e=p,r={prospectId:s.prospectId,email:m},e.productName!==It.X.Lite?Promise.reject():Lt.asyncFetch({url:e.autoJoin,method:mt.k.POST,data:r});case 3:l({},{actionType:N.Vw.Click,descriptor:N.Yu.AutoJoin}),d(Object.assign({completionStep:"trial-status",trialCreated:!0,trialStatus:v.Available},s)),t.next=12;break;case 7:return t.prev=7,t.t0=t.catch(0),n("Something went wrong! Please try again later."),h(!1),t.abrupt("return");case 12:case"end":return t.stop()}var e,r}),t,null,[[0,7]])})))}function j(){var t;return Re(this,void 0,void 0,De().mark((function e(){var r,n;return De().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=void 0,!(null==s?void 0:s.prospectId)||o!==v.NotRequired){e.next=6;break}return e.next=4,At.getLookups(p,s.prospectId);case 4:n=e.sent,r=null===(t=n.find((function(t){return t.type===Ne.C.MasterId})))||void 0===t?void 0:t.externalId;case 6:d(Object.assign({completionStep:"trial-status",trialStatus:o,trialCreated:!1,customerId:r},s)),c();case 8:case"end":return e.stop()}}),e)})))}function L(){return Re(this,void 0,void 0,De().mark((function t(){var e,r;return De().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a===g.Staff){t.next=2;break}return t.abrupt("return");case 2:e={email:m,custom:{accountName:null==s?void 0:s.schoolName,accountAddress:{countryCode:null==s?void 0:s.country,province:x.F.parseProvince(s.province)},orgSubType:x.F.getSchoolType(null==s?void 0:s.schoolType),syncToCrm:!0},event:{accountCountry:null==s?void 0:s.country,accountPostCode:null==s?void 0:s.schoolPostCode,accountState:x.F.parseProvince(s.province)}},r={form_type:"trial-sign-up",prospect_id:null==s?void 0:s.prospectId},S({user:e,event:{eventType:i.ProductFormEvent.FormSubmission,additionalData:r}});case 5:case"end":return t.stop()}}),t)})))}function C(){var t;return Re(this,void 0,void 0,De().mark((function e(){var r;return De().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h(!0),e.prev=1,e.next=4,Ft(p,{userType:a,email:m,prospectId:null==s?void 0:s.prospectId,appLink:b,attribution:Object.assign(Object.assign({},A.N.getDecodedAttributionData()),{utms:T.F.getUtmParameters()})});case 4:r=e.sent,e.next=12;break;case 7:return e.prev=7,e.t0=e.catch(1),n("Something went wrong! Please try again later."),h(!1),e.abrupt("return");case 12:o===v.UserAutoJoinAllowed&&l({},{actionType:N.Vw.Click,descriptor:N.Yu.AutoJoin}),w("userId",r.id),d(Object.assign({completionStep:"trial-status",userId:r.id,trialCreated:!0,trialStatus:v.Available,customerId:null===(t=r.data)||void 0===t?void 0:t.customerId},s)),L(),E&&E({masterId:r.id,email:m,countryCode:null==s?void 0:s.country}),c();case 18:case"end":return e.stop()}}),e,null,[[1,7]])})))}return function(){return Re(this,void 0,void 0,De().mark((function t(){return De().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=2;break}return t.abrupt("return");case 2:if(r()){t.next=5;break}return n("Something went wrong! Please try again later."),t.abrupt("return");case 5:if(y!==v.BdmTrialAvailable){t.next=7;break}return t.abrupt("return",(c(),void(a===g.Staff?u(Object.assign({step:"request-bdm-trial"},s)):d({completionStep:"added-to-braze",trialCreated:!1,trialStatus:null}))));case 7:if(a!==g.Staff){t.next=16;break}if(o!==v.Unsupported){t.next=10;break}return t.abrupt("return",(u(Object.assign({step:"add-to-braze",trialStatus:o},s)),void c()));case 10:if(o!==v.UserJoinApprovalRequired){t.next=12;break}return t.abrupt("return",(u(Object.assign({step:"request-access"},s)),void c()));case 12:if(o!==v.UserAutoJoinAllowed||f!==It.X.Lite){t.next=16;break}return t.next=15,k();case 15:case 19:case 22:return t.abrupt("return",t.sent);case 16:if(o===v.Active||o===v.Available||o===v.UserAutoJoinAllowed&&f===It.X.Auth){t.next=20;break}return t.next=19,j();case 20:return t.next=22,C();case 23:case"end":return t.stop()}}),t)})))}}(Object.assign(Object.assign({},t),{prospectStatus:f,loading:w,data:l,canSubmitForm:P,setSubmissionError:y,logStepEvent:function(){var e={actionType:N.Vw.Click,descriptor:N.Yu.FindSchool,workflowPhase:N.eu.Next};t.logUserAction(l||{},e)},setLoadingState:function(t){j(t),O(t),S(t)},setProperty:U}));function P(){if(!l||!o||!a)return!1;var t=l.prospectId;return!!(o&&a&&t)}function U(e,r){"prospectId"===e&&r&&(S(!0),function(t,e,r,n,o){var a=t.prospectStatus(e.prospectId);a=Tt._.urlBuilder(a,{email:e.email}),Lt.fetch({url:a,success:r,error:n,always:o})}(t.ajaxUrls,{prospectId:r.toString(),email:t.email},(function(t){p(t.status)}),(function(){console.log("error")}),(function(){S(!1)}))),u((function(t){return Object.assign(Object.assign({},t),(n={},a=r,(o=function(t){var e=function(t){if("object"!=Ve(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ve(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ve(e)?e:e+""}(o=e))in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a,n));var n,o,a}))}function F(){U("prospectId",void 0),U("schoolName",""),U("schoolPostCode",void 0),y(void 0)}return n.createElement(n.Fragment,null,n.createElement("div",{className:"text-center"},n.createElement("h1",{className:"h4"},"Let's find your school"),n.createElement("p",null,"au"===(null==(r=null===(e=t.geoLocation)||void 0===e?void 0:e.countryCode)?void 0:r.toLowerCase())?"Enter your school postcode or suburb":"us"===(null==r?void 0:r.toLowerCase())?"Enter your school ZIP code or city":"Enter your school postcode or city")),n.createElement(ht,{data:l,setData:function(t){var e=t.longitude,r=t.latitude,n=t.schoolLocality,o=t.country,a=t.city,i=t.province;e&&U("longitude",e),r&&U("latitude",r),o&&U("country",o),a&&U("city",a),i&&U("province",i),n&&U("schoolLocality",n)},clearData:function(){U("schoolLocality",void 0),U("longitude",void 0),U("latitude",void 0),U("city",void 0),U("province",void 0),U("country",void 0),F()},disabled:k,geoLocation:t.geoLocation,labelClassName:"d-none",logUserAction:t.logUserAction,googleMapsApiKey:t.googleMapsApiKey,autoFocus:!0,size:"lg",useGeoLocationApi:!0}),!!(l&&l.schoolLocality&&l.longitude&&l.latitude)&&n.createElement(qe,{data:l,setData:function(t){U("prospectId",t.prospectId),U("schoolName",t.schoolName),U("schoolPostCode",t.schoolPostCode),U("schoolType",t.schoolType),U("province",t.province),U("city",t.city),U("country",t.country)},clearData:F,disabled:C,searchUrl:t.ajaxUrls.searchProspect,onClickNoSuggestions:function(e){t.nextStep({step:"cant-find-school",prospectId:l.prospectId,schoolName:e,schoolLocality:l.schoolLocality,longitude:l.longitude,latitude:l.latitude,country:l.country,city:l.city,province:l.province}),t.logUserAction({},{actionType:N.Vw.Click,descriptor:N.Yu.CantFindSchool,workflowPhase:N.eu.Next})},size:"lg",labelClassName:"d-none"}),m&&n.createElement("p",{className:"text-danger mb-2"},m),P()&&n.createElement(h.m,{className:"btn-lg w-100",variant:"dark",onClick:I,showSpinner:k||C||w,disabled:k||C||w},"Get started"))},"cant-find-school":function(t){var e,r,o,a=zt(n.useState({prospectId:t.prospectId,schoolName:t.schoolName,schoolType:t.schoolType,schoolLocality:t.schoolLocality,country:t.country,province:t.province,city:t.city,longitude:t.longitude,latitude:t.latitude}),2),c=a[0],l=a[1],u=zt(n.useState(),2),f=u[0],p=u[1],d=zt(n.useState(!1),2),m=d[0],y=d[1],b=(r=c.country||(null===(e=t.geoLocation)||void 0===e?void 0:e.countryCode),o=s.I.getCountryCode(r),Rt[o]||Dt);function w(){var t=c.schoolName,e=c.schoolType,r=c.country;return!!(t&&e&&r)}function S(t,e){l((function(r){return Object.assign(Object.assign({},r),(n={},a=e,(o=function(t){var e=function(t){if("object"!=Mt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Mt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Mt(e)?e:e+""}(o=t))in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a,n));var n,o,a}))}function E(e){return Kt(this,void 0,void 0,Bt().mark((function r(){var n,o;return Bt().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n={email:t.email,custom:{accountName:null==c?void 0:c.schoolName,accountAddress:{countryCode:null==c?void 0:c.country,province:x.F.parseProvince(c.province)},orgSubType:x.F.getSchoolType(null==c?void 0:c.schoolType),syncToCrm:!0},event:{accountCountry:null==c?void 0:c.country,accountPostCode:null==c?void 0:c.schoolPostCode,accountState:x.F.parseProvince(c.province)}},o={form_type:"trial-sign-up",prospect_id:null==c?void 0:c.prospectId},t.logBrazeEvent({user:n,event:{eventType:i.ProductFormEvent.FormSubmission,additionalData:o,callback:e}});case 3:case"end":return r.stop()}}),r)})))}return n.createElement(n.Fragment,null,n.createElement("div",{className:"text-center"},n.createElement("h1",{className:"h4"},"Tell us more about your school"),n.createElement("p",null,"Please enter your school details.")),n.createElement("div",{className:"form-group"},n.createElement("label",{className:"d-block",htmlFor:"school-name-input"},"Name of school"),n.createElement("input",{type:"text",value:(null==c?void 0:c.schoolName)||"",onChange:function(t){S("schoolName",t.target.value)},id:"school-name-input",className:"form-control form-control-lg",autoComplete:"off",placeholder:"Enter name of school",autoFocus:!0})),n.createElement("div",{className:"form-group"},n.createElement("label",{className:"d-block",htmlFor:"school-type-select"},"Type of school"),n.createElement("select",{id:"school-type-select",className:"form-select form-select-lg ".concat(c.schoolType?"":"text-secondary"),autoComplete:"off",value:c.schoolType||"none",onChange:function(t){S("schoolType",t.target.value)}},n.createElement("option",{value:"none",className:"text-secondary",disabled:!0},"Select type of school"),b.map((function(t){return n.createElement("option",{value:t,key:t,className:"text-dark"},t)})))),n.createElement(ht,{data:c,setData:function(t){var e=t.longitude,r=t.latitude,n=t.schoolLocality,o=t.country,a=t.city,i=t.province;e&&S("longitude",e),r&&S("latitude",r),o&&S("country",o),a&&S("city",a),i&&S("province",i),n&&S("schoolLocality",n)},clearData:function(){S("schoolLocality",void 0),S("longitude",void 0),S("latitude",void 0),S("city",void 0),S("province",void 0),S("country",void 0),p("")},disabled:!1,labelClassName:"d-block",geoLocation:t.geoLocation,logUserAction:t.logUserAction,googleMapsApiKey:t.googleMapsApiKey,autoFocus:!1,size:"lg",useGeoLocationApi:!0}),f&&n.createElement("div",{className:"text-danger mb-3"},f),w()&&n.createElement(h.m,{className:"btn-lg w-100",variant:"dark",onClick:function(e){var r;return Kt(this,void 0,void 0,Bt().mark((function n(){var o,a,i,l,u;return Bt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e.preventDefault(),w()){n.next=3;break}return n.abrupt("return");case 3:return t.logUserAction(c,{actionType:N.Vw.Click,workflowPhase:N.eu.Next,descriptor:N.Yu.CantFindSchool}),y(!0),n.prev=5,n.next=8,At.create(t.ajaxUrls,{name:c.schoolName,status:Nt.Draft,countryCode:c.country,prospectType:c.schoolType,city:c.city,postCode:c.schoolPostCode,province:x.F.parseProvince(c.province)});case 8:if((o=n.sent).id){n.next=13;break}return y(!1),p("Error. Something went wrong."),n.abrupt("return");case 13:n.next=20;break;case 15:return n.prev=15,n.t0=n.catch(5),y(!1),p("Error. Something went wrong."),n.abrupt("return");case 20:if(t.userTrialStatus!==v.BdmTrialAvailable){n.next=26;break}if(t.userType===g.Staff){n.next=24;break}return t.complete({completionStep:"added-to-braze",trialCreated:!1,trialStatus:null}),n.abrupt("return");case 24:return t.nextStep(Object.assign({step:"request-bdm-trial"},c)),n.abrupt("return");case 26:return n.prev=26,a={prospectId:o.id,email:t.email,userType:t.userType,appLink:t.pageAppLinkString,attribution:Object.assign(Object.assign({},A.N.getDecodedAttributionData()),{utms:T.F.getUtmParameters()})},n.next=30,Ft(t.ajaxUrls,a);case 30:if(i=n.sent,t.createOrUpdateProfile&&t.createOrUpdateProfile({masterId:i.id,email:t.email,countryCode:null==c?void 0:c.country}),l={completionStep:"trial-status",email:t.email,userId:i.id,prospectId:o.id,schoolName:c.schoolName,schoolLocality:c.schoolLocality,country:c.country,schoolType:c.schoolType,city:c.city,schoolPostCode:c.schoolPostCode,latitude:c.latitude,longitude:c.longitude,province:c.province,trialStatus:v.Available,trialCreated:!0,customerId:null===(r=i.data)||void 0===r?void 0:r.customerId},(null==t?void 0:t.userType)!==g.Staff){n.next=37;break}return n.next=36,E((function(e){e||console.error("Failed to submit create trial data to braze."),t.complete(l)}));case 36:return n.abrupt("return");case 37:t.complete(l),n.next=51;break;case 40:if(n.prev=40,n.t1=n.catch(26),n.t1.body){n.next=46;break}return y(!1),p("Error. Something went wrong."),n.abrupt("return");case 46:if(400!==(u=n.t1).body.status||"trial-not-available"!==u.body.type){n.next=50;break}return t.nextStep(Object.assign(Object.assign({step:"add-to-braze"},c),{prospectId:o.id,trialStatus:v.Unavailable})),n.abrupt("return");case 50:console.error(n.t1);case 51:case"end":return n.stop()}}),n,null,[[5,15],[26,40]])})))},showSpinner:m,disabled:m},"Get started"))},completed:function(t){var e=ue[t.completionStep];return n.createElement("div",{className:"d-flex justify-content-center flex-column mx-auto px-2"},n.createElement(e,Object.assign({},t)))},"add-to-braze":function(t){var e,r=C(n.useState(!1),2),o=r[0],a=r[1],l=C(n.useState({}),2),u=l[0],s=l[1];function f(t){s(t?{}:Object.assign(Object.assign({},u),{submission:"Something went wrong! Please try again later."})),a(!1)}function d(){t.complete({completionStep:"added-to-braze",trialCreated:!1,trialStatus:null})}return n.useEffect((function(){t.userType===g.Learner&&t.complete({completionStep:"trial-status",trialCreated:!1,trialStatus:v.Unsupported})}),[]),n.createElement(E,{loading:o,errors:u,setErrors:s,country:t.country||(null===(e=t.geoLocation)||void 0===e?void 0:e.countryCode),logUserAction:t.logUserAction,handleSubmitForm:function(e){(0,k.I)(e.jobTitle)?d():function(e){var r,n,l,h;r=this,n=void 0,l=void 0,h=L().mark((function r(){var n,l,h,m,y;return L().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!o){r.next=2;break}return r.abrupt("return");case 2:if(t.userType!==g.Learner){r.next=5;break}return s(Object.assign(Object.assign({},u),{submission:"Something went wrong! Please try again later."})),r.abrupt("return");case 5:t.logUserAction({},{actionType:c.Vw.Click,workflowPhase:c.eu.Next,descriptor:c.Yu.AddToBraze}),a(!0),n=p(e.fullname),l=n.firstName,h=n.surname;try{m={email:t.email,firstName:l,lastName:h,phone:e.phone,custom:{orgSubType:x.F.getSchoolType(null==t?void 0:t.schoolType),accountName:null==t?void 0:t.schoolName,jobTitle:e.jobTitle,accountAddress:{countryCode:null==t?void 0:t.country,province:x.F.parseProvince((null==t?void 0:t.province)||"")},syncToCrm:!0,source:x.F.SOURCE},event:{accountCountry:null==t?void 0:t.country,accountPostCode:null==t?void 0:t.schoolPostCode,eventTopic:x.F.EVENT_TOPIC}},y={prospect_id:null==t?void 0:t.prospectId},t.logBrazeEvent({user:m,event:{eventType:i.ProductFormEvent.ProductTrailRequested,additionalData:y,callback:f}})}catch(t){s(Object.assign(Object.assign({},u),{submission:"Something went wrong! Please try again later."}))}Object.keys(u).length||d();case 10:case"end":return r.stop()}}),r)})),new(l||(l=Promise))((function(t,e){function o(t){try{i(h.next(t))}catch(t){e(t)}}function a(t){try{i(h.throw(t))}catch(t){e(t)}}function i(e){var r;e.done?t(e.value):(r=e.value,r instanceof l?r:new l((function(t){t(r)}))).then(o,a)}i((h=h.apply(r,n||[])).next())}))}(e)},isTertiary:x.F.isTertiarySchool(t.schoolType)})},"enter-age":function(t){var e=se(n.useState(""),2),r=e[0],o=e[1],a=se(n.useState(""),2),i=a[0],c=a[1],l=se(n.useState(""),2),u=l[0],f=l[1],p=se(n.useState(null),2),h=p[0],m=p[1];var y=(new Date).getFullYear(),v="mx-2 d-inline-block text-start",g="form-control form-control-lg ".concat(h?"is-invalid":""),b="order-0",w="order-3",S=s.I.isCountryCodeUS(t.geoLocation.countryCode);return S&&(b="order-3",w="order-0"),n.createElement("form",{className:"text-center",onSubmit:function(e){if(e.preventDefault(),r&&i&&u?function(t,e,r){var n=new Date(pe(t,e,r));return!isNaN(+n)}(u,i,r)?+u>y?(m("Please enter a date in the past"),0):!(+u<y-120&&(m("Please enter a realistic date of birth"),1)):(m("Please enter a valid date"),0):(m("Please enter your date of birth"),0)){var n=new Date(pe(u,i,r)),o=y-13,a=new Date;a.setFullYear(o),n>a?t.complete({completionStep:"young-student",trialCreated:!1,trialStatus:null}):t.nextStep({step:"enter-email",userType:t.userType})}},noValidate:!0},n.createElement("h1",{className:"h4"},"Tell us a little about yourself"),n.createElement("p",null,"Please enter your date of birth"),n.createElement("div",{className:"my-4"},n.createElement("fieldset",{className:"d-flex justify-content-center","aria-describedby":"dateOfBirthError"},n.createElement("div",{className:"".concat(v," ").concat(b)},n.createElement("label",{className:"mb-0",htmlFor:"day"},"Day"),n.createElement("input",{id:"day",type:"number",className:"".concat(g," ").concat("e0Dbj"),min:"1",max:"31",placeholder:"DD",value:r,onChange:function(t){o(t.target.value),m(null)},autoFocus:!S,tabIndex:S?2:1})),n.createElement("span",{className:"h1 fw-normal mt-3 mb-0 order-1 ".concat(h?"text-danger":"")},"/"),n.createElement("div",{className:"".concat(v," ").concat(w)},n.createElement("label",{className:"mb-0",htmlFor:"month"},"Month"),n.createElement("input",{id:"month",type:"number",className:"".concat(g," ").concat("zLcQr"),min:"1",max:"12",placeholder:"MM",value:i,onChange:function(t){c(t.target.value),m(null)},autoFocus:S,tabIndex:S?1:2})),n.createElement("span",{className:"h1 fw-normal mt-3 mb-0 order-4 ".concat(h?"text-danger":"")},"/"),n.createElement("div",{className:"".concat(v," order-5")},n.createElement("label",{className:"mb-0",htmlFor:"year"},"Year"),n.createElement("input",{id:"year",name:"year",type:"number",className:"".concat(g," ").concat("XiXPP"),min:y-120,max:y,placeholder:"YYYY",value:u,onChange:function(t){f(t.target.value),m(null)},tabIndex:3}))),!!h&&n.createElement(d.A,{name:"dateofBirth"},h)),n.createElement("button",{type:"submit",className:"btn btn-lg btn-dark w-100"},"Continue"))},"request-access":function(t){var e,r,o=(e=n.useState(null),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,r)||function(t,e){if(t){if("string"==typeof t)return Ie(t,e);var r={}.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)?Ie(t,e):void 0}}(e,r)||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.")}()),a=o[0],i=o[1];return n.createElement(n.Fragment,null,n.createElement(Ht,{trialStatus:v.UserJoinApprovalRequired,imageUrls:t.imageUrls}),n.createElement($t,{className:"mb-3"},n.createElement(Vt,null,t.schoolName,n.createElement("br",null),"already has ClickView 🎉")),n.createElement("button",{className:"btn btn-lg btn-dark w-100 mb-3",onClick:function(){var e,r,n,o,a;return r=this,n=void 0,o=void 0,a=Te().mark((function r(){var n,o;return Te().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,At.getLookups(t.ajaxUrls,t.prospectId);case 3:if(n=r.sent,o=null===(e=n.find((function(t){return t.type===Ne.C.MasterId})))||void 0===e?void 0:e.externalId){r.next=8;break}return i("Something went wrong."),r.abrupt("return");case 8:return r.next=10,a=t.ajaxUrls,c={customerId:o,email:t.email},l=void 0,u=void 0,l=a.productName===It.X.Auth?a.joinRequest:a.joinRequest(c.customerId),u=a.productName===It.X.Auth?c:{email:c.email},Lt.asyncFetch({url:l,method:mt.k.POST,data:u});case 10:t.logUserAction({},{actionType:N.Vw.Click,descriptor:N.Yu.RequestAccess}),t.complete({completionStep:"requested-access",trialCreated:!1,trialStatus:v.UserJoinApprovalRequired}),r.next=17;break;case 14:r.prev=14,r.t0=r.catch(0),i(Oe(r.t0));case 17:case"end":return r.stop()}var a,c,l,u}),r,null,[[0,14]])})),new(o||(o=Promise))((function(t,e){function i(t){try{l(a.next(t))}catch(t){e(t)}}function c(t){try{l(a.throw(t))}catch(t){e(t)}}function l(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o((function(t){t(r)}))).then(i,c)}l((a=a.apply(r,n||[])).next())}))}},"Request access"),a&&n.createElement("p",{className:"text-danger text-center mb-2"},a),n.createElement(Wt,{className:"text-center"},"Need Help? ",n.createElement("a",{href:Xt.F.getSupportUrlForGeoLocation(t.geoLocation),className:"info-link",target:"_blank"},"Contact our Help Centre.")))},"request-bdm-trial":function(t){var e,r=Fe(n.useState(!1),2),o=r[0],a=r[1],c=Fe(n.useState({}),2),l=c[0],u=c[1];function f(){var e,r=s.I.getCountryCode(t.country||(null===(e=t.geoLocation)||void 0===e?void 0:e.countryCode));return s.I.getInstanceRegion(r)}function d(t){u(t?{}:Object.assign(Object.assign({},l),{submission:"Something went wrong! Please try again later."})),a(!1)}function h(){t.complete({completionStep:"added-to-braze",trialCreated:!1,trialStatus:null})}return n.createElement(E,{loading:o,errors:l,setErrors:u,country:t.country||(null===(e=t.geoLocation)||void 0===e?void 0:e.countryCode),logUserAction:t.logUserAction,handleSubmitForm:function(e){(0,k.I)(e.jobTitle)?h():function(e){var r,n,c,s,m;n=this,c=void 0,s=void 0,m=Ue().mark((function n(){var c,s,m,y,v,b;return Ue().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!o){n.next=2;break}return n.abrupt("return");case 2:if(t.userType!==g.Learner){n.next=5;break}return u(Object.assign(Object.assign({},l),{submission:"Something went wrong! Please try again later."})),n.abrupt("return");case 5:return t.logUserAction({},{actionType:N.Vw.Click,workflowPhase:N.eu.Next,descriptor:N.Yu.RequestBdmTrial}),a(!0),c=p(e.fullname),s=c.firstName,m=c.surname,n.prev=8,n.next=11,w=t.ajaxUrls,S=t.email,E=f(),w.productName!==It.X.Lite?Promise.reject():Lt.asyncFetch({url:w.brazeCheckEmail,method:mt.k.POST,data:{email:S,instanceRegion:E}});case 11:y=n.sent,v={email:t.email,firstName:s,lastName:m,phone:e.phone,custom:{orgSubType:x.F.getSchoolType(null==t?void 0:t.schoolType),accountName:null==t?void 0:t.schoolName,jobTitle:e.jobTitle,accountAddress:{countryCode:null==t?void 0:t.country,province:x.F.parseProvince((null==t?void 0:t.province)||"")},syncToCrm:0===(null===(r=y.users)||void 0===r?void 0:r.length)||void 0,source:x.F.BDM_SOURCE},event:{eventTopic:x.F.BDM_EVENT_TOPIC}},b={prospect_id:null==t?void 0:t.prospectId},t.logBrazeEvent({user:v,event:{eventType:i.ProductFormEvent.BdmTrialRequested,additionalData:b,callback:d}}),n.next=20;break;case 17:n.prev=17,n.t0=n.catch(8),u(Object.assign(Object.assign({},l),{submission:"Something went wrong! Please try again later."}));case 20:Object.keys(l).length||h();case 21:case"end":return n.stop()}var w,S,E}),n,null,[[8,17]])})),new(s||(s=Promise))((function(t,e){function r(t){try{a(m.next(t))}catch(t){e(t)}}function o(t){try{a(m.throw(t))}catch(t){e(t)}}function a(e){var n;e.done?t(e.value):(n=e.value,n instanceof s?n:new s((function(t){t(n)}))).then(r,o)}a((m=m.apply(n,c||[])).next())}))}(e)},isTertiary:x.F.isTertiarySchool(t.schoolType)})},"select-idp":function(t){var e,r,o=(e=n.useState(null),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,r)||function(t,e){if(t){if("string"==typeof t)return er(t,e);var r={}.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)?er(t,e):void 0}}(e,r)||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.")}()),a=o[0],i=o[1];function c(t){if(t){var e=window.location.pathname+window.location.search;window.location.href="/challenge?idp=".concat(t.id)+"&redirectUrl="+encodeURIComponent(e)}}return n.createElement(n.Fragment,null,n.createElement("div",{className:"text-center"},n.createElement("h1",{className:"h4"},"Does your school already have ClickView?"),n.createElement("p",null,"Find your school from the list below")),t.idps.length>4?n.createElement(n.Fragment,null,n.createElement(tr,{id:"idp",item:a,items:t.idps,onSelect:i,getName:function(t){return t.name},clearData:function(){return i(null)},placeholder:"Select a school",size:"lg"}),n.createElement("button",{className:"btn btn-lg btn-dark w-100 mb-3",disabled:!a,onClick:function(){return c(a)}},"Continue")):t.idps.map((function(t,e){return n.createElement("button",{key:e,className:"btn btn-lg w-100 mb-3",onClick:function(){return c(t)},style:{backgroundColor:"#".concat(rr[e%rr.length]),color:"#FFF"}},t.name)})),n.createElement("button",{className:"btn btn-link text-info w-100 no-sso-link",onClick:function(){t.logUserAction({},{actionType:N.Vw.Click,workflowPhase:N.eu.Next,descriptor:N.Yu.SkipIdpSelect}),t.nextStep({step:"find-school",email:t.email,userTrialStatus:t.userTrialStatus})}},"My school does not have ClickView"))}};function ar(t){var e=t.state,r=t.geoLocation,o=t.layout,a=t.hasPreviousStep,i=t.googleMapsApiKey,c=t.pageAppLinkString,l=t.back,u=t.nextStep,s=t.complete,f=t.logUserAction,p=t.logBrazeEvent,d=t.imageUrls,h=t.ajaxUrls,m=t.productName,y=t.getSignInUrl,v=t.globalIdps,g=t.createOrUpdateProfile,b=or[e.currentStepId],w=Object.assign(Object.assign({},e),{geoLocation:r,googleMapsApiKey:i,pageAppLinkString:c,back:l,nextStep:u,complete:s,logUserAction:f,imageUrls:d,ajaxUrls:h,productName:m,getSignInUrl:y,logBrazeEvent:p,globalIdps:v,createOrUpdateProfile:g}),S=o;return S?n.createElement(S,{geoLocation:t.geoLocation,currentStep:e.currentStepId,previousStep:l,closeApp:t.close,logUserAction:f,hasPreviousStep:a,imageUrls:t.imageUrls,getSignInUrl:y},n.createElement(b,Object.assign({},w))):n.createElement(b,Object.assign({},w))}var ir=r(1048);const cr={buttonContainer:"izZtA",dataContainer:"OgBv5"};function lr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function ur(t){var e={};return Object.keys(t).forEach((function(r){var n=t[r];ir.t.isObject(n)&&null!==n&&!Array.isArray(n)?Object.assign(e,ur(n)):e[r]=n})),e}function sr(t){var e=t.label,r=t.item,o=r;return Array.isArray(r)&&(o=o.join(" -> ")),"boolean"==typeof o&&(o=o?"true":"false"),n.createElement("div",{className:"pb-1"},e,": ",n.createElement("b",{className:"text-white"},o))}function fr(t){var e,r,o=t.developmentEnv,a=t.objects,i=(e=n.useState(!0),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,r)||function(t,e){if(t){if("string"==typeof t)return lr(t,e);var r={}.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)?lr(t,e):void 0}}(e,r)||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.")}()),c=i[0],l=i[1],u=n.useMemo((function(){return ur(a)}),[a]);return o&&n.createElement(n.Fragment,null,n.createElement("div",{className:"position-fixed p-4 ".concat(cr.buttonContainer)},n.createElement("button",{onClick:function(){l(!c)},className:"btn btn-dark px-2 py-1"},c?"Hide":"Show"," debugger")),c&&n.createElement("div",{className:"fixed-bottom mb-4 ms-4 bg-dark rounded ".concat(cr.dataContainer)},n.createElement("code",{className:"d-block p-4"},n.createElement("div",{className:"fw-bold pb-2"},"{ Debug: Form Data }"),Object.keys(u).map((function(t){return n.createElement(sr,{key:t,label:t,item:u[t]})})))))}var pr=r(83529);function dr(t,e){var r=t===e?"bg-blue":"bg-light";return"".concat("rounded-circle mx-2 d-inline-block Btmx2"," ").concat(r)}function hr(t){return n.createElement("div",{className:"text-center"},t.crumbs.map((function(e){return n.createElement("div",{className:dr(t.currentStep,e),key:e})})))}var mr=r(98461);function yr(t){var e=Xt.F.getTermsAndConditionsLink(),r=Xt.F.getPrivacyPolicyLink();return n.createElement("span",{className:"text-center text-md mt-2 text-normal small"},"By signing up you agree to the",n.createElement("br",null),n.createElement(mr.d,{href:e,onClick:t.onClickTermsAndConditions,className:"info-link",newTab:!0},"Terms and Conditions"),"  and  ",n.createElement(mr.d,{href:r,onClick:t.onClickPrivacyPolicy,className:"info-link",newTab:!0},"Privacy Policy"))}var vr=r(83914),gr=r(35223);function br(t){return n.createElement("button",{onClick:t.onClick,className:"btn p-0 cursor-pointer d-inline-flex align-items-center"},n.createElement(vr.x,{svgName:gr.vn.ChevronLeft,size:vr.S.Medium}),t.children)}var wr=r(2786);var Sr=["enter-email","find-school","cant-find-school","add-to-braze","enter-age","request-access","request-bdm-trial","select-idp"],Er=["enter-email","find-school","add-to-braze"],xr=["enter-email","find-school","cant-find-school","add-to-braze","enter-age","request-bdm-trial","select-idp"],kr=["select-type"],jr=["select-type"];Cr.defaultProps={showBackButton:!0};var Lr=["select-type","enter-email","find-school"];function Cr(t){var e=t.currentStep,r=t.previousStep,o=t.hasPreviousStep,a=t.showBackButton,i=t.children;return n.createElement("div",{className:"d-flex flex-column justify-content-between px-4 py-0 ".concat("jZ_Wp")},n.createElement("div",{className:"mt-3 mb-2"},Lr.includes(e)&&n.createElement(hr,{crumbs:Lr,currentStep:e})),n.createElement("div",{className:"position-relative mx-auto w-100 ".concat(kr.includes(e)?"Ye154":xr.includes(e)?"m2kAT":"ollkc")},n.createElement("div",{className:"d-flex flex-row justify-content-center align-items-center mt-2 mb-3"},o&&a&&Sr.includes(e)&&n.createElement(br,{onClick:function(){r(),t.logUserAction({step:e},{actionType:N.Vw.Click,descriptor:N.Yu.Back,workflowPhase:N.eu.Back})}}),n.createElement("div",{className:"d-flex justify-content-center align-items-center px-2 ".concat("J97w_")},n.createElement(wr.$S,null))),i),n.createElement("div",{className:"position-relative mb-4 mt-3 text-center"},jr.includes(e)&&n.createElement(de.f,{link:t.getSignInUrl(),onClick:function(){t.logUserAction({},{actionType:N.Vw.Click,descriptor:N.Yu.SignIn})}}),Er.includes(e)&&n.createElement(yr,{onClickTermsAndConditions:function(){t.logUserAction({},{actionType:N.Vw.Click,descriptor:N.Yu.TermsAndConditions})},onClickPrivacyPolicy:function(){t.logUserAction({},{actionType:N.Vw.Click,descriptor:N.Yu.PrivacyPolicy})}})))}var Or=r(68139);Tr.defaultProps={showBackButton:!0};var Nr=["enter-email","find-school"],Ar=["enter-email","find-school","cant-find-school","add-to-braze","enter-age","request-access","request-bdm-trial","select-idp"];function Tr(t){var e=t.currentStep,r=t.previousStep,o=t.hasPreviousStep,a=t.showBackButton,i=t.closeApp,c=t.children,l="select-idp"===e?"find-school":e;function u(){return["enter-email","find-school","cant-find-school","add-to-braze","enter-age","request-bdm-trial","select-idp"].includes(e)}function s(){r(),t.logUserAction({},{actionType:N.Vw.Click,descriptor:N.Yu.Back,workflowPhase:N.eu.Back})}var f=Ar.includes(t.currentStep),p=f?"".concat(Or.Z.leftHalfLayout," ").concat(Or.Z.withBg):Or.Z.leftHalfLayout;return n.createElement("div",{className:p},n.createElement("div",{className:"row mx-0 p-3"},n.createElement("div",{className:"col px-0 d-lg-none ".concat(Or.Z.popupButton)},o&&u()&&a&&n.createElement(br,{onClick:s})),n.createElement("div",{className:"col col-lg-6 px-0"},n.createElement("div",{className:Or.Z.logo},n.createElement("div",{className:"d-none d-lg-block"},f?n.createElement(wr.Yo,null):n.createElement(wr.$S,null)),n.createElement("div",{className:"d-block d-lg-none mt-1"},n.createElement(wr.$S,null),Nr.includes(l)&&n.createElement("div",{className:"mt-3"},n.createElement(hr,{crumbs:Nr,currentStep:l}))))),n.createElement("div",{className:"col col-lg-6 d-flex flex-row justify-content-between px-0"},n.createElement("div",{className:"px-3"},n.createElement("div",{className:"d-none d-lg-block ".concat(Or.Z.popupButton)},o&&u()&&a&&n.createElement(br,{onClick:s}))),Nr.includes(l)&&n.createElement("div",{className:"d-none d-lg-block align-self-center"},n.createElement(hr,{crumbs:Nr,currentStep:l})),n.createElement(rt.L,{onClick:i,className:Or.Z.popupButton},n.createElement(vr.x,{svgName:gr.vn.Close,size:vr.S.Medium})))),n.createElement("div",{className:"row mx-0 flex-grow-1"},f&&n.createElement("div",{className:"col-6 px-0 d-none d-lg-block"},n.createElement("div",{className:"h-100 d-flex align-items-center justify-content-center"},n.createElement("img",{src:t.imageUrls.popupDashboard,className:"w-100 p-4 pb-5 ".concat(Or.Z.leftImage)}))),n.createElement("div",{className:"px-4 pt-0 pb-4 ".concat(f?"col-12 col-lg-6":"col-12")},n.createElement("div",{className:"d-flex flex-column h-100"},n.createElement("div",{className:"flex-grow-1"},c),n.createElement("div",{className:"text-center mt-3"},"select-type"===e&&n.createElement(de.f,{link:t.getSignInUrl(),onClick:function(){t.logUserAction({},{actionType:N.Vw.Click,descriptor:N.Yu.SignIn})}}),["enter-email","add-to-braze"].includes(e)&&n.createElement(yr,{onClickTermsAndConditions:function(){t.logUserAction({},{actionType:N.Vw.Click,descriptor:N.Yu.TermsAndConditions})},onClickPrivacyPolicy:function(){t.logUserAction({},{actionType:N.Vw.Click,descriptor:N.Yu.PrivacyPolicy})}}))))))}function Ir(t){return Ir="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},Ir(t)}function Pr(t,e,r){return(e=function(t){var e=function(t){if("object"!=Ir(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ir(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ir(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ur=Pr(Pr({},pr.c.FullPage,Cr),pr.c.Popup,Tr),Fr={getLayouts:function(t){return Ur[t]}},_r=r(17331);function Gr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function Dr(t){return Dr="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},Dr(t)}function Rr(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,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||Mr(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 Mr(t,e){if(t){if("string"==typeof t)return Br(t,e);var r={}.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)?Br(t,e):void 0}}function Br(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function zr(t,e){var r,n,o=Object.assign(Object.assign({},t),{previousStepIds:[].concat((n=t.previousStepIds,function(t){if(Array.isArray(t))return Br(t)}(n)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(n)||Mr(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[t.currentStepId]),currentStepId:e.step});if("select-type"===e.step)return Object.assign({},o);if("enter-email"===e.step||"enter-age"===e.step)return Object.assign(Object.assign({},o),{userType:e.userType});if("select-idp"===e.step)return Object.assign(Object.assign({},o),{email:e.email,userTrialStatus:e.userTrialStatus,idps:e.idps});if("find-school"===e.step)return Object.assign(Object.assign({},o),{email:e.email,userTrialStatus:e.userTrialStatus});if("cant-find-school"===e.step)return Object.assign(Object.assign({},o),{prospectId:e.prospectId,schoolName:e.schoolName,schoolLocality:e.schoolLocality,country:e.country,longitude:e.longitude,latitude:e.latitude,city:e.city,province:e.province});if("add-to-braze"===e.step||"completed"===e.step||"request-access"===e.step||"request-bdm-trial"===e.step){var a=Object.assign({},e);return delete a.type,delete a.step,r=a,a=Object.entries(r).filter((function(t){return null!==Rr(t,2)[1]})).reduce((function(t,e){var r=Rr(e,2),n=r[0],o=r[1];return Object.assign(Object.assign({},t),function(t,e,r){return(e=function(t){var e=function(t){if("object"!=Dr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Dr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Dr(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}({},n,o))}),{}),Object.assign(Object.assign({},o),a)}}function Yr(t,e){switch(e.type){case"nextStep":return zr(t,e);case"back":return function(t){var e,r=function(t){if(Array.isArray(t))return Gr(t)}(e=t.previousStepIds)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return Gr(t,e);var r={}.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)?Gr(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=r.pop();return Object.assign(Object.assign({},t),{previousStepIds:r,currentStepId:n})}(t)}}function Kr(t){return Kr="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},Kr(t)}function qr(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,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Vr(t,e);var r={}.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)?Vr(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 Vr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var $r=function(t){var e=t.location,r=t.initialValues,o=t.onStepUpdate,a=t.externalLogUserAction,i=x.F.removeEmptyKeys(r),l=Object.assign({currentStepId:"select-type",previousStepIds:[]},i),u=qr(n.useReducer(Yr,l),2),s=u[0],f=u[1];return n.useEffect((function(){null==o||o(s)}),[s.currentStepId]),{state:s,back:function(){f({type:"back"})},nextStep:function(t){f(Object.assign({type:"nextStep"},t))},complete:function(t){f(Object.assign({type:"nextStep",step:"completed"},t))},hasPreviousStep:!!s.previousStepIds.length,logUserAction:function(t,r){var n=Object.assign(Object.assign({},s),t),o=_r.i.filterBlacklistedKeys(n),i=Object.assign({currentStepId:s.currentStepId},o),l=Object.entries(i).filter((function(t){return void 0!==qr(t,2)[1]})).reduce((function(t,e){var r,n,o,a=qr(e,2),i=a[0],c=a[1];return Object.assign(Object.assign({},t),(r={},o=c,(n=function(t){var e=function(t){if("object"!=Kr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Kr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Kr(e)?e:e+""}(n=i))in r?Object.defineProperty(r,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[n]=o,r))}),{});a(l,Object.assign({entity:c.py.SignUp,location:e},r))}}};function Wr(t){var e=Fr.getLayouts(t.type),r=t.location,i=t.initialValues,c=t.geoLocation,l=t.googleMapsApiKey,u=t.pageAppLinkString,s=t.onStepUpdate,f=t.imageUrls,p=t.ajaxUrls,d=t.productName,h=t.close,m=t.getSignInUrl,y=t.globalIdps,v=t.logBrazeEvent,g=t.createOrUpdateProfile,b=$r({location:r,initialValues:i,onStepUpdate:s,externalLogUserAction:a.k.logUserAction}),w=b.back,S=b.nextStep,E=b.complete,x=b.hasPreviousStep,k=b.state,j=b.logUserAction,L={state:k,geoLocation:c,layout:e,hasPreviousStep:x,googleMapsApiKey:l,pageAppLinkString:u,back:w,close:h,nextStep:S,complete:E,logUserAction:j,imageUrls:f,ajaxUrls:p,productName:d,getSignInUrl:m,globalIdps:y,logBrazeEvent:v,createOrUpdateProfile:g};return n.useEffect((function(){o.SG.get(le)&&E({completionStep:"young-student",trialCreated:!1,trialStatus:null})}),[]),n.createElement(n.Fragment,null,n.createElement(ar,Object.assign({},L)),n.createElement(fr,{developmentEnv:!1,objects:Object.assign(Object.assign(Object.assign({},k),{pageAppLinkString:u}),c)}))}},82631:(t,e,r)=>{r.d(e,{B:()=>s});var n=r(32735),o=r(66187),a=r(66122);function i(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,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var r={}.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)?c(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 c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var l="OTHER";function u(t,e){return e.includes(t)?t:t?l:""}function s(t){var e=t.error,r=t.onChange,c=t.countryCode,s=t.isTertiary,f=(0,o.o)({countryCode:c,isTertiary:s}),p=u(t.initialValue,f),d=i(n.useState(p),2),h=d[0],m=d[1],y=i(n.useState(p===l?t.initialValue:""),2),v=y[0],g=y[1];n.useEffect((function(){m(u(t.initialValue,f))}),[t.initialValue]);var b=h===l;return n.createElement("div",{className:"form-group"},n.createElement("label",{htmlFor:t.id,className:t.labelClassName},"Job title",t.required&&n.createElement("span",{className:"text-danger"},"*")),n.createElement("div",{className:"mb-2"},n.createElement("select",{id:t.id,name:t.id,className:"form-select ".concat("lg"===t.size?"form-select-lg":""," ").concat(h.length?"text-dark":"text-secondary"," ").concat(!!e&&"is-invalid"),value:h,placeholder:"Role",onChange:function(t){m(t.target.value),g(""),r(t.target.value===l?"":t.target.value)}},n.createElement("option",{value:"",disabled:!0,className:"text-secondary"},t.placeholder?t.placeholder:n.createElement(n.Fragment,null,"What do you do?")),f.map((function(t,e){return n.createElement("option",{value:t,className:"text-dark",key:e},t)})),n.createElement("option",{value:l,className:"text-dark"},"Other")),!!e&&!b&&n.createElement(a.A,{name:t.id},e)),b&&n.createElement("div",{className:"mb-3"},n.createElement("input",{className:"form-control ".concat("lg"===t.size?"form-select-lg":""," ").concat(!!e&&"is-invalid"),type:"text",value:v,placeholder:"What do you do?",autoFocus:!0,onChange:function(t){g(t.target.value),r(t.target.value)}}),!!e&&n.createElement(a.A,{name:t.id},e)))}},83529:(t,e,r)=>{var n;r.d(e,{c:()=>n}),function(t){t.Popup="popup-form",t.FullPage="full-page-form"}(n||(n={}))},12238:(t,e,r)=>{var n;r.d(e,{C:()=>n}),function(t){t.MasterId="master_id",t.CrmId="crm_id",t.SalesforceId="salesforce_id"}(n||(n={}))},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:()=>s});var n=r(33003),o=r.n(n);function a(t){return a="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},a(t)}function i(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,a,i,c=[],l=!0,u=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return c(t,e);var r={}.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)?c(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 c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var l={secondary:{label:"Secondary",isTertiary:!1},"primary & secondary":{label:"Primary & Secondary",isTertiary:!1},k12:{label:"Primary & Secondary",isTertiary:!1},primary:{label:"Primary",isTertiary:!1},special:{label:"Special",isTertiary:!1},university:{label:"University",isTertiary:!0},middle:{label:"Middle",isTertiary:!1},"fe college":{label:"FE College",isTertiary:!0},"high school":{label:"Secondary",isTertiary:!1},elementary:{label:"Primary",isTertiary:!1},"middle school":{label:"Middle",isTertiary:!1},tafe:{label:"TAFE",isTertiary:!0},college:{label:"FE College",isTertiary:!0},"sixth form college":{label:"Sixth Form College",isTertiary:!0}},u={england:"ENG",scotland:"SCT",wales:"WLS","northern ireland":"NIR"},s={hashedEmail:function(t){var e=t.trim().toLowerCase();return o().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=i(t,2)[1];return null!=e&&!("string"==typeof e&&!e.length)})).reduce((function(t,e){var r,n,o,c=i(e,2),l=c[0],u=c[1];return Object.assign(Object.assign({},t),(r={},n=l,o=u===Object(u)?s.removeEmptyKeys(u):u,(n=function(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}(n))in r?Object.defineProperty(r,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[n]=o,r))}),{})},EVENT_TOPIC:"Free Trial Request",BDM_EVENT_TOPIC:"Requested free trial (Streamable Customer)",SOURCE:"cv_product_trial_requested",BDM_SOURCE:"cv_product_bdm_trial_requested",getSchoolType:function(t){var e;if(t){var r=t.toLowerCase();if(!["unknown","other"].includes(r))return(null===(e=l[r])||void 0===e?void 0:e.label)||t}},isTertiarySchool:function(t){var e;return(null===(e=l[null==t?void 0:t.toLowerCase()])||void 0===e?void 0:e.isTertiary)||!1},parseProvince:function(t){return t.length?u[t.toLowerCase()]||t:""}}},17331:(t,e,r)=>{r.d(e,{i:()=>o});var n=["email","longitude","latitude","trialCreated","idps"],o={filterBlacklistedKeys:function(t){var e=Object.assign({},t);return n.forEach((function(t){return delete e[t]})),e}}},69624:(t,e,r)=>{r.d(e,{F:()=>s});var n=r(86664),o=r(93824);function a(t){return a="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},a(t)}function i(t,e,r){return(e=function(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var c={Marketing:{au:"https://www.clickvieweducation.com/en-au",us:"https://www.clickvieweducation.com",nz:"https://www.clickview.co.nz",uk:"https://www.clickview.co.uk"},Support:{au:"https://www.clickviewsupport.com/hc/en-au",uk:"https://www.clickviewsupport.com/hc/en-au#gb",nz:"https://www.clickviewsupport.com/hc/en-au#nz",us:"https://www.clickviewsupport.com/hc/en-au#us"}},l=i(i(i(i({},o.C.AU,"/contact-us/sales"),o.C.US,"/contact-us/sales"),o.C.NZ,"/contact-us/"),o.C.UK,"/contact-us/trial"),u=i(i(i(i({},o.C.AU,"/resources/free-student-resources"),o.C.US,"/resources/free-student-resources"),o.C.NZ,"/free-student-resources/"),o.C.UK,"/free-student-resources/"),s={getMarketingUrlForGeoLocation:function(t){var e=n.I.getCountryCode(null==t?void 0:t.countryCode);return c.Marketing[e]||c.Marketing.us},getMarketingSalesContactForGeoLocation:function(t){var e=n.I.getCountryCode(null==t?void 0:t.countryCode),r=s.getMarketingUrlForGeoLocation(t),o=l[e];return"".concat(r).concat(o)},getFreeResourcesForGeoLocation:function(t){var e=n.I.getCountryCode(null==t?void 0:t.countryCode),r=this.getMarketingUrlForGeoLocation({countryCode:e}),o=u[e];return"".concat(r).concat(o)},getTermsAndConditionsLink:function(){return this.getMarketingUrlForGeoLocation(o.C.US)+"/terms-and-conditions/"},getPrivacyPolicyLink:function(){return this.getMarketingUrlForGeoLocation(o.C.US)+"/privacy-policy/"},getSupportUrlForGeoLocation:function(t){var e=n.I.getCountryCode(null==t?void 0:t.countryCode);return c.Support[e]||c.Support.us}}},66187:(t,e,r)=>{r.d(e,{I:()=>m,o:()=>h});var n=r(93824),o=r(19808);function a(t){return a="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},a(t)}function i(t,e,r){return(e=function(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var c=["Teacher","Librarian / Teacher Librarian","Curriculum Coordinator","Digital Technology Coordinator","SSO / SLSO","IT","Head of Department","Head of Subject","Assistant Principal","Deputy Principal","Principal"],l=["Teacher","Librarian / Teacher Librarian","IT/LRC","e-Learning/ICT Coordinator","Head of Key Stage","Head of Department","Subject Lead","Assistant Head Teacher","Deputy Head Teacher","Head Teacher"],u=["Teacher","Librarian / Teacher Librarian","Head of Department","Instructional Technology Specialist","Curriculum Coordinator","School Leadership","District Leadership","Academic Coach","Principal","IT / IT Specialist"],s=["Professor","Lecturer","Course Coordinator / Administrator","Digital Learning Manager","Tutor","Teaching Fellow","Librarian","Learning Technologist","Teaching Assistant","Researcher","IT"],f=["Professor","Lecturer","Course Coordinator / Administrator","Digital Learning Manager","Tutor","Teaching Fellow","Librarian","Learning Technologist","Teacher","Teaching Assistant","Researcher","IT"],p=i(i(i(i(i(i(i(i({},o.b.AU,c),o.b.NZ,c),o.b.UK,l),o.b.US,u),n.C.AU,c),n.C.NZ,c),n.C.UK,l),n.C.US,u),d=i(i(i(i({},o.b.AU,s),o.b.UK,f),n.C.AU,s),n.C.UK,f);function h(t){var e="instanceRegion"in t?t.instanceRegion:t.countryCode;return t.isTertiary?d[null==e?void 0:e.toLowerCase()]||s:p[null==e?void 0:e.toLowerCase()]||u}function m(t){return(null==t?void 0:t.toLowerCase().includes("student"))||(null==t?void 0:t.toLowerCase().includes("parent"))}},66122:(t,e,r)=>{r.d(e,{A:()=>o});var n=r(32735);function o(t){return n.createElement("span",{id:"".concat(t.name,"Error"),className:"".concat(t.className," invalid-feedback d-block"),role:"status"},t.children)}},53475:(t,e,r)=>{r.d(e,{N:()=>n});var n={globalIdps:function(t,e){return{url:"{gateway}/v1/auth/identity-providers?countryCode=".concat(t,"&product=").concat(e),key:"global:idps"}}}},98137:(t,e,r)=>{r.d(e,{x:()=>a});var n=r(70624),o=r(57157);function a(){return{createOrUpdateProfile:(0,n.f)(o.K.ProfileApiClient).createOrUpdate}}},48015:(t,e,r)=>{r.d(e,{M:()=>c});var n=r(39202),o=r(20354),a=r(39151),i={countryCode:"us",isFallback:!0};function c(){var t,e,r=o.a.useBasicFetch(a.L.geoLocation()),c=null===(e=null===(t=n.Ab.GetQuery())||void 0===t?void 0:t.countryCode)||void 0===e?void 0:e.toLowerCase();return c?{countryCode:c}:r.hasCompleted&&!r.data?i:r.data}},48456:(t,e,r)=>{r.d(e,{v:()=>o});var n=r(99742),o={popupDashboard:n.W.SignUp.POPUP_DASHBOARD,educator:n.W.SignUp.EDUCATOR,student:n.W.SignUp.STUDENT,statusImages:{available:n.W.SignUp.VERIFY_ACCOUNT,active:n.W.SignUp.EXISTING_CUSTOMER,expired:n.W.SignUp.EXPIRED_TRIAL,notRequired:n.W.SignUp.EXISTING_CUSTOMER,unavailable:n.W.SignUp.NOT_AVAILABLE,unsupported:n.W.SignUp.NOT_AVAILABLE,autoJoin:n.W.SignUp.EXISTING_CUSTOMER,requestAccess:n.W.SignUp.EXISTING_CUSTOMER}}},63643:(t,e,r)=>{r.d(e,{c:()=>c});var n=r(97395),o=r(20354),a=r(84789),i=r(39151);function c(){var t=o.a.useBasicFetch(i.L.config());if(!t.hasCompleted)return null;var e=t.data.gatewayApiUrl;return{productName:a.X.Lite,userStatus:n._.safeUrlConcat(e,"/v1/users/trial-status"),idps:"/api/user/trials/idps",prospectStatus:function(t){return n._.safeUrlConcat(e,"/v1/prospects/".concat(t,"/trial-status"))},createTrial:"/api/user/trials",resendTrialEmail:function(t){return"/api/user/trials/users/".concat(t,"/send-activation-email")},searchProspect:n._.safeUrlConcat(e,"/v1/search/prospects"),createProspect:"/api/prospects",prospectLookups:function(t){return n._.safeUrlConcat(e,"/v1/prospects/".concat(t,"/lookups"))},autoJoin:"/api/user/trials/auto-join",joinRequest:function(t){return"/api/user/customers/".concat(t,"/join-requests")},brazeCheckEmail:"/api/braze/check-email"}}},68139:(t,e,r)=>{r.d(e,{Z:()=>n});const n={logo:"Kh4Dd",modalBody:"V9nIN",popupButton:"hS60U",leftImage:"kDU8y",leftHalfLayout:"aQ1K8",withBg:"zALxE"}}}]);
3
+ //# sourceMappingURL=1667-fcdff22585-lite.chunk.js.map