1/*! For license information please see checkout-next-auth-signup.f030d13633dbd453a411.min.js.LICENSE.txt */ 2"use strict";(self.webpackChunkVectorStockWebsite=self.webpackChunkVectorStockWebsite||[]).push([[7431],{38287(t,e,i){i.d(e,{S:()=>p});var n=i(15297),r=i(7546);function o(t){return o="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},o(t)}function a(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,s(n.key),n)}}function s(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}function c(t,e,i){return e=u(e),function(t,e){if(e&&("object"==o(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,l()?Reflect.construct(e,i||[],u(t).constructor):e.apply(t,i))}function l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(l=function(){return!!t})()}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}var p=function(t){function e(t){var i,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=c(this,e)).input=t,i.label=t.closest("label"),i.notice=null,!i.label)throw new Error("Checkbox input must be wrapped in a <label>");return i.checked=i.input.checked,i.value=!!i.checked&&i.input.value,i.disabled=t.disabled,t.addEventListener("change",function(){return i._update()}),n&&(i.input.checked=!0,i._update(!0)),i}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&&d(t,e)}(e,t),i=e,n=[{key:"_update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.checked=this.input.checked,this.value=!!this.checked&&this.input.value,this.label.classList.toggle("checked",this.checked),t||this.triggerEvent("change",this.value)}},{key:"disable",value:function(){this.label.classList.add("disabled"),this.input.disabled=!0,this.disabled=!0}},{key:"enable",value:function(){this.label.classList.remove("disabled"),this.input.disabled=!1,this.disabled=!1}},{key:"check",value:function(){this.input.checked||(this.input.checked=!0,this._update(!0))}},{key:"uncheck",value:function(){this.input.checked&&(this.input.checked=!1,this._update(!0))}},{key:"toggle",value:function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:!this.checked)?this.check():this.uncheck()}},{key:"showError",value:function(t){var e=this;this.label.dataset.error=1;var i,n,o=!1;this.notice?(i=this.notice.querySelector(".icon"),n=this.notice.querySelector(".label")):(this.notice=document.createElement("div"),this.notice.classList.add("notice"),this.label.parentNode.insertBefore(this.notice,this.label.nextSibling),(i=document.createElement("span")).classList.add("icon"),this.notice.appendChild(i),(n=document.createElement("span")).classList.add("label"),this.notice.appendChild(n),o=!0),i.innerHTML=r.H.generateSVGIcon("global","error"),n.textContent=t,o&&requestAnimationFrame(function(){var t;null===(t=e.notice)||void 0===t||t.classList.add("reveal")}),this.addEventListener("change",function(){e.clearError()},{once:!0})}},{key:"clearError",value:function(){this.label.removeAttribute("data-error"),this.notice&&(this.notice.remove(),this.notice=null)}}],n&&a(i.prototype,n),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,n}(n.b)},10226(t,e,i){i.r(e),i.d(e,{FormSignup:()=>x});var n=i(16919),r=i(9914),o=i(95745),a=i(38287),s=i(7546),c=i(22451);function l(t){return l="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},l(t)}function u(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,d(n.key),n)}}function d(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=l(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}var p=function(){return t=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.input,r=e.t,o=e.onStatusChange;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.input=i,this.t=r,this.onStatusChange="function"==typeof o?o:null,this.apiService=n.apiService,this._cache=new Map,this._isWatching=!1,this._onChange=this._onChange.bind(this),this._onInput=this._onInput.bind(this)},(e=[{key:"_onChange",value:function(){this.validateFormat()&&(this.stopWatching(),this.validateServer())}},{key:"_onInput",value:function(){this.clearError(),this._notify("idle")}},{key:"_showError",value:function(t){var e,i,n,r,o,a,s,c,l,u,d,p,h,f,v;
2"EMAIL_EMPTY"!==t?"EMAIL_INVALID"!==t?"EMAIL_REGISTERED"!==t?"REQUEST_INVALID"!==t?null===(e=(i=this.input).showError)||void 0===e||e.call(i,(null===(n=this.t)||void 0===n?void 0:n.call(this,"warnings.email.invalid"))||"Enter a valid email address.",!1,!0):null===(r=(o=this.input).showError)||void 0===r||r.call(o,(null===(a=this.t)||void 0===a?void 0:a.call(this,"warnings.email.failed"))||"Could not validate this address.",!1,!0):null===(s=(c=this.input).showError)||void 0===s||s.call(c,(null===(l=this.t)||void 0===l?void 0:l.call(this,"warnings.email.registered"))||"This email is already registered.",!1,!0):null===(u=(d=this.input).showError)||void 0===u||u.call(d,(null===(p=this.t)||void 0===p?void 0:p.call(this,"warnings.email.invalid"))||"Enter a valid email address.",!1,!0):null===(h=(f=this.input).showError)||void 0===h||h.call(f,(null===(v=this.t)||void 0===v?void 0:v.call(this,"warnings.email.empty"))||"Please enter your email.",!1,!0)}},{key:"_currentEmailID",value:function(){return s.H.generateEmailID(this.input.value)||null}},{key:"_notify",value:function(t){if(this.onStatusChange)try{this.onStatusChange(t)}catch(t){}}},{key:"validateFormat",value:function(){var t=s.H.validateEmailAddress(this.input.value);return t.valid?(this.clearError(),this._notify("idle"),!0):(this._showError(t.error||"EMAIL_INVALID"),this._notify("formatError"),!1)}},{key:"validateServer",value:function(){var t=this;if(!this.validateFormat())return Promise.resolve(!1);var e=s.H.generateEmailID(this.input.value);if(!e)return Promise.resolve(!1);if(this._cache.has(e)){var i=this._cache.get(e);return i?(this._showError(i),this._notify("registered"),this.startWatching(),Promise.resolve(!1)):(this.clearError(),this._notify("ok"),Promise.resolve(!0))}return this._notify("checking"),this.apiService.post(c.Routes.API.AUTH.EMAIL_VALIDATE,{email:e}).then(function(){return t._currentEmailID()===e&&(t.clearError(),t._notify("ok")),t._cache.set(e,""),!0}).catch(function(i){var n=(null==i?void 0:i.code)||"EMAIL_INVALID";return t._currentEmailID()===e&&(t._showError(n),t._notify({REQUEST_INVALID:"failed",EMAIL_INVALID:"invalid",EMAIL_REGISTERED:"registered"}[n])),t._cache.set(e,n),!1}).finally(function(){t.startWatching()})}},{key:"startWatching",value:function(){this._isWatching||(this.input.addEventListener("input",this._onInput),this.input.addEventListener("change",this._onChange),this._isWatching=!0)}},{key:"stopWatching",value:function(){this._isWatching&&(this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("change",this._onChange),this._isWatching=!1)}},{key:"clearError",value:function(){var t,e;null===(t=(e=this.input).clearError)||void 0===t||t.call(e)}},{key:"destroy",value:function(){this.stopWatching(),this._inFlight=null}}])&&u(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}(),h=i(24793),f=i(15297),v=i(72709),m=i(67972),b=i(9828),g=i(20307),y=i(90413),w=i(36733),S=i(3411);function E(t){return E="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},E(t)}function _(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function k(t,e,i){return(e=L(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function A(){var t,e,i="function"==typeof Symbol?Symbol:{},n=i.iterator||"@@iterator",r=i.toStringTag||"@@toStringTag";function o(i,n,r,o){var c=n&&n.prototype instanceof s?n:s,l=Object.create(c.prototype);return I(l,"_invoke",function(i,n,r){var o,s,c,l=0,u=r||[],d=!1,p={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,i){return o=e,s=0,c=t,p.n=i,a}};function h(i,n){for(s=i,c=n,e=0;!d&&l&&!r&&e<u.length;e++){var r,o=u[e],h=p.p,f=o[2];i>3?(r=f===n)&&(c=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=h&&((r=i<2&&h<o[1])?(s=0,p.v=n,p.n=o[1]):h<f&&(r=i<3||o[0]>n||n>f)&&(o[4]=i,o[5]=n,p.n=f,s=0))}if(r||i>1)return a;throw d=!0,n}return function(r,u,f){if(l>1)throw TypeError("Generator is already running");for(d&&1===u&&h(u,f),s=u,c=f;(e=s<2?t:c)||!d;){o||(s?s<3?(s>1&&(p.n=-1),h(s,c)):p.n=c:p.v=c);try{if(l=2,o){if(s||(r="next"),e=o[r]){if(!(e=e.call(o,c)))throw TypeError("iterator result is not an object");
vendor: 2,578 bytes, line 2
2if(!e.done)return e;c=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(c=TypeError("The iterator does not provide a '"+r+"' method"),s=1);o=t}else if((e=(d=p.n<0)?c:i.call(n,p))!==a)break}catch(e){o=t,s=1,c=e}finally{l=1}}return{value:e,done:d}}}(i,r,o),!0),l}var a={};function s(){}function c(){}function l(){}e=Object.getPrototypeOf;var u=[][n]?e(e([][n]())):(I(e={},n,function(){return this}),e),d=l.prototype=s.prototype=Object.create(u);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,I(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return c.prototype=l,I(d,"constructor",l),I(l,"constructor",c),c.displayName="GeneratorFunction",I(l,r,"GeneratorFunction"),I(d),I(d,r,"Generator"),I(d,n,function(){return this}),I(d,"toString",function(){return"[object Generator]"}),(A=function(){return{w:o,m:p}})()}function I(t,e,i,n){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}I=function(t,e,i,n){function o(e,i){I(t,e,function(t){return this._invoke(e,i,t)})}e?r?r(t,e,{value:i,enumerable:!n,configurable:!n,writable:!n}):t[e]=i:(o("next",0),o("throw",1),o("return",2))},I(t,e,i,n)}function P(t,e,i,n,r,o,a){try{var s=t[o](a),c=s.value}catch(t){return void i(t)}s.done?e(c):Promise.resolve(c).then(n,r)}function O(t){return function(){var e=this,i=arguments;return new Promise(function(n,r){var o=t.apply(e,i);function a(t){P(o,n,r,a,s,"next",t)}function s(t){P(o,n,r,a,s,"throw",t)}a(void 0)})}}function T(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,L(n.key),n)}}function L(t){var e=function(t){if("object"!=E(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=E(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==E(e)?e:e+""}function F(t,e,i){return e=R(e),function(t,e){if(e&&("object"==E(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,N()?Reflect.construct(e,i||[],R(t).constructor):e.apply(t,i))}function N(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(N=function(){return!!t})()}function R(t){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},R(t)}
2function j(t,e){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},j(t,e)}var x=function(t){function e(t){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=F(this,e)).settings=r,i.populated=!1,i.isContributor=r.isContributor||!1,i.surface=i._getSurface(r.surface),i.container=t,i.apiService=n.apiService,i.pageState=g.B,i.form=i.container.querySelector('form.authentication[data-id="signup"]')||document.createElement("form"),i.form.className="authentication",i.form.dataset.id="signup",i.form.isConnected||i.container.appendChild(i.form),i.form.innerHTML.trim()||(i.form.dataset.skeleton=1,i.form.innerHTML='<div class="actions"> <div class="divider" data-id="social"> <div class="options"> <div class="button"><span></span></div> <div class="button"><span></span></div> </div> </div> </div> <div class="fields"> <div class="h4"> <span></span> </div> <div class="row" data-columns="2"> <div class="textfield"> <span></span> </div> <div class="textfield"> <span></span> </div> </div> <div class="row"> <div class="textfield"> <span></span> </div> </div> <div class="row"> <div class="textfield"> <span></span> </div> </div> <div class="row rgroup"> <div class="copy"> <span></span> </div> <div class="radiogroup"> <div><span></span></div> <div><span></span></div> </div> </div> <div class="row cboxes"> <div class="checkbox"><span></span></div> <div class="checkbox"><span></span></div> </div> </div> <div class="actions"> <div class="divider"> <div class="button" data-action="submit"><span></span></div> <div class="recaptcha"> <span></span> </div> </div> </div>'),i._load(),i}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&&j(t,e)}(e,t),i=e,l=[{key:"_getSurface",value:function(t){var e=String(t||"").toLowerCase();return["checkout","dialog"].includes(e)?e:"dialog"}},{key:"_load",value:(d=O(A().m(function t(){var e,i;return A().w(function(t){for(;;)switch(t.p=t.n){case 0:return e=window.getLanguage(),t.p=1,t.n=2,this.apiService.getTranslation(e,"form-authentication");case 2:this.translation=t.v,t.n=4;break;case 3:t.p=3,i=t.v,h.A.log("Signup Dialog","Failed to load translation (form-authentication)",{error:i}),this.translation={};case 4:return t.p=4,this._init(),t.f(4);case 5:return t.a(2)}},t,this,[[1,3,4,5]])})),function(){return d.apply(this,arguments)})},{key:"_init",value:function(){var t,e,i=this;this.langSignup=null!==(t=null===(e=this.translation)||void 0===e?void 0:e.signup)&&void 0!==t?t:{},this.t=(0,o.E)(this.langSignup);var n=s.H.convertMarkdown(this.t("section.fields.terms"),!0),c=s.H.convertMarkdown(this.t("section.fields.recaptcha"),!0),l=s.H.populateHTMLTemplate('<div class="form-actions form-actions-social"> <div class="divider" data-id="social"> <div class="options"> <button type="button" class="btn btn--default" data-action="google"> <span class="label">${sectionActionsSocialGoogle}</span> <span class="icon">${sectionActionsSocialGoogleSVG}</span> </button> <button type="button" class="btn btn--default" data-action="facebook"> <span class="label">${sectionActionsSocialFacebook}</span> <span class="icon">${sectionActionsSocialFacebookSVG}</span> </button> </div> </div> </div> <div class="form-fields"> <h4>${sectionFieldsTitle}</h4> <div class="row" data-columns="2"> <div class="field"> <fieldset id="f-signup-firstname" class="textinput textinput--frame" data-active="" data-filled=""> <label for="vs-signup-firstname"><span>${sectionFieldsFirstname}</span></label> <input type="text" inputmode="name" id="vs-signup-firstname" name="signup-firstname" spellcheck="false" autocomplete="given-name" autocorrect="off" autocapitalize="on" required minlength="2" maxlength="45" placeholder="${sectionFieldsFirstname}"> </fieldset> </div> <div class="field"> <fieldset id="f-signup-surname" class="textinput textinput--frame" data-active="" data-filled=""> <label for="vs-signup-surname"><span>${sectionFieldsSurname}</span></label> <input type="text" inputmode="name" id="vs-signup-surname" name="signup-surname" spellcheck="false" autocomplete="family-name" autocorrect="off" autocapitalize="on" required minlength="2" maxlength="45" placeholder="${sectionFieldsSurname}"> </fieldset> </div> </div> <div class="row" data-row-field="email"> <div class="field"> <fieldset id="f-signup-email" class="textinput textinput--frame" data-active="" data-filled=""> <label for="vs-signup-email"><span>${sectionFieldsEmail}</span></label> <input type="email" inputmode="email" id="vs-signup-email" name="signup-email" spellcheck="false" autocomplete="email" autocorrect="off" autocapitalize="off" required minlength="3" maxlength="100" placeholder="${sectionFieldsEmail}"> </fieldset> </div> </div> <div class="row" data-row-field="password"> <div class="field"> <fieldset id="f-signup-password" class="textinput textinput--frame" data-active="" data-filled="" data-shown=""> <label for="vs-signup-password"><span>${sectionFieldsPassword}</span></label> <input type="password" id="vs-signup-password" name="signup-password" spellcheck="false" autocomplete="new-password" autocorrect="off" autocapitalize="off" required minlength="8" maxlength="72" placeholder="${sectionFieldsPassword}"> </fieldset> </div> </div> <div class="row" data-row-field="account"> <h4>${sectionFieldsAccountTitle}</h4> <div class="field"> <fieldset class="f-radiogroup" id="f-signup-account"> <ul> <li data-id="${sectionFieldsAccountIndividual}" class="checked"> <label> <input type="radio" id="vs-signup-account-individual" name="signup-account" value="${sectionFieldsAccountIndividual}" checked="checked"> <span class="title"><span><strong>${sectionFieldsAccountIndividual}</strong></span></span> </label> </li> <li data-id="${sectionFieldsAccountCompany}"> <label> <input type="radio" id="vs-signup-account-company" name="signup-account" value="${sectionFieldsAccountCompany}"> <span class="title"><span><strong>${sectionFieldsAccountCompany}</strong></span></span> </label> </li> </ul> </fieldset> </div> </div> <div data-row-field="company"> <div class="row"> <div class="field"> <fieldset id="f-signup-company" class="textinput textinput--frame" data-active="" data-filled=""> <label for="vs-signup-company"><span>${sectionFieldsCompanyName}</span></label> <input type="text" id="vs-signup-company" name="signup-company" spellcheck="false" autocomplete="organization" autocorrect="off" autocapitalize="off" placeholder="${sectionFieldsCompanyName}"> </fieldset> </div> </div> <div class="row"> <div class="field"> <fieldset id="f-signup-billing-address" class="textinput textinput--frame" data-active="" data-filled=""> <label for="vs-signup-billing-address"><span>${sectionFieldsCompanyBilling}</span></label> <textarea id="vs-signup-billing-address" name="signup-billing-address" placeholder="${sectionFieldsCompanyBilling}"></textarea> </fieldset> </div> </div> </div> <div class="row" data-row-field="terms"> <div role="checkbox"> <label for="f-signup-terms" class="checked"> <div class="checkbox"> <input type="checkbox" id="f-signup-terms" value="1" checked="checked"> <div class="icon">${tickSVG}</div> </div> <div class="label"><strong>${sectionFieldsTerms}</strong></div> </label> </div> <div role="checkbox"> <label for="f-signup-maillist" class="checked"> <div class="checkbox"> <input type="checkbox" id="f-signup-maillist" value="1" checked="checked"> <div class="icon">${tickSVG}</div> </div> <div class="label"><strong>${sectionFieldsMaillist}</strong></div> </label> </div> </div> </div> <div class="form-actions"> <div class="divider" data-id="submit"> <button type="submit" class="button featured" data-action="submit" disabled="disabled"> <span class="label">${sectionActionsSubmit}</span> <span class="icon">${sectionActionsSubmitSVG}</span> </button> <p class="recaptcha">${sectionActionsRecaptcha}</p> <div id="form-signup-recaptcha" class="g-recaptcha"></div> </div> </div> ',{sectionActionsSocialGoogle:this.t("section.social.google"),sectionActionsSocialGoogleSVG:{value:s.H.generateSVGIcon("global","logo-colour-google"),isHTML:!0},sectionActionsSocialFacebook:this.t("section.social.facebook"),sectionActionsSocialFacebookSVG:{value:s.H.generateSVGIcon("global","logo-colour-facebook"),isHTML:!0},sectionFieldsTitle:this.t("section.fields.title"),sectionFieldsFirstname:this.t("section.fields.firstname"),sectionFieldsSurname:this.t("section.fields.surname"),sectionFieldsEmail:this.t("section.fields.email"),sectionFieldsPassword:this.t("section.fields.password"),sectionFieldsAccountTitle:this.t("section.fields.account.title"),sectionFieldsAccountIndividual:this.t("section.fields.account.individual"),sectionFieldsAccountCompany:this.t("section.fields.account.company"),sectionFieldsCompanyName:this.t("section.fields.company.name"),sectionFieldsCompanyBilling:this.t("section.fields.company.billing"),tickSVG:{value:s.H.generateSVGIcon("global","tick"),isHTML:!0},sectionFieldsTerms:{value:n,isHTML:!0},sectionFieldsMaillist:this.t("section.fields.maillist"),sectionActionsSubmit:this.t("section.fields.submit"),sectionActionsSubmitSVG:{value:s.H.generateSVGIcon("global","arrow-right"),isHTML:!0},sectionActionsRecaptcha:{value:c,isHTML:!0}});this.form.innerHTML=l,this.form.removeAttribute("data-skeleton"),this.inputFirstName=new S.a(this.form.querySelector("#f-signup-firstname")),this.inputSurname=new S.a(this.form.querySelector("#f-signup-surname")),this.inputEmail=new S.a(this.form.querySelector("#f-signup-email")),this.inputPassword=new S.a(this.form.querySelector("#f-signup-password")),this.radioAccount=new w.J(this.form.querySelector("#f-signup-account > ul")),this.inputCompany=new S.a(this.form.querySelector("#f-signup-company")),this.inputBillingAddress=new S.a(this.form.querySelector("#f-signup-billing-address")),this.checkboxTerms=new a.S(this.form.querySelector("#f-signup-terms")),this.checkboxMaillist=new a.S(this.form.querySelector("#f-signup-maillist")),this.buttonSubmit=this.form.querySelector('.form-actions button[data-action="submit"]'),this.buttonSocialGoogle=this.form.querySelector('.form-actions button[data-action="google"]'),this.buttonSocialFacebook=this.form.querySelector('.form-actions button[data-action="facebook"]'),this.buttonSubmitRef=this.buttonSubmit?new r.$(this.buttonSubmit):null,this.buttonSocialRef={google:this.buttonSocialGoogle?new r.$(this.buttonSocialGoogle):null,facebook:this.buttonSocialFacebook?new r.$(this.buttonSocialFacebook):null},this._onRecaptchaReady=this._onRecaptchaReady.bind(this),this._onRecaptchaPassed=this._onRecaptchaPassed.bind(this),this._onRecaptchaError=this._onRecaptchaError.bind(this),this._val
2idateForm=this._validateForm.bind(this),this.radioAccount.addEventListener("change",function(t){var e,n=String(null!==(e=t.data)&&void 0!==e?e:"").toLowerCase();i.form.dataset.accountType=n,"company"===n&&setTimeout(function(){i.inputCompany.focus()},250)}),this.buttonSocialGoogle.addEventListener("click",function(){i._socialSignup("google")}),this.buttonSocialFacebook.addEventListener("click",function(){i._socialSignup("facebook")}),this.form.addEventListener("submit",function(t){i._validateForm(),t.preventDefault()}),this.emailValidation=new p({input:this.inputEmail,t:this.t,onStatusChange:function(t){"checking"===t&&(i.buttonSubmit.disabled=!0),"ok"!==t&&"idle"!==t&&"formatError"!==t&&"registered"!==t||i.recaptcha&&(i.buttonSubmit.disabled=!1)}}),this.buttonSubmit.disabled=!0,this.recaptcha=new m.n("form-signup-recaptcha"),this.recaptcha.ready().then(this._onRecaptchaReady).catch(function(t){h.A.log("Signup Dialog","reCAPTCHA ready() failed",{error:t}),i._onRecaptchaError()}),this.recaptcha.addEventListener("passed",this._onRecaptchaPassed),this.recaptcha.addEventListener("error",this._onRecaptchaError),this.populated=!0,this.triggerEvent("populated")}},{key:"_onRecaptchaReady",value:function(){this.buttonSubmit.disabled=!1}},{key:"_onRecaptchaPassed",value:function(t){this._signup(t.data)}},{key:"_onRecaptchaError",value:function(){this.buttonSubmit.disabled=!1,y.PromptModule.alert(this.t("warnings.recaptcha.error.title"),this.t("warnings.recaptcha.error.description")),this.triggerEvent("failed",{type:"recaptcha"})}},{key:"_disable",value:function(){this.inputFirstName.disable(),this.inputSurname.disable(),this.inputEmail.disable(),this.inputPassword.disable(),this.radioAccount.disable(),this.checkboxTerms.disable(),this.checkboxMaillist.disable(),this.inputCompany.disable(),this.inputBillingAddress.disable(),this.buttonSubmit.disabled=!0,this.buttonSocialGoogle.disabled=!0,this.buttonSocialFacebook.disabled=!0}},{key:"_enable",value:function(){this.inputFirstName.enable(),this.inputSurname.enable(),this.inputEmail.enable(),this.inputPassword.enable(),this.radioAccount.enable(),this.checkboxTerms.enable(),this.checkboxMaillist.enable(),this.inputCompany.enable(),this.inputBillingAddress.enable(),this.buttonSubmit.disabled=!1,this.buttonSocialGoogle.disabled=!1,this.buttonSocialFacebook.disabled=!1}},{key:"_validateForm",value:(u=O(A().m(function t(){var e,i,n,r,o,a,s,c;return A().w(function(t){for(;;)switch(t.n){case 0:if(e=[],"checkout"!==this.surface&&(i=this.inputFirstName.value.trim(),n=this.inputFirstName.input.minLength||0,0===i.length?(this.inputFirstName.showError(this.t("warnings.firstname.empty")),e.push(this.inputFirstName)):!isNaN(n)&&i.length<n&&(this.inputFirstName.showError(this.t("warnings.firstname.minchars")),e.push(this.inputFirstName)),r=this.inputSurname.value.trim(),o=this.inputSurname.input.minLength||0,0===r.length?(this.inputSurname.showError(this.t("warnings.surname.empty")),e.push(this.inputSurname)):!isNaN(o)&&r.length<o&&(this.inputSurname.showError(this.t("warnings.surname.minchars")),e.push(this.inputSurname))),a=!1,this.emailValidation.validateFormat()){t.n=1;break}e.push(this.inputEmail),this.emailValidation.startWatching(),t.n=3;break;case 1:return this.buttonSubmit.disabled=!0,t.n=2,this.emailValidation.validateServer();case 2:a=t.v,this.buttonSubmit.disabled=!1,a||(e.push(this.inputEmail),this.emailValidation.startWatching());case 3:if(s=this.inputPassword.value.trim(),c=this.inputPassword.input.minLength||0,(0===s.length||!isNaN(c)&&s.length<c)&&(this.inputPassword.showError(this.t("warnings.password.length")),e.push(this.inputPassword)),this.checkboxTerms.checked||(this.checkboxTerms.showError(this.t("warnings.terms.notagreed")),e.push(this.checkboxTerms)),!e.length){t.n=4;break}return e[0].focus&&e[0].focus(),this.triggerEvent("failed",{type:"validation"}),t.a(2,!1);case 4:return this.buttonSubmit.disabled=!0,this.recaptcha.execute(),t.a(2,!0)}},t,this)})),function(){return u.apply(this,arguments)})},{key:"_signup",value:function(t){var e,i=this;null===(e=this.buttonSubmitRef)||void 0===e||e.setLoading(this.t("processing.submit")),this._disable();var n={firstname:this.inputFirstName.value,surname:this.inputSurname.value,email:this.inputEmail.value,password:this.inputPassword.value,mailinglist:this.checkboxMaillist.checked,contributor:this.isContributor,captcha:t};"company"===String(this.radioAccount.value||"").toLowerCase()&&(n.company=this.inputCompany.value,
2n.address=this.inputBillingAddress.value),this.apiService.post(c.Routes.API.AUTH.SIGNUP(this.surface),n).then(function(t){var e=String(i.radioAccount.value||"").toLowerCase()||"individual";b.D.trackSignUp(function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?_(Object(i),!0).forEach(function(e){k(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):_(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}({method:"email",account_type:e,signup_surface:i.surface||i.pageState.getProperty("pagetype")||"dialog",contributor:i.isContributor?1:0},b.D.getAffiliateContext())),(0,v.V)().then(function(e){null!=e&&e.update&&e.update(t.data.user),null!=e&&e.rememberUser&&e.rememberUser()}).catch(function(t){h.A.log("Signup Dialog","Get user profile after signup failed",{error:t})}).finally(function(){"function"==typeof i.settings.callback&&i.settings.callback(!0),i.settings.externalSubmit?i.triggerEvent("validated",t.data.user):i.settings.redirect?s.H.goToURL(i.settings.redirect):window.location.reload(!0)})}).catch(function(t){var e;if(h.A.log("Signup Dialog","Signup form error",{error:t}),null===(e=i.buttonSubmitRef)||void 0===e||e.revert(),i._enable(),i.recaptcha.reset(),!t.code)return y.PromptModule.alert(i.t("warnings.unknown.title"),i.t("warnings.unknown.description")),void i.triggerEvent("failed",{type:"request",error:t});switch(t.code){case"EMAIL_INVALID":i.inputEmail.showError(i.t("warnings.email.invalid"),!0);break;case"EMAIL_REGISTERED":i.inputEmail.showError(i.t("warnings.email.registered"),!0);break;case"FIRSTNAME_MINCHARS":i.inputFirstName.showError(i.t("warnings.firstname.minchars"),!0);break;case"FIRSTNAME_MISSING":i.inputFirstName.showError(i.t("warnings.firstname.empty"),!0);break;case"PASSWORD_COMPROMISED":i.inputPassword.showError(i.t("warnings.password.compromised"),!0);break;case"PASSWORD_CONSECUTIVE":i.inputPassword.showError(i.t("warnings.password.consecutive"),!0);break;case"PASSWORD_LENGTH":i.inputPassword.showError(i.t("warnings.password.length"),!0);break;case"RECAPTCHA_FAILED":y.PromptModule.alert(i.t("warnings.recaptcha.failed.title"),i.t("warnings.recaptcha.failed.description"));break;case"SURNAME_MINCHARS":i.inputSurname.showError(i.t("warnings.surname.minchars"),!0);break;case"SURNAME_MISSING":i.inputSurname.showError(i.t("warnings.surname.empty"),!0);break;default:y.PromptModule.alert(i.t("warnings.unknown.title"),i.t("warnings.unknown.description"))}i.triggerEvent("failed",{type:"request",error:t})})}},{key:"_socialSignup",value:function(t){var e,i=this,n=null===(e=this.buttonSocialRef)||void 0===e?void 0:e[t];null==n||n.setLoading(this.t("processing.social")),this._disable(),b.D.markSocialAuthIntent({provider:t,intent:"signup"}),this.apiService.get(c.Routes.API.AUTH.SIGNUP_SOCIAL(t)).then(function(e){return(0,v.V)().then(function(t){return null!=t&&t.clear?t.clear():Promise.resolve()}).catch(function(e){h.A.log("Signup Dialog","Get profile before social signup (".concat(t,") failed"),{error:e})}).finally(function(){var n,r;null===(n=(r=i.settings).onExternalAuthStart)||void 0===n||n.call(r,{provider:t}),window.location.href=e.data.url})}).catch(function(e){var r,o;b.D.clearSocialAuthIntent(),null===(r=(o=i.settings).onExternalAuthFailed)||void 0===r||r.call(o,{provider:t}),null==n||n.revert(),i._enable(),h.A.log("Signup Dialog","Server could not setup signup auth (".concat(t,")"),{error:e});var a=i.t("warnings.social.".concat(t,".title")),s=i.t("warnings.social.".concat(t,".description"));y.PromptModule.alert(a,s)})}},{key:"focus",value:function(){this.inputFirstName&&this.inputFirstName.focus()}},{key:"submit",value:function(){return this._validateForm()}},{key:"clear",value:function(){var t;this.recaptcha&&(this.recaptcha.removeEventListener("ready",this._onRecaptchaReady),this.recaptcha.removeEventListener("passed",this._onRecaptchaPassed),this.recaptcha.removeEventListener("error",this._onRecaptchaError),"function"==typeof this.recaptcha.destroy&&this.recaptcha.destroy(),this.recaptcha=null),null===(t=this.emailValidation)||void 0===t||t.stopWatching()}}],l&&T(i.prototype,l),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,l,u,d}(f.b)},67972(t,e,i){i.d(e,{n:()=>v});var n=i(24793),r=i(15297),o=i(7546);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 s(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function c(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,f(n.key),n)}}function l(t,e,i){return e=d(e),function(t,e){if(e&&("object"==a(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,u()?Reflect.construct(e,i||[],d(t).constructor):e.apply(t,i))}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(u=function(){return!!t})()}
2function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function h(t,e,i){return(e=f(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function f(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=a(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}var v=function(t){function e(t){var i;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=l(this,e))._pollIntervalId=null,i._loadTimeoutId=null,i._isDestroyed=!1,e._INSTANCES.add(i),i.target=t,"string"==typeof t&&(i.target=document.getElementById(t)||document.querySelector(t)),!(i.target&&i.target instanceof Element)){var r=String(t);throw n.A.log("GoogleRecaptcha","Target element not found",{target:r}),new Error('GoogleRecaptcha: target element not found for "'.concat(r,'"'))}return i.id=null,i._readyPromise=new Promise(function(t){i._resolveReady=t,window.grecaptcha&&window.grecaptcha.render?i._init(t):(e._PENDING.add(i),"function"!=typeof window[e.LOAD_EVENT_NAME]&&(window[e.LOAD_EVENT_NAME]=e._onGlobalLoaded),e.IS_LOADED||(o.H.loadScript("https://www.google.com/recaptcha/api.js?onload=".concat(e.LOAD_EVENT_NAME,"&render=explicit")),e.IS_LOADED=!0))}),i}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&&p(t,e)}(e,t),i=e,a=[{key:"_onGlobalLoaded",value:function(){var t,i=function(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return s(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?s(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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 o,a=!0,c=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){c=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(c)throw o}}}}(e._PENDING);try{for(i.s();!(t=i.n()).done;){var n=t.value;"function"==typeof n._resolveReady&&n._init(n._resolveReady)}}catch(t){i.e(t)}finally{i.f()}e._PENDING.clear();try{delete window[e.LOAD_EVENT_NAME]}catch(t){window[e.LOAD_EVENT_NAME]=void 0}}}],(r=[{key:"_init",value:function(t){var e=this;window.grecaptcha?this._onLoaded(t):(this._pollIntervalId=setInterval(function(){window.grecaptcha&&(clearInterval(e._pollIntervalId),e._pollIntervalId=null,e._onLoaded(t))},250),this._loadTimeoutId=setTimeout(function(){e._pollIntervalId&&clearInterval(e._pollIntervalId),e._pollIntervalId=null,n.A.log("GoogleRecaptcha","grecaptcha failed to load within timeout",{}),e.triggerEvent("error"),e._loadTimeoutId=null},15e3))}},{key:"_onLoaded",value:function(t){var i=this;this.grecaptcha=window.grecaptcha,this.id=this.grecaptcha.render(this.target,{sitekey:e.SITE_KEY,size:"invisible",callback:function(t){i.triggerEvent("passed",t)},"expired-callback":function(){i.reset(),i.triggerEvent("expired")},"error-callback":function(){i.reset(),i.triggerEvent("error")}}),t(),this.triggerEvent("ready")}},{key:"_clearLoadGuards",value:function(){this._pollIntervalId&&clearInterval(this._pollIntervalId),this._loadTimeoutId&&clearTimeout(this._loadTimeoutId),this._pollIntervalId=null,this._loadTimeoutId=null}},{key:"ready",value:function(){return this._readyPromise}},{key:"execute",value:function(){if(!this.grecaptcha||null==this.id)throw n.A.log("GoogleRecaptcha","execute() called before ready()",{}),new Error("GoogleRecaptcha: execute() called before ready()");
2this.grecaptcha.execute(this.id)}},{key:"reset",value:function(){this.grecaptcha&&null!=this.id&&this.grecaptcha.reset(this.id)}},{key:"destroy",value:function(){if(!this._isDestroyed){e._PENDING.delete(this),this._clearLoadGuards();try{this.grecaptcha&&null!=this.id&&this.grecaptcha.reset(this.id)}catch(t){}if(this.id=null,this.target instanceof Element)for(;this.target.firstChild;)this.target.removeChild(this.target.firstChild);this.grecaptcha=null,this._resolveReady=null,this._isDestroyed=!0,e._INSTANCES.delete(this)}}}])&&c(i.prototype,r),a&&c(i,a),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,r,a}(r.b);h(v,"SITE_KEY","6LdVZmApAAAAAEBFKN0yDOuMwf8hflSNL2xlZJzE"),h(v,"LOAD_EVENT_NAME","onGoogleRecaptchaLoaded"),h(v,"_PENDING",new Set),h(v,"_INSTANCES",new Set),h(v,"IS_LOADED",!1)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.