1import{_}from"./dbhfrwsh.js";import{_ as f,c as m,o as $,l as r,m as n,t as a,w as l,n as u,p as b,q as v,s as w,P as g}from"./c7hq37oz.js";import"./cnm8jclt.js";import"./h81lm604.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="b36baaf0-0291-4637-b8fe-25bd114aafa7",t._sentryDebugIdIdentifier="sentry-dbid-b36baaf0-0291-4637-b8fe-25bd114aafa7")}catch{}})();const y={name:"ActivateAccount",data(){return{error:"",password:{value:"",error:!1}}},computed:{},mounted(){this.apiCall(null)},methods:{activateAccount(){this.apiCall(this.password.value)},apiCall(t){this.$axios.$post("/api/customer/activate/",{password:t,activation_key:(this._.provides[g]||this.$route).params.hash}).then(e=>{this.login(e.email,t)}).catch(e=>{if(t!==null&&!t){this.password.error=this.$t("Password is required");return}if(e.response&&e.response.status===400){if(e.data.error=="invalid_key"){this.error=this.$t("Request expired"),this.$flashError(this.error);return}else if(e.data.error=="already_activated"){this.error=this.$t("Your username"),this.$flashError(this.error);return}}t!==null&&(console.error(e),this.$flashError(this.$t("An unexpected error")+"(#9209)"))})},login(t,e){this.$axios.$post("/api/auth/token/",{client_id:this.$config.public.OAUTH_PROVIDER_CLIENT_ID,grant_type:"password",username:t,password:e}).then(o=>{this.$store.dispatch("auth/updateAuthentication",o),this.$router.push(this.$t("urls.accounts"))}).catch(()=>{this.$router.push(this.$t("urls.accounts-login"))})}}},A=["aria-label"],I={class:"error-msg"};function k(t,e,o,x,s,d){const c=_,p=b,h=w;return $(),m("div",{class:"ActivateAccount",role:"region","aria-label":t.$t("Activate account")},[r("h1",null,a(t.$t("Activate account")),1),r("form",{onSubmit:e[1]||(e[1]=v(i=>d.activateAccount(),["prevent"]))},[n(c,{modelValue:s.password,"onUpdate:modelValue":e[0]||(e[0]=i=>s.password=i),type:"password",label:"Enter password",required:""},null,8,["modelValue"]),r("p",I,a(s.error),1),n(p,{disabled:s.error.length>0},{default:l(()=>[u(a(t.$t("Activate account")),1)]),_:1},8,["disabled"])],32),e[2]||(e[2]=r("hr",null,null,-1)),n(h,{class:"forget-password",to:t.$t("urls.accounts-reset-password")},{default:l(()=>[u(a(t.$t("Request new link")),1)]),_:1},8,["to"])],8,A)}const q=f(y,[["render",k],["__scopeId","data-v-f297f649"]]);export{q as default};
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.