1import{_ as b,a as v,b as y}from"./Cjhmt-sR.js";import{e as V,A as N,R as $,S as B,M as S,c as f,a as r,b as t,s as k,w as n,h as s,o as d,D as C,d as E}from"./C-RFA3h7.js";import{t as T}from"./CQ7Yzgn1.js";import{B as j}from"./BfYU6p1n.js";import{o as q,s as z,e as A}from"./BuLjiQzL.js";import"./CKCg0hFe.js";const O=(u,o)=>()=>({path:"/auth/password/request",method:"POST",body:JSON.stringify({email:u,...o?{reset_url:o}:{}})}),U={class:"px-gutter w-full flex-1 flex flex-col items-center py-12"},D={class:"w-full max-w-[30rem] bg-white rounded-xl p-5 sm:p-8 flex flex-col items-center gap-6 relative"},I={key:0,class:"w-full h-full absolute inset-0 bg-white/50 rounded-xl"},G=V({__name:"forgot-password",setup(u){const{$directus:o}=N(),x=q({email:z().min(1,"å¿
å¡«").pipe(A("Email æ ¼å¼ä¸æ£ç¢º"))}),i=$({email:""}),m=B(),a=S(!1);async function _(p){const c=`${window.location.origin}/login/reset-password`;a.value=!0;const[l]=await T(o.request(O(p.data.email,c)));if(a.value=!1,l){m.add({title:"Error",description:l.message,color:"error",progress:!1,duration:5e3});return}m.add({title:"Success",description:"å·²ç¼éå¿è¨å¯ç¢¼ä¿¡ä»¶è³ä¿¡ç®±",color:"success",progress:!1,duration:2e3})}return(p,e)=>{const c=y,l=v,h=C,w=b;return d(),f("section",U,[r("div",D,[e[3]||(e[3]=r("h2",{class:"text-primary text-xl font-semibold"},"å¿è¨å¯ç¢¼",-1)),t(w,{class:"w-full flex flex-col gap-6",schema:s(x),state:s(i),onSubmit:_,"validate-on":[]},{default:n(()=>[t(l,{name:"email",class:"w-full"},{default:n(()=>[t(c,{modelValue:s(i).email,"onUpdate:modelValue":e[0]||(e[0]=g=>s(i).email=g),ui:{base:"peer"},class:"w-full",placeholder:"",size:"xl"},{default:n(()=>[...e[1]||(e[1]=[r("label",{class:"pointer-events-none absolute left-0 -top-2.5 text-highlighted text-xs font-medium px-1.5 transition-all peer-focus:-top-2.5 peer-focus:text-highlighted peer-focus:text-xs peer-focus:font-medium peer-placeholder-shown:text-base peer-placeholder-shown:text-dimmed peer-placeholder-shown:top-1.5 peer-placeholder-shown:font-normal"},[r("span",{class:"inline-flex bg-default px-1"}," é»åä¿¡ç®± ( 帳è ) ")],-1)])]),_:1},8,["modelValue"])]),_:1}),t(h,{type:"submit",class:"w-full",ui:{base:"justify-center cursor-pointer"},size:"xl"},{default:n(()=>[...e[2]||(e[2]=[E(" éåº ",-1)])]),_:1})]),_:1},8,["schema","state"]),s(a)?(d(),f("div",I,[t(j,{"is-show":s(a),class:"w-full h-full",text:"éåºä¸...",color:"var(--ui-primary)"},null,8,["is-show"])])):k("",!0)])])}}});export{G 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.