1"use strict";(self["webpackChunkconveyour_ui"]=self["webpackChunkconveyour_ui"]||[]).push([[18272],{4649:function(e,t,r){r.r(t),r.d(t,{default:function(){return _}});var i=r(86227),s=r(69390),n=r(3698),a=r(52938),o=r(70174),l=r(36930),p=r(41034),u=r(41558),c=function(){var e=this,t=e._self._c;return t(n.A,[t(a.ri,{staticClass:"headline"},[t("h3",[e._v(e._s(e.pinTitle))]),t(p.A)],1),e.profileLoading?t("div",{staticClass:"d-flex justify-center pa-6"},[t("spinner")],1):[e.pinReset?t(a.OQ,[t("div",{staticClass:"text-center pt-6 pb-6"},[t(l.A,{staticClass:"mb-2",attrs:{color:"primary"}},[e._v("check")]),t("p",[e._v(e._s(e.pinReset))])],1)]):[t(a.OQ,[t("p",[e._v(" "+e._s(e.errorText[e.currentError])+" ")]),t(i.A,{staticClass:"mb-3 pa-2",attrs:{transition:"fade-transition",type:"error",dismissible:""},model:{value:e.showError,callback:function(t){e.showError=t},expression:"showError"}},[e._v(" "+e._s(e.formError.message)+" ")]),t(o.A,{ref:"form",on:{submit:function(e){e.preventDefault()}}},[e.pidSet?e._e():t(u.A,{staticClass:"mb-2",attrs:{label:e.$t("portal.auth.fields.email"),type:"email",rules:[t=>e.validationRules.checkRequired(t,"Email")]},model:{value:e.email,callback:function(t){e.email=t},expression:"email"}}),t(u.A,{directives:[{name:"mask",rawName:"v-mask",value:"####",expression:"'####'"}],attrs:{label:e.$t("portal.auth.fields.pin"),type:"tel",rules:[e.rules.pinNumber],counter:"4"},model:{value:e.pin,callback:function(t){e.pin=t},expression:"pin"}})],1)],1),t(a.SL,[t(p.A),t(s.A,{attrs:{text:"",color:"main"},on:{click:e.forgotPin}},[e._v(" "+e._s(e.$t("portal.auth.pin.forgotPin"))+" ")]),t(s.A,{attrs:{text:"",color:"primary"},on:{click:e.sendPin}},[e._v(" "+e._s(e.$t("portal.common.send"))+" ")])],1)]]],2)},h=[],m=r(1910),d=r(97175),f=r(83973),v={name:"PortalPinForm",directives:{mask:d.mask},props:{type:{type:String},resetToken:{type:String},pidSet:{type:Boolean}},data(){return{pin:"",formError:"",pinReset:"",showError:!1,email:"",errorText:{setup:"Protect your account by setting a 4 digit pin.",missing:"Protect your account by setting a 4 digit pin.",invalid:"Please enter your pin.",required:"Please enter/set your pin.",reset:"Please reset your pin."},validationRules:f.A,rules:{pinNumber:e=>!e||/^\d{4,4}$/.test(e)||"Invalid pin"}}},computed:{...(0,m.L8)(["profileLoading"]),isValid(){return this.$refs.form.validate()},currentError(){return this.resetToken?"reset":this.formError?this.formError.data.pin:this.type},pinTitle(){let e=this.resetToken?"pinReset":"pinPlease";return this.$t(`portal.auth.pin.${e}`)}},methods:{...(0,m.i0)(["loginPortal"]),sendPin(){if(!this.isValid)return;let e={pin:this.pin,reset_token:this.resetToken,schema:"full"};this.pidSet||(e.email=this.email),this.loginPortal(e).then(()=>{this.$emit("sent",!0)}).catch(({data:e})=>{this.handleError(e,"set")})},forgotPin(){let e={reset:!0};if(!this.pidSet){if(!this.email)return void this.$refs.form.validate();e.email=this.email}this.loginPortal(e).then(e=>{this.pinReset=e.message}).catch(({data:e})=>{this.handleError(e,"reset")})},handleError(e,t){this.pin="";let r=`Failed to ${t} pin`;this.formError=Object.assign({message:r},e),this.showError=!0}}},k=v,y=r(81656),g=(0,y.A)(k,c,h,!1,null,null,null),_=g.exports}}]); 2//# sourceMappingURL=view-portal-components-portalAuth-PortalPinForm-vue.e700c414.js.map
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.