Files
PhaseWeb3-Vue/assets/ClaimView.614ac9dd.js

2 lines
1.9 KiB
JavaScript

import{r as _,s as g,a as i,c as m,w as t,b as e,W as X,X as C,e as r,a4 as h,_ as I,v as y,f as $,I as b,R as v,k as w,a3 as V,y as x,l as A,n as S,g as k}from"./index.3d4bf4c6.js";import{_ as d}from"./FormField.6dc9c939.js";import{_ as c}from"./FormControl.93f28bf6.js";const E=k("h2",{class:"text-xl mb-6 lg:w-1/2"}," If you registered a card in game and need to claim it, you may do so here. Please note that the account cannot already be claimed! ",-1),B={__name:"ClaimView",setup(D){const s=_(!1),n=g({cardId:null,pin:null});function u(l){var a=l.target.value;a=a.replace(/[^A-Za-z0-9]/g,""),a=a.toUpperCase().replace(/(.{4})/g,"$1-").replace(/-$/,""),n.cardId=a}function p(l){l.target.value=l.target.value.replace(/\D/g,"")}async function f(){s.value=!0}return(l,a)=>(i(),m(S,null,{default:t(()=>[e(A,null,{default:t(()=>[e(X,{class:"mb-6","use-small":"","even-smaller":""}),e(C,{icon:r(h),title:"Claim a Profile",main:""},null,8,["icon"]),e(I,{"is-form":"",class:"row-span-2 mb-6",onSubmit:a[2]||(a[2]=y(o=>f(),["prevent"]))},{footer:t(()=>[e($,{type:"submit",color:"success",label:"Start Claim"}),s.value?(i(),m(b,{key:0,path:r(v),color:"text-yellow-500",class:"animate animate-spin"},null,8,["path"])):w("",!0)]),default:t(()=>[E,e(d,{label:"Card ID",help:"The 16 character ACCESS CODE. If your card is dated after 2016, you'll need to get the ACCESS CODE from a game."},{default:t(()=>[e(c,{modelValue:n.cardId,"onUpdate:modelValue":a[0]||(a[0]=o=>n.cardId=o),icon:r(V),name:"cardId",type:"card",placeholder:"XXXX-XXXX-XXXX-XXXX",minlength:19,maxlength:19,required:"",onInput:u},null,8,["modelValue","icon"])]),_:1}),e(d,{label:"PIN",help:"Used when logging into a game"},{default:t(()=>[e(c,{modelValue:n.pin,"onUpdate:modelValue":a[1]||(a[1]=o=>n.pin=o),icon:r(x),type:"password",name:"pin",minlength:4,maxlength:4,inputmode:"numeric",pattern:"\\d{4}",autocomplete:"pin",onInput:p},null,8,["modelValue","icon"])]),_:1})]),_:1})]),_:1})]),_:1}))}};export{B as default};