1import{q as T,r as x,a2 as k,c as p,u as $,o as D,b as o,d as s,f as d,B as O,i as E,g as m,w as V,a6 as I,k as L,ar as q,C as z,j as r,Q as M,e as f,t as w,au as U,D as g,F as G,h as W,J as Y,aA as H,n as J}from"./index-Yc0sXOKx.js";import{e as A}from"./crypto-DhdRn9pi.js";import{F as Q}from"./index-B9LUXihD.js";import{C as Z}from"./circle-check-CzXPGDux.js";import{_ as K}from"./index-dnjD8Due.js";import"./hasIn-DH-VoBaz.js";const X={class:"min-h-screen bg-white relative overflow-hidden flex items-center justify-center py-6 px-4 font-sans"},ee={class:"relative z-10 w-full max-w-[440px]"},se={class:"text-center mb-6"},te={class:"bg-white/90 backdrop-blur-sm rounded-2xl border border-gray-200/80 px-8 py-10 shadow-[0_4px_24px_rgba(74,142,238,0.08)]"},re={class:"mb-6"},oe={class:"inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full bg-[#E0EDFF] mb-3"},ae={key:0,class:"text-sm font-medium text-[#6B7280]"},ne={key:1,class:"text-sm font-medium text-red-500"},le={key:2,class:"text-sm font-medium text-[#6B7280]"},ie={key:0,class:"flex flex-col items-center justify-center py-12"},de={key:1,class:"space-y-4"},ue={key:2,class:"space-y-4 text-center"},ce={class:"w-16 h-16 bg-green-50 rounded-full flex items-center justify-center mx-auto mb-4"},pe={key:0,class:"p-3 bg-red-50 border border-red-100 text-red-600 text-xs font-medium rounded-lg text-center"},me={class:"space-y-1.5"},fe={class:"relative"},xe={key:0,class:"space-y-1.5 mt-2"},we={class:"flex gap-1 h-1"},ge={key:1,class:"text-[10px] text-red-500 font-medium"},ve={class:"space-y-1.5"},be={key:0,class:"text-[10px] text-red-500 font-medium"},_e=["disabled"],ye={key:0},he={key:1},ke={__name:"OrganisationPasswordResetConfirm",setup(Ee){const C=$(),v=z(),u=x(!1),b=x(!0),_=x(!1),c=x(!1),t=k({}),n=k({password:"",confirm_password:""}),y=p(()=>C.params.token),l=p(()=>{const a=n.password;if(!a)return 0;let e=0;return a.length>=8&&e++,/[A-Z]/.test(a)&&e++,/[0-9]/.test(a)&&e++,/[!@#$%^&*(),.?":{}|<>]/.test(a)&&e++,e}),P=p(()=>["Too Weak","Weak","Fair","Good","Strong"][l.value]),R=p(()=>l.value<=1?"bg-red-400":l.value===2?"bg-yellow-400":l.value===3?"bg-blue-400":"bg-green-400"),F=p(()=>l.value<=1?"text-red-500":l.value===2?"text-yellow-600":l.value===3?"text-blue-500":"text-green-500"),S=async()=>{if(!y.value){c.value=!0,b.value=!1;return}try{(await q(`/auth/organisation-password-reset-confirm/${y.value}/`)).status!==200&&(c.value=!0)}catch{c.value=!0}finally{b.value=!1}},B=async()=>{var a;if(n.password!==n.confirm_password){t.confirm_password="Passwords do not match";return}u.value=!0,Object.keys(t).forEach(e=>delete t[e]);try{const e=await H(`/auth/organisation-password-reset-confirm/${y.value}/`,{password:A(n.password),confirm_password:A(n.confirm_password)});e.status===200||e.status===201?(_.value=!0,J.success("Password reset successfully!")):(Object.assign(t,e.data),e.data.message&&(t.form_error=e.data.message))}catch(e){console.error("Reset confirm error:",e),(a=e.response)!=null&&a.data?Object.assign(t,e.response.data):t.form_error="Failed to reset password. Please try again."}finally{u.value=!1}};return D(()=>{S()}),(a,e)=>{const j=K,h=U,N=Q;return r(),o("div",X,[e[12]||(e[12]=s("div",{class:"absolute inset-0 bg-gradient-to-t from-[#4A8EEE]/[0.08] via-[#4A8EEE]/[0.03] via-40% to-transparent pointer-events-none"},null,-1)),e[13]||(e[13]=s("div",{class:"absolute -bottom-10 left-1/2 -translate-x-1/2 w-[600px] h-[300px] bg-[#4A8EEE]/[0.06] rounded-full blur-[100px] pointer-events-none"},null,-1)),s("div",ee,[s("div",se,[s("img",{src:O,alt:"sortmyprep",class:"h-7 md:h-8 mx-auto cursor-pointer",onClick:e[0]||(e[0]=i=>d(v).push("/"))})]),s("div",te,[s("div",re,[s("div",oe,[m(d(M),{size:12,"stroke-width":"2",class:"w-3 h-3 text-[#4A8EEE]"}),e[5]||(e[5]=s("span",{class:"text-[10px] font-bold text-[#4A8EEE] tracking-wide uppercase"},"Secure Reset",-1))]),e[6]||(e[6]=s("h2",{class:"text-2xl font-bold text-[#1E3456] mb-1.5"}," Reset Password ",-1)),_.value?(r(),o("p",ae," Your password has been reset successfully. ")):c.value?(r(),o("p",ne," This reset link is invalid or has expired. ")):(r(),o("p",le," Please enter your new password below. "))]),b.value?(r(),o("div",ie,e[7]||(e[7]=[s("div",{class:"w-10 h-10 border-4 border-[#4A8EEE]/20 border-t-[#4A8EEE] rounded-full animate-spin"},null,-1),s("p",{class:"mt-4 text-sm font-medium text-[#6B7280]"}," Verifying reset link... ",-1)]))):c.value?(r(),o("div",de,[m(j,{type:"error",message:"Invalid/Expired Link",description:"Please request a new password reset link."}),s("button",{onClick:e[1]||(e[1]=i=>d(v).push("/organisation/forgot-password")),class:"w-full h-11 bg-[#1E3456] text-white font-bold rounded-lg cursor-pointer"}," Request New Link ")])):_.value?(r(),o("div",ue,[s("div",ce,[m(d(Z),{class:"w-8 h-8 text-green-500"})]),e[8]||(e[8]=s("p",{class:"text-sm text-gray-600 font-medium"}," You can now sign in with your new password. ",-1)),s("button",{onClick:e[2]||(e[2]=i=>d(v).push("/register-organisation")),class:"w-full h-11 bg-[#4A8EEE] text-white font-bold rounded-lg cursor-pointer"}," Go to Sign In ")])):(r(),E(N,{key:3,class:"space-y-4",onSubmit:I(B,["prevent"]),layout:"vertical"},{default:V(()=>[t.form_error?(r(),o("div",pe,w(t.form_error),1)):f("",!0),s("div",me,[e[9]||(e[9]=s("label",{class:"text-xs font-bold text-gray-700 tracking-tight uppercase"},"New Password",-1)),s("div",fe,[m(h,{value:n.password,"onUpdate:value":e[3]||(e[3]=i=>n.password=i),class:g(["flex w-full h-11 bg-white border border-gray-200 pl-3 pr-10 text-sm font-medium rounded-lg outline-none transition-all focus:border-[#4A8EEE]",{"border-red-500":t.password}]),placeholder:"Minimum 8 characters"},null,8,["value","class"])]),n.password?(r(),o("div",xe,[s("div",we,[(r(),o(G,null,W(4,i=>s("div",{key:i,class:g(["flex-1 rounded-full transition-colors",[l.value>=i?R.value:"bg-gray-100"]])},null,2)),64))]),s("p",{class:g(["text-[10px] font-bold uppercase tracking-wider",F.value])}," Strength: "+w(P.value),3)])):f("",!0),t.password?(r(),o("span",ge,w(Array.isArray(t.password)?t.password[0]:t.password),1)):f("",!0)]),s("div",ve,[e[10]||(e[10]=s("label",{class:"text-xs font-bold text-gray-700 tracking-tight uppercase"},"Confirm Password",-1)),m(h,{value:n.confirm_password,"onUpdate:value":e[4]||(e[4]=i=>n.confirm_password=i),class:g(["flex w-full h-11 bg-white border border-gray-200 px-3 py-1 text-sm font-medium rounded-lg outline-none transition-all focus:border-[#4A8EEE]",{"border-red-500":t.confirm_password}]),placeholder:"Repeat new password"},null,8,["value","class"]),t.confirm_password?(r(),o("span",be,w(Array.isArray(t.confirm_password)?t.confirm_password[0]:t.confirm_password),1)):f("",!0)]),s("button",{type:"submit",disabled:u.value||l.value<3,class:"inline-flex items-center justify-center gap-2 w-full h-[46px] bg-[#4A8EEE] hover:bg-[#3B7FDD] text-white text-sm font-bold rounded-lg shadow-sm hover:shadow-md hover:scale-[1.01] active:scale-[0.98] transition-all duration-200 border-none cursor-pointer tracking-wide mt-2 disabled:opacity-50"},[u.value?(r(),o("span",he,"Updating...")):(r(),o("span",ye,"Set New Password")),u.value?f("",!0):(r(),E(d(Y),{key:2,class:"w-4 h-4 ml-2"}))],8,_e)]),_:1})),e[11]||(e[11]=s("div",{class:"mt-6 pt-6 border-t border-gray-100 text-center"},[s("p",{class:"text-xs text-gray-500 font-medium"},[L(" Having trouble? "),s("a",{href:"mailto:[email protected]",class:"text-[#4A8EEE] font-bold"},"Contact Support")])],-1))])])])}}},Be=T(ke,[["__scopeId","data-v-06ed1d07"]]);export{Be as default}; 2//# sourceMappingURL=OrganisationPasswordResetConfirm-CgH5bAMG.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.