PageSourceSearch

https://taskon.xyz/assets/EmailCodeForm-DGeADbPA.js

js taskon.xyz collected 2026-09-24 10:09:44 UTC 3,491 bytes, 1 lines download raw bytes

1import{A as e,C as t,Et as n,Ft as r,H as i,O as a,S as o,Y as s,b as c,h as l,mt as u,w as d,wt as f,x as p,xt as m}from"./vue.runtime.esm-bundler-BZJEAd2_.js";import{Ai as h,Fr as g,Pr as _,x as v}from"./track-CV3zh0zK.js";import{n as y}from"./vue-i18n.runtime-85TcL2zd.js";import{t as b}from"./BaseButton-Dn_Tt6GO.js";import{n as x,r as S}from"./dist-d1ftKbVA.js";import{t as C}from"./FormItem-DHfRNGWL.js";import{t as w}from"./useFormValidator-lgeDymZr.js";import{t as T}from"./BaseInputPro-DIKJOb0p.js";var E=async(e,t)=>{let{result:n}=await _({url:`/v1/requestEmailVerifyCode`,method:`POST`,data:e,...t});if(n===void 0)throw Error(`unexpected: result should exist when no error`);return n},D=(e,t)=>{let r=n(!1),a=n(!1),o=n(``),s=n(0),l=n(``),u=null,{t:d}=y(),f=n(!1),p=c(()=>f.value?d(`email_already_linked`):``),m=()=>{s.value=60,u=setInterval(()=>{--s.value,s.value===0&&u&&clearInterval(u)},1e3)};return i(()=>{u&&clearInterval(u)}),{isSend:r,code:o,sendCode:async n=>{try{await E({email:n,type:e,...t?{google_recaptcha:l.value}:{}},{loading:a}),r.value=!0,m()}catch(e){let{errorCode:t,message:n}=e;t===g.SNS_BIND_DUPLICATE_ERROR?f.value=!0:h.error(v(t,n))}}
1,sending:a,countdown:s,isEmailDuplicate:f,duplicateErrMsg:p,ga:l}},O=function(e){return e.Login=`Login`,e.Bind=`Bind`,e}({}),k={class:`tw-flex tw-items-center`},A=e({__name:`EmailCodeForm`,props:{needGa:{type:Boolean},codeType:{default:O.Bind},confirmLabel:{},loading:{type:Boolean},codeInvalid:{type:Boolean}},emits:[`confirm`,`update:codeInvalid`],setup(e,{emit:n}){let i=e,h=n,{t:g}=y(),{withMessage:_}=x,v=f({link:``}),{v$:E}=w(c(()=>({link:{valid:_(g(`please_enter_valid_val`,{val:g(`email_address`)}),S)}})),v,`link-email`),{code:O,isSend:A,sendCode:j,sending:M,countdown:N,duplicateErrMsg:P,isEmailDuplicate:F}=D(i.codeType,i.needGa),I=c(()=>i.codeInvalid?g(`please_enter_valid_code`):``),L=()=>{F.value=!1,h(`update:codeInvalid`,!1)},R=async()=>{await E.value.$validate()&&await j(v.link)},z=async()=>{await E.value.$validate()&&h(`confirm`,v.link,O.value)};return(e,n)=>(s(),d(l,null,[a(C,{label:r(g)(`email_address`),"err-msg":r(P)||r(E).link.$errors[0]?.$message},{default:u(()=>[a(T,{modelValue:v.link,"onUpdate:modelValue":n[0]||=e=>v.link=e,maxlength:`64`,type:`light`,placeholder:r(g)(`please_enter_val`,{val:r(g)(`email_address`)}),onInput:L,onBlur:n[1]||=e=>v.link=v.link.trim()},null,8,[`modelValue`,`placeholder`])]),_:1},8,[`label`,`err-msg`]),r(A)?(s(),o(C,{key:0,label:r(g)(`verification_code`),"err-msg":I.value},{default:u(()=>[p(`div`,k,[a(T,{modelValue:r(O),"onUpdate:modelValue":n[2]||=e=>m(O)?O.value=e:null,type:`light`,placeholder:r(g)(`please_enter_val`,{val:r(g)(`verification_code`)}),onInput:L,onBlur:n[3]||=e=>O.value=r(O).trim()},null,8,[`modelValue`,`placeholder`]),a(b,{class:`tw-ml-2.5 tw-min-w-[87px] mb:tw-ml-[2.133vw] mb:!tw-min-w-[19.6vw]`,type:`confirm`,disabled:r(N)>0,loading:r(M),label:r(N)>0?r(g)(`resend_code_val`,{val:r(N)}):r(g)(`resend_code`),onClick:R},null,8,[`disabled`,`loading`,`label`])])]),_:1},8,[`label`,`err-msg`])):t(``,!0),r(A)?(s(),o(b,{key:1,class:`tw-mt-[30px] mb:tw-mt-[4vw]`,type:`confirm`,label:e.confirmLabel||r(g)(`confirm`),disabled:!(v.link&&r(O)),loading:e.loading,wide:``,onClick:z},null,8,[`label`,`disabled`,`loading`])):(s(),o(b,{key:2,class:`tw-mt-[30px] mb:tw-mt-[4vw]`,type:`confirm`,label:r(g)(`send_verification_code`),disabled:!v.link,loading:r(M),wide:``,onClick:R},null,8,[`label`,`disabled`,`loading`]))],64))}});export{O as n,A as t};

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.