1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4377],{4377:(function(F,m,n){n.r(m),n.d(m,{default:function(){return Q}});var g=function(){var e=this,t=e._self._c,X=e._self._setupProxy;return e.showForm&&!e.loading?t("div",{staticClass:"user__content"},[t("nx-form-user-register",{attrs:{"legal-conditions-url":e.legalConditionsUrl,"legal-privacy-url":e.legalPrivacyUrl,newsletters:e.newsletters,countries:e.countries,provinces:e.provinces,recaptchaWebKey:e.recaptchaWebKey},on:{successForm:e.toggleForm}})],1):e.showForm?e._e():t("div",{staticClass:"user__content"},[t("p",{staticClass:"user__title"},[t("nx-headline-atom",{attrs:{title:e.translations.confirmationTitulo,tag:"span","atom-config":e.brickConfig.module.userForms.headline.default}})],1),e._v(" "),t("p",{staticClass:"user__text"},[e._v(e._s(e.translations.confirmationDescripcion))])])},f=[],p=n(7382),u=function(){var e=this,t=e._self._c,X=e._self._setupProxy;return t("div",{staticClass:"form-user-register"},[t("p",{staticClass:"user__title"},[t("nx-headline-atom",{attrs:{title:e.$t("register.title"),tag:"span","atom-config":e.brickConfig.module.userForms.headline.default}})],1),e._v(" "),t("nx-user-rrss"),e._v(" "),t("p",{staticClass:"user__title"},[t("nx-headline-atom",{attrs:{title:e.$t("register.title-mail"),tag:"span","atom-config":e.brickConfig.module.userForms.headline.default}})],1),e._v(" "),t("validation-observer",{scopedSlots:e._u([{key:"default",fn:function({valid:b}){return[t("form",{on:{submit:function(s){s.preventDefault(),s.stopPropagation()}}},[t("div",{staticClass:"form-user-register__section"},[t("nx-headline-atom",{attrs:{title:e.$t("register.data-account"),tag:"span","atom-config":e.brickConfig.module.userForms.title.default}}),e._v(" "),t("nx-input-text",{attrs:{label:e.$t("register.nick"),name:e.$t("register.nick"),rules:`required|min:4|nick:${e.nickIsAvailable}`},on:{blur:e.checkNick},model:{value:e.nick,callback:function(s){e.nick=s},expression:"nick"}}),e._v(" "),t("nx-input-text",{attrs:{label:e.$t("register.email"),name:e.$t("register.email"),rules:"required|email"},model:{value:e.email,callback:function(s){e.email=s},expression:"email"}}),e._v(" "),t("nx-input-password",{attrs:{label:e.$t("register.password"),name:e.$t("register.password"),rules:"required|upperlower|min:8",placeholder:e.$t("register.password-placeholder")},model:{value:e.password,callback:function(s){e.password=s},expression:"password"}})],1),e._v(" "),t("div",{staticClass:"form-user-register__section"},[t("nx-headline-atom",{attrs:{title:e.$t("register.data-personal"),tag:"span","atom-config":e.brickConfig.module.userForms.title.default}}),e._v(" "),t("nx-input-text",{attrs:{label:e.$t("register.name"),name:e.$t("register.name"),rules:"required"},model:{value:e.name,callback:function(s){e.name=s},expression:"name"}}),e._v(" "),t("nx-input-text",{attrs:{label:e.$t("register.surname"),name:e.$t("register.surname"),rules:"required"},model:{value:e.surname,callback:function(s){e.surname=s},expression:"surname"}}),e._v(" "),t("nx-input-date",{attrs:{label:e.$t("register.birthdate"),name:e.$t("register.birthdate")},model:{value:e.birthdate,callback:function(s){e.birthdate=s},expression:"birthdate"}}),e._v(" "),t("nx-input-text",{attrs:{label:e.$t("register.phone"),name:e.$t("register.phone"),rules:"phone"},model:{value:e.phone,callback:function(s){e.phone=s},expression:"phone"}})],1),e._v(" "),t("div",{staticClass:"form-user-register__section"},[t("nx-headline-atom",{attrs:{title:e.$t("register.data-postal"),tag:"span","atom-config":e.brickConfig.module.userForms.title.default}}),e._v(" "),t("nx-input-select",{attrs:{options:e.countryOptions,label:e.$t("register.country"),name:e.$t("register.country"),placeholder:e.$t("register.country")},model:{value:e.country,callback:function(s){e.country=s},expression:"country"}}),e._v(" "),t("nx-input-select",{attrs:{options:e.provinceOptions,label:e.$t("register.province"),name:e.$t("register.province"),disabled:!e.isSpain,placeholder:e.$t("register.province")},model:{value:e.province,callback:function(s){e.province=s},expression:"province"}}),e._v(" "),t("nx-input-text",{attrs:{label:e.$t("register.city"),name:e.$t("register.city"),disabled:!e.isSpain,rules:""},model:{value:e.city,callback:function(s){e.city=s},expression:"city"}}),e._v(" "),t("nx-input-text",{attrs:{label:e.$t("register.address"),name:e.$t("register.address"),rules:""},model:{value:e.address,callback:function(s){e.address=s},expression:"address"}}),e._v(" "),t("nx-input-text",{attrs:{label:e.$t("register.postal-code"),name:e.$t("register.postal-code"),rules:"min:5"},model:{value:e.postalCode,callback:function(s){e.postalCode=s},expression:"postalCode"}})],1),e._v(" "),e.newsletters.length>0?t("div",{staticClass:"form-user-register__section"},[t("nx-headline-atom",{attrs:{title:e.$t("profile.newsletters-title"),tag:"span","atom-config":e.brickConfig.module.userForms.title.default}}),e._v(" "),t("nx-headline-atom",{attrs:{title:e.$t("profile.newsletters-subtitle"),tag:"span","atom-config":e.brickConfig.module.userForms.subtitle.default}}
1),e._v(" "),e._l(e.newsletters,function(s){return t("nx-input-checkbox",{key:s.id,staticClass:"user--mt-15",attrs:{name:"newsletter"},model:{value:s.isSubscribed,callback:function(q){e.$set(s,"isSubscribed",q)},expression:"newsletter.isSubscribed"}},[t("p",{domProps:{innerHTML:e._s(s.name)}})])})],2):e._e(),e._v(" "),t("div",{staticClass:"form-user-register__section"},[t("nx-input-checkbox",{attrs:{name:"terms",rules:"required|musttrue",check:""},model:{value:e.terms,callback:function(s){e.terms=s},expression:"terms"}},[t("p",{domProps:{innerHTML:e._s(e.$t("register.legal",{urlconditions:e.legalConditionsUrl,urlpolitic:e.legalPrivacyUrl}))}})])],1),e._v(" "),t("div",{staticClass:"form-user-register__section"},[t("div",{staticClass:"user--mt-15"},[t("vue-recaptcha",{ref:"recaptcha",attrs:{loadRecaptchaScript:!0,sitekey:e.recaptchaWebKey},on:{verify:e.onCaptchaVerified,expired:e.onCaptchaExpired}})],1)]),e._v(" "),t("div",{staticClass:"form-user-register__section"},[t("nx-button",{attrs:{text:e.$t("register.button"),loading:e.waiting,type:"submit",medium:"",disabled:!b||!e.recaptcha},on:{click:e.register}})],1)])]}}])}),e._v(" "),e.showError?t("nx-alert-message",{staticClass:"mt-8",attrs:{alert:""},scopedSlots:e._u([{key:"content",fn:function(){return[t("p",[e._v(e._s(e.$t("register.error-message")))]),e._v(" "),e.registerErrors.length?t("ul",e._l(e.registerErrors,function(b,s){return t("li",{key:s},[t("p",[e._v(e._s(b))])])}),0):e._e()]},proxy:!0}],null,!1,1568996940)}):e._e(),e._v(" "),t("div",{staticClass:"user__separator mt-8 mb-5"}),e._v(" "),t("p",{staticClass:"user__text mt-2",domProps:{innerHTML:e._s(e.$t("register.login-hint"))}})],1)},_=[],o=n(3646),i=n(1605),a=n(7248),l=n(38),c=n(9329),y=n(8573),v=n(6145),d=n(7427),h=n(7325),x=n(8594),w=n(3706),I=n(5311),R=Object.defineProperty,N=Object.defineProperties,U=Object.getOwnPropertyDescriptors,$=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,C=(r,e,t)=>e in r?R(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,k=(r,e)=>{for(var t in e||(e={}))Z.call(e,t)&&C(r,t,e[t]);if($)for(var t of $(e))A.call(e,t)&&C(r,t,e[t]);return r},P=(r,e)=>N(r,U(e)),L={name:"nx-form-user-register",components:{NxInputSelect:I.Z,NxHeadlineAtom:w.Z,ValidationObserver:o._j,VueRecaptcha:a.Z,NxButton:l.Z,NxInputText:c.Z,NxInputPassword:y.Z,NxUserRrss:v.Z,NxAlertMessage:d.Z,NxInputCheckbox:h.Z,NxInputDate:x.Z},props:{recaptchaWebKey:String,legalPrivacyUrl:String,legalConditionsUrl:String,newsletters:{type:Array},countries:{type:Object},provinces:{type:Object}},data:()=>({waiting:!1,nick:null,email:null,password:null,name:null,surname:null,birthdate:null,phone:null,country:"Espa\xF1a",province:null,city:null,address:null,postalCode:null,terms:null,recaptcha:null,showError:!1,registerErrors:[],nickIsAvailable:null,regexPhone:/^[0-9]{6,12}$/}),computed:P(k({},(0,p.Se)(["brickConfig"])),{countryOptions(){return Object.keys(this.countries).map(r=>({value:r,text:this.countries[r]}))},provinceOptions(){return Object.keys(this.provinces).map(r=>({value:r,text:this.provinces[r]}))},isSpain(){return this.country==="ES"}}),methods:P(k({},(0,p.nv)("user",["registerWithCredentials","checkUserNick"])),{onCaptchaVerified(r){this.recaptcha=r},onCaptchaExpired(){this.recaptcha=null},register(){this.showError=!1,this.waiting=!0,this.registerErrors=[],this.registerWithCredentials({nick:this.nick,email:this.email,password:this.password,name:this.name,surname:this.surname,birthdate:this.birthdate?(0,i.Z)(this.birthdate).format("YYYY-MM-DD"):null,phone:this.phone,country:this.country,province:this.province,city:this.city,address:this.address,postalCode:this.postalCode,terms:this.terms,recaptcha:this.recaptcha,origin:"web",newsletters:this.newsletters}).then(r=>{console.debug(r),typeof r.errors!="undefined"?(this.showError=!0,r.errors.forEach(e=>{this.registerErrors.push(this.$t(`register.error-server.${e.errorCode}`))})):this.$emit("successForm"),this.waiting=!1}).catch(r=>{console.error(r),this.showError=!0,typeof r.apiInfo.data.errors!="undefined"&&r.apiInfo.data.errors.forEac
1h(e=>{this.registerErrors.push(this.$t(`register.error-server.${e.errorCode}`))}),this.waiting=!1})},checkNick(){this.nick&&this.checkUserNick({nick:this.nick}).then(r=>{console.debug(r),this.nickIsAvailable=r.success}).catch(r=>{console.error(r),this.showError=!0})}})},H=L,O=n(810),V=(0,O.Z)(H,u,_,!1,null,null,null),D=V.exports,T=Object.defineProperty,M=Object.defineProperties,W=Object.getOwnPropertyDescriptors,S=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,j=(r,e,t)=>e in r?T(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,E=(r,e)=>{for(var t in e||(e={}))K.call(e,t)&&j(r,t,e[t]);if(S)for(var t of S(e))B.call(e,t)&&j(r,t,e[t]);return r},Y=(r,e)=>M(r,W(e)),z={name:"nx-register-view",props:{recaptchaWebKey:String,legalConditionsUrl:{type:String,default:""},legalPrivacyUrl:{type:String,default:""},newsletters:{type:Array},countries:{type:Object},provinces:{type:Object}},components:{NxHeadlineAtom:w.Z,NxFormUserRegister:D},data:()=>({showForm:!0,loading:!0}),computed:Y(E(E({},(0,p.Se)(["brickConfig","site","webHasUsers"])),(0,p.Se)("user",["currentUser"])),{translations(){return{confirmationTitulo:this.$t("register-confirmation.titulo",{site:this.site.name}),confirmationDescripcion:this.$t("register-confirmation.descripcion"),confirmationButton:this.$t("register-confirmation.button")}}}),methods:{toggleForm(){this.showForm=!this.showForm}},beforeMount(){this.$nextTick(()=>{if(this.webHasUsers&&this.currentUser){window.location="/perfil/mi-cuenta/";return}this.loading=!1})}},G=z,J=(0,O.Z)(G,g,f,!1,null,null,null),Q=J.exports}),7248:(function(F,m){function n(){return n=Object.assign||function(o){for(var i=1;i<arguments.length;i++){var a=arguments[i];for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(o[l]=a[l])}return o},n.apply(this,arguments)}var g=function(){var i=!1,a=[],l=function(d){if(!i){i=!0;for(var h=0,x=a.length;h<x;h++)a[h](d)}},c=function(d){if(!i){a.push(d);return}d()},y={resolved:function(){return i},resolve:l,promise:{then:c}};return y},f=Object.prototype.hasOwnProperty;function p(){var o=g();return{notify:function(){o.resolve()},wait:function(){return o.promise},render:function(a,l,c){this.wait().then(function(){c(window.grecaptcha.render(a,l))})},reset:function(a){typeof a!="undefined"&&(this.assertLoaded(),this.wait().then(function(){return window.grecaptcha.reset(a)}))},execute:function(a){typeof a!="undefined"&&(this.assertLoaded(),this.wait().then(function(){return window.grecaptcha.execute(a)}))},checkRecaptchaLoad:function(){f.call(window,"grecaptcha")&&f.call(window.grecaptcha,"render")&&this.notify()},assertLoaded:function(){if(!o.resolved())throw new Error("ReCAPTCHA has not been loaded")}}}var u=p();typeof window!="undefined"&&(window.vueRecaptchaApiLoaded=u.notify);var _={name:"VueRecaptcha",props:{sitekey:{type:String,required:!0},theme:{type:String},badge:{type:String},type:{type:String},size:{type:String},tabindex:{type:String},loadRecaptchaScript:{type:Boolean,default:!1},recaptchaScriptId:{type:String,default:"__RECAPTCHA_SCRIPT"},recaptchaHost:{type:String,default:"www.google.com"},language:{type:String,default:""}},beforeMount:function(){if(this.loadRecaptchaScript&&!document.getElementById(this.recaptchaScriptId)){var i=document.createElement("script");i.id=this.recaptchaScriptId,i.src="https://"+this.recaptchaHost+"/recaptcha/api.js?onload=vueRecaptchaApiLoaded&render=explicit&hl="+this.language,i.async=!0,i.defer=!0,document.head.appendChild(i)}},mounted:function(){var i=this;u.checkRecaptchaLoad();var a=n({},this.$props,{callback:this.emitVerify,"expired-callback":this.emitExpired,"error-callback":this.emitError}),l=this.$slots.default?this.$el.children[0]:this.$el;u.render(l,a,function(c){i.$widgetId=c,i.$emit("render",c)})},methods:{reset:function(){u.reset(this.$widgetId)},execute:function(){u.execute(this.$widgetId)},emitVerify:function(i){this.$emit("verify",i)},emitExpired:function(){this.$emit("expired")},emitError:function(){this.$emit("error")}},render:function(i){return i("div",{},this.$slots.default)}};m.Z=_})}]);
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.