(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[192],{1110:(e,t,s)=>{"use strict";s.d(t,{L:()=>c});var r=s(95155),a=s(12115),n=s(65142),l=s(76444),i=s(52508);function c(e){let{value:t,onChange:s,label:c="شماره موبایل",placeholder:d="09123456789",error:o,disabled:u=!1,autoFocus:x=!1,required:h=!0}=e,[m,g]=(0,a.useState)(!1),b=(0,a.useCallback)(e=>{let t=e.replace(/\D/g,"").substring(0,11);return t.length<=4?t:t.length<=7?"".concat(t.substring(0,4)," ").concat(t.substring(4)):"".concat(t.substring(0,4)," ").concat(t.substring(4,7)," ").concat(t.substring(7))},[])(t);return(0,r.jsxs)("div",{className:"space-y-2",children:[c&&(0,r.jsxs)(l.J,{htmlFor:"phone",className:"text-white",children:[c,h&&(0,r.jsx)("span",{className:"text-red-400 mr-1",children:"*"})]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(n.p,{id:"phone",type:"tel",dir:"ltr",value:b,onChange:e=>{let t=e.target.value.replace(/\D/g,"");t.length<=11&&s(t)},onFocus:()=>g(!0),onBlur:()=>g(!1),disabled:u,autoFocus:x,autoComplete:"off",placeholder:d,className:"\n            bg-white/10 border-white/30 text-white placeholder:text-gray-400 pr-10\n            text-left font-mono rounded-2xl\n            ".concat(o?"border-red-500":"","\n            ").concat(m?"ring-2 ring-purple-500":"","\n          ")}),(0,r.jsx)(i.A,{className:"\n            absolute right-3 top-1/2 transform -translate-y-1/2 h-4 w-4\n            ".concat(o?"text-red-400":m?"text-purple-400":"text-gray-400","\n          ")})]}),o&&(0,r.jsx)("p",{className:"text-sm text-red-400 mt-1",children:o}),(0,r.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"شماره موبایل باید با 09 شروع شود"})]})}},3998:(e,t,s)=>{"use strict";s.d(t,{$:()=>c});var r=s(95155);s(12115);var a=s(32467),n=s(83101),l=s(64269);let i=(0,n.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function c(e){let{className:t,variant:s,size:n,asChild:c=!1,...d}=e,o=c?a.DX:"button";return(0,r.jsx)(o,{"data-slot":"button",className:(0,l.cn)(i({variant:s,size:n,className:t})),...d})}},4076:(e,t,s)=>{Promise.resolve().then(s.bind(s,49253))},6168:(e,t,s)=>{"use strict";s.d(t,{l:()=>c});var r=s(95155),a=s(12115),n=s(3998),l=s(26983),i=s(89559);function c(e){let{duration:t,onResend:s,disabled:c=!1}=e,[d,o]=(0,a.useState)(t),[u,x]=(0,a.useState)(!1);(0,a.useEffect)(()=>{if(d<=0||c)return;let e=setInterval(()=>{o(t=>t<=1?(clearInterval(e),0):t-1)},1e3);return()=>clearInterval(e)},[d,c]);let h=async()=>{x(!0);try{await s(),o(t)}finally{x(!1)}},m=0===d&&!u&&!c;return(0,r.jsx)("div",{className:"flex flex-col items-center gap-3",children:d>0?(0,r.jsxs)("div",{className:"flex items-center gap-2 text-gray-300",children:[(0,r.jsx)(l.A,{className:"h-4 w-4"}),(0,r.jsxs)("span",{className:"text-sm",children:["ارسال مجدد کد در ",(e=>{let t=Math.floor(e/60);return"".concat(t,":").concat((e%60).toString().padStart(2,"0"))})(d)]})]}):(0,r.jsx)(n.$,{type:"button",variant:"outline",onClick:h,disabled:!m,className:"bg-white/5 border-white/30 text-white hover:bg-white/10 disabled:opacity-50 disabled:cursor-not-allowed",children:u?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.A,{className:"h-4 w-4 ml-2 animate-spin"}),"در حال ارسال..."]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.A,{className:"h-4 w-4 ml-2"}),"ارسال مجدد کد"]})})})}},18332:(e,t,s)=>{"use strict";s.d(t,{Fc:()=>c,TN:()=>d});var r=s(95155),a=s(12115),n=s(83101),l=s(64269);let i=(0,n.F)("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:right-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pr-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),c=a.forwardRef((e,t)=>{let{className:s,variant:a,...n}=e;return(0,r.jsx)("div",{ref:t,role:"alert",className:(0,l.cn)(i({variant:a}),s),...n})});c.displayName="Alert",a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("h5",{ref:t,className:(0,l.cn)("mb-1 font-medium leading-none tracking-tight",s),...a})}).displayName="AlertTitle";let d=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("div",{ref:t,className:(0,l.cn)("text-sm [&_p]:leading-relaxed",s),...a})});d.displayName="AlertDescription"},37861:(e,t,s)=>{"use strict";s.d(t,{g:()=>d,u:()=>c});var r=s(95155),a=s(23327),n=s(5917),l=s(65229),i=s(76343);function c(e){let{password:t,showGuide:s=!0}=e,c=(0,i.mH)(t),d=(0,i.Oj)(t);return s?(0,r.jsxs)("div",{className:"mt-2 p-3 sm:p-4 bg-gray-50 rounded-lg border border-gray-200",children:[(0,r.jsxs)("div",{className:"flex items-center space-x-2 space-x-reverse mb-3",children:[(0,r.jsx)(a.A,{className:"h-4 w-4 text-blue-500"}),(0,r.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"شرایط رمز عبور امن"})]}),(0,r.jsx)("div",{className:"space-y-2",children:c.map(e=>(0,r.jsxs)("div",{className:"flex items-center space-x-2 space-x-reverse",children:[e.met?(0,r.jsx)(n.A,{className:"h-3 w-3 text-green-500 flex-shrink-0"}):(0,r.jsx)(l.A,{className:"h-3 w-3 text-red-500 flex-shrink-0"}),(0,r.jsx)("span",{className:"text-xs sm:text-sm ".concat(e.met?"text-green-700":"text-gray-600"),children:e.text})]},e.id))}),t.length>0&&(0,r.jsxs)("div",{className:"mt-3 pt-3 border-t border-gray-200",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,r.jsx)("span",{className:"text-xs sm:text-sm text-gray-600",children:"قدرت رمز عبور:"}),(0,r.jsx)("span",{className:"text-xs sm:text-sm font-medium ".concat((0,i.Cb)(d.strength)),children:(0,i.uA)(d.strength)})]}),(0,r.jsx)("div",{className:"w-full bg-gray-200 rounded-full h-1.5",children:(0,r.jsx)("div",{className:"h-1.5 rounded-full transition-all duration-300 ".concat("strong"===d.strength?"bg-green-500 w-full":"medium"===d.strength?"bg-yellow-500 w-2/3":"bg-red-500 w-1/3")})})]})]}):null}function d(e){let{password:t,className:s=""}=e,a=(0,i.Oj)(t);return 0===t.length?null:(0,r.jsxs)("div",{className:"flex items-center space-x-1 space-x-reverse ".concat(s),children:[(0,r.jsx)("span",{className:"text-xs sm:text-sm text-gray-500",children:"قدرت:"}),(0,r.jsx)("span",{className:"text-xs sm:text-sm font-medium ".concat((0,i.Cb)(a.strength)),children:(0,i.uA)(a.strength)})]})}},39137:(e,t,s)=>{"use strict";function r(e){let t=e.replace(/[\s\-()]/g,"");return/^09\d{9}$/.test(t)?{isValid:!0,normalized:t}:{isValid:!1,message:"شماره موبایل باید با 09 شروع شود و 11 رقم باشد (مثال: 09123456789)"}}function a(e){let t=e.replace(/[\s\-()]/g,"");return 11===t.length&&t.startsWith("09")?"".concat(t.substring(0,4)," ").concat(t.substring(4,7)," ").concat(t.substring(7)):e}s.d(t,{FI:()=>a,To:()=>r})},47231:(e,t,s)=>{"use strict";s.d(t,{w:()=>c});var r=s(95155),a=s(12115),n=s(65142),l=s(76444),i=s(17910);function c(e){let{length:t=5,value:s,onChange:c,onComplete:d,label:o="کد تأیید",error:u,disabled:x=!1,autoFocus:h=!0}=e,[m,g]=(0,a.useState)(!1),b=(0,a.useRef)([]);(0,a.useEffect)(()=>{b.current=b.current.slice(0,t)},[t]),(0,a.useEffect)(()=>{h&&b.current[0]&&b.current[0].focus()},[h]),(0,a.useEffect)(()=>{s.length===t&&d&&d(s)},[s,t,d]);let p=(0,a.useCallback)((e,r)=>{var a,n,l;let i=r.replace(/\D/g,"");if(0===i.length){c(s.substring(0,e)+s.substring(e+1)),e>0&&b.current[e-1]&&(null==(a=b.current[e-1])||a.focus());return}if(i.length>1){let e=(s+i).substring(0,t);c(e);let r=Math.min(e.length,t-1);null==(n=b.current[r])||n.focus();return}c((s.substring(0,e)+i+s.substring(e+1)).substring(0,t)),e<t-1&&b.current[e+1]&&(null==(l=b.current[e+1])||l.focus())},[s,t,c]),f=(0,a.useCallback)((e,r)=>{var a,n,l;"Backspace"===r.key&&!s[e]&&e>0?null==(a=b.current[e-1])||a.focus():"ArrowLeft"===r.key?(r.preventDefault(),e>0&&(null==(n=b.current[e-1])||n.focus())):"ArrowRight"===r.key&&(r.preventDefault(),e<t-1&&(null==(l=b.current[e+1])||l.focus()))},[s,t]),v=(0,a.useCallback)(e=>{var s;e.preventDefault();let r=e.clipboardData.getData("text").replace(/\D/g,"").substring(0,t);c(r);let a=Math.min(r.length,t-1);null==(s=b.current[a])||s.focus()},[t,c]);return(0,r.jsxs)("div",{className:"space-y-4",children:[o&&(0,r.jsxs)(l.J,{className:"text-white flex items-center gap-2",children:[(0,r.jsx)(i.A,{className:"h-4 w-4"}),o]}),(0,r.jsx)("div",{className:"flex justify-center gap-2",dir:"ltr",children:Array.from({length:t},(e,t)=>(0,r.jsx)(n.p,{ref:e=>{b.current[t]=e},type:"text",inputMode:"numeric",pattern:"[0-9]*",maxLength:1,value:s[t]||"",onChange:e=>p(t,e.target.value),onKeyDown:e=>f(t,e),onPaste:v,onFocus:()=>g(!0),onBlur:()=>g(!1),disabled:x,className:"\n              w-12 h-14 text-center text-2xl font-bold\n              bg-white/10 border-white/30 text-white\n              ".concat(u?"border-red-500":"","\n              ").concat(m?"ring-2 ring-purple-500":"","\n              transition-all\n            ")},t))}),u&&(0,r.jsx)("p",{className:"text-sm text-red-400 text-center mt-2",children:u})]})}},49253:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>A});var r=s(95155),a=s(12115),n=s(52619),l=s.n(n),i=s(3998),c=s(55010),d=s(76444),o=s(18332),u=s(71871),x=s(52987),h=s(52508),m=s(99708),g=s(70532),b=s(57828),p=s(42529),f=s(1110),v=s(47231),w=s(6168),j=s(39137),N=s(76343),y=s(37861);function k(){let[e,t]=(0,a.useState)("phone"),[s,n]=(0,a.useState)(""),[k,A]=(0,a.useState)(""),[C,S]=(0,a.useState)(""),[T,E]=(0,a.useState)(""),[F,L]=(0,a.useState)(!1),[O,D]=(0,a.useState)(!1),[P,_]=(0,a.useState)(!1),[B,z]=(0,a.useState)(!1),[R,$]=(0,a.useState)(!1),[J,q]=(0,a.useState)(!1),[I,V]=(0,a.useState)(""),[M,Z]=(0,a.useState)(""),W={background:"from-emerald-900 via-teal-900 to-cyan-900",iconBg:"from-emerald-600 to-teal-600",buttonBg:"from-emerald-600 to-teal-600 hover:from-emerald-700 hover:to-teal-700",backLink:"/auth/business/signin",title:"فراموشی رمز عبور کسب‌وکار",icon:u.A,backText:"بازگشت به ورود کسب‌وکار"},H=async e=>{if(e.preventDefault(),V(""),Z(""),!(0,j.To)(s))return void V("شماره تلفن معتبر نیست");z(!0);try{let e=await fetch("/api/auth/otp/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phone:s,mode:"reset",userRole:"CAFE_OWNER"})}),r=await e.json();if(!e.ok||!r.success)throw Error(r.message||"ارسال کد ناموفق بود");t("otp")}catch(e){V(e instanceof Error?e.message:"خطا در ارسال کد")}finally{z(!1)}},K=async e=>{if(!J&&5===e.length){V(""),z(!0),q(!0);try{let r=await fetch("/api/auth/otp/verify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phone:s,code:e})}),a=await r.json();if(!r.ok||!a.success)throw Error(a.message||"کد نامعتبر است");A(e),t("password")}catch(e){V(e instanceof Error?e.message:"خطا در تأیید کد"),A("")}finally{q(!1),z(!1)}}},Q=async e=>{e.preventDefault(),V("");let r=(0,N.Oj)(C);if(!r.isValid)return void V(r.errors[0]);if(C!==T)return void V("رمز عبور و تأیید آن مطابقت ندارند");z(!0);try{let e=await fetch("/api/auth/otp/reset-password-simple",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phone:s,code:k,newPassword:C})}),r=await e.json();if(!e.ok||!r.success)throw Error(r.message||"تغییر رمز عبور ناموفق بود");t("success")}catch(e){V(e instanceof Error?e.message:"خطا در تغییر رمز عبور")}finally{z(!1)}},X=async()=>{V(""),$(!0);try{let e=await fetch("/api/auth/otp/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phone:s,mode:"reset",userRole:"CAFE_OWNER"})}),t=await e.json();if(!e.ok||!t.success)throw Error(t.message||"ارسال مجدد ناموفق بود");Z("کد جدید ارسال شد"),A("")}catch(e){V(e instanceof Error?e.message:"خطا در ارسال مجدد")}finally{$(!1)}},G=W.icon;return"phone"===e?(0,r.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br ".concat(W.background," p-4"),children:(0,r.jsxs)("div",{className:"max-w-md w-full space-y-8 bg-white/10 backdrop-blur-lg rounded-3xl border border-white/20 p-8 shadow-2xl",children:[(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"flex justify-center mb-4",children:(0,r.jsx)("div",{className:"p-3 bg-gradient-to-r ".concat(W.iconBg," rounded-full"),children:(0,r.jsx)(G,{className:"h-8 w-8 text-white"})})}),(0,r.jsx)("h2",{className:"text-3xl font-bold text-white mb-2",children:W.title})]}),I&&(0,r.jsx)(o.Fc,{className:"border-red-500/50 bg-red-500/10 text-red-200",children:(0,r.jsx)(o.TN,{children:I})}),(0,r.jsxs)("form",{onSubmit:H,className:"space-y-6",children:[(0,r.jsx)("div",{children:(0,r.jsx)(f.L,{value:s,onChange:n,disabled:B})}),(0,r.jsx)(i.$,{type:"submit",disabled:B||!(0,j.To)(s),className:"w-full bg-gradient-to-r ".concat(W.buttonBg," text-white font-medium py-3 rounded-2xl shadow-lg transition-all"),children:B?"در حال ارسال...":"ارسال کد تأیید"}),(0,r.jsx)("div",{className:"text-center",children:(0,r.jsxs)(l(),{href:W.backLink,className:"text-sm text-gray-300 hover:text-white hover:underline inline-flex items-center",children:[(0,r.jsx)(x.A,{className:"ml-1 h-3 w-3"}),W.backText]})})]})]})}):"otp"===e?(0,r.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br ".concat(W.background," p-4"),children:(0,r.jsxs)("div",{className:"max-w-md w-full space-y-8 bg-white/10 backdrop-blur-lg rounded-3xl border border-white/20 p-8 shadow-2xl",children:[(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"flex justify-center mb-4",children:(0,r.jsx)("div",{className:"p-3 bg-gradient-to-r ".concat(W.iconBg," rounded-full"),children:(0,r.jsx)(h.A,{className:"h-8 w-8 text-white"})})}),(0,r.jsx)("h2",{className:"text-3xl font-bold text-white mb-2",children:"تأیید شماره تلفن"}),(0,r.jsx)("p",{className:"text-gray-300 mb-2",children:"کد تأیید ارسال شده را وارد کنید"}),(0,r.jsx)("p",{className:"text-sm text-gray-400",dir:"ltr",children:(0,j.FI)(s)})]}),I&&(0,r.jsx)(o.Fc,{className:"border-red-500/50 bg-red-500/10 text-red-200",children:(0,r.jsx)(o.TN,{children:I})}),M&&(0,r.jsx)(o.Fc,{className:"border-green-500/50 bg-green-500/10 text-green-200",children:(0,r.jsx)(o.TN,{children:M})}),(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsx)(v.w,{value:k,onChange:A,onComplete:K,disabled:B||J}),(0,r.jsxs)("div",{className:"bg-blue-500/10 border border-blue-500/30 rounded-2xl p-4",children:[(0,r.jsx)("p",{className:"text-sm text-blue-200 text-right mb-3",children:"کد تأیید 5 رقمی را وارد کنید"}),(0,r.jsx)(w.l,{duration:120,onResend:X,disabled:R||J})]}),(0,r.jsx)(i.$,{onClick:()=>K(k),disabled:B||J||5!==k.length,className:"w-full bg-gradient-to-r ".concat(W.buttonBg," text-white font-medium py-3 rounded-2xl shadow-lg transition-all"),children:B?"در حال تأیید...":"تأیید کد"}),(0,r.jsx)("div",{className:"text-center",children:(0,r.jsxs)("button",{type:"button",onClick:()=>{t("phone"),n(""),A(""),V("")},className:"text-sm text-gray-300 hover:text-white hover:underline inline-flex items-center",children:[(0,r.jsx)(x.A,{className:"ml-1 h-3 w-3"}),"تغییر شماره تلفن"]})})]})]})}):"password"===e?(0,r.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br ".concat(W.background," p-4"),children:(0,r.jsxs)("div",{className:"max-w-md w-full space-y-8 bg-white/10 backdrop-blur-lg rounded-3xl border border-white/20 p-8 shadow-2xl",children:[(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"flex justify-center mb-4",children:(0,r.jsx)("div",{className:"p-3 bg-gradient-to-r ".concat(W.iconBg," rounded-full"),children:(0,r.jsx)(m.A,{className:"h-8 w-8 text-white"})})}),(0,r.jsx)("h2",{className:"text-3xl font-bold text-white mb-2",children:"رمز عبور جدید"}),(0,r.jsx)("p",{className:"text-gray-300",children:"رمز عبور جدید خود را وارد کنید"})]}),I&&(0,r.jsx)(o.Fc,{className:"border-red-500/50 bg-red-500/10 text-red-200",children:(0,r.jsx)(o.TN,{children:I})}),(0,r.jsxs)("form",{onSubmit:Q,className:"space-y-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(d.J,{htmlFor:"newPassword",className:"text-white",children:"رمز عبور جدید"}),(0,r.jsxs)("div",{className:"relative mt-1",children:[(0,r.jsx)(c.y,{id:"newPassword",name:"newPassword",type:F?"text":"password",required:!0,value:C,onChange:e=>S(e.target.value),onFocus:()=>_(!0),className:"bg-white/10 border-white/30 text-white placeholder:text-gray-400 pr-10 pl-10 rounded-2xl",placeholder:"رمز عبور امن وارد کنید",disabled:B}),(0,r.jsx)(m.A,{className:"absolute right-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),(0,r.jsx)("button",{type:"button",onClick:()=>L(!F),className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-white",children:F?(0,r.jsx)(g.A,{className:"h-4 w-4"}):(0,r.jsx)(b.A,{className:"h-4 w-4"})})]}),P&&(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(y.u,{password:C})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(d.J,{htmlFor:"confirmPassword",className:"text-white",children:"تأیید رمز عبور"}),(0,r.jsxs)("div",{className:"relative mt-1",children:[(0,r.jsx)(c.y,{id:"confirmPassword",name:"confirmPassword",type:O?"text":"password",required:!0,value:T,onChange:e=>E(e.target.value),className:"bg-white/10 border-white/30 text-white placeholder:text-gray-400 pr-10 pl-10 rounded-2xl",placeholder:"رمز عبور را مجدداً وارد کنید",disabled:B}),(0,r.jsx)(m.A,{className:"absolute right-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),(0,r.jsx)("button",{type:"button",onClick:()=>D(!O),className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-white",children:O?(0,r.jsx)(g.A,{className:"h-4 w-4"}):(0,r.jsx)(b.A,{className:"h-4 w-4"})})]})]}),(0,r.jsx)(i.$,{type:"submit",disabled:B,className:"w-full bg-gradient-to-r ".concat(W.buttonBg," text-white font-medium py-3 rounded-2xl shadow-lg transition-all"),children:B?"در حال تغییر رمز...":"تغییر رمز عبور"})]})]})}):"success"===e?(0,r.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br ".concat(W.background," p-4"),children:(0,r.jsxs)("div",{className:"max-w-md w-full space-y-8 bg-white/10 backdrop-blur-lg rounded-3xl border border-white/20 p-8 shadow-2xl",children:[(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"flex justify-center mb-4",children:(0,r.jsx)("div",{className:"p-3 bg-gradient-to-r from-green-600 to-teal-600 rounded-full",children:(0,r.jsx)(p.A,{className:"h-8 w-8 text-white"})})}),(0,r.jsx)("h2",{className:"text-3xl font-bold text-white mb-2",children:"رمز عبور تغییر یافت"}),(0,r.jsx)("p",{className:"text-gray-300 mb-6",children:"رمز عبور شما با موفقیت تغییر یافته است. می‌توانید با رمز عبور جدید وارد شوید."})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(i.$,{asChild:!0,className:"w-full bg-gradient-to-r ".concat(W.buttonBg," rounded-2xl shadow-lg transition-all"),children:(0,r.jsxs)(l(),{href:W.backLink,children:[(0,r.jsx)(x.A,{className:"ml-2 h-4 w-4"}),W.backText]})}),(0,r.jsx)(i.$,{variant:"outline",onClick:()=>{n(""),A(""),S(""),E(""),t("phone"),V("")},className:"w-full bg-white/10 border-white/30 text-white hover:bg-white/20 rounded-2xl",children:"بازنشانی مجدد رمز عبور"})]})]})}):null}function A(){return(0,r.jsx)(a.Suspense,{fallback:(0,r.jsx)("div",{children:"Loading..."}),children:(0,r.jsx)(k,{})})}},55010:(e,t,s)=>{"use strict";s.d(t,{y:()=>n});var r=s(95155);s(12115);var a=s(64269);function n(e){let{className:t,type:s="password",...n}=e;return(0,r.jsx)("input",{type:s,"data-slot":"input",lang:"en",inputMode:"text",autoCapitalize:"none",autoCorrect:"off",autoComplete:(()=>{var e,t;if(n.autoComplete)return n.autoComplete;let s=(null==(e=n.placeholder)?void 0:e.toString())||"",r=(null==(t=n.name)?void 0:t.toString())||"";return s.includes("جدید")||s.includes("new")||r.includes("new")?"new-password":(s.includes("فعلی")||s.includes("current")||r.includes("current"),"current-password")})(),className:(0,a.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),onInput:e=>{let t=e.currentTarget,s=t.value,r=s.replace(/[^a-zA-Z0-9!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?\s]/g,"");if(s!==r&&(t.value=r,n.onChange)){let s={...e,target:{...t,value:r}};n.onChange(s)}},...n})}},64269:(e,t,s)=>{"use strict";s.d(t,{cn:()=>n});var r=s(2821),a=s(75889);function n(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,a.QP)((0,r.$)(t))}},65142:(e,t,s)=>{"use strict";s.d(t,{p:()=>n});var r=s(95155);s(12115);var a=s(64269);function n(e){let{className:t,type:s,...n}=e;return(0,r.jsx)("input",{type:s,"data-slot":"input",className:(0,a.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...n})}},76343:(e,t,s)=>{"use strict";s.d(t,{Cb:()=>l,Oj:()=>a,mH:()=>n,uA:()=>i});let r={minLength:6,requireLetter:!0,requireNumbers:!0};function a(e){let t=[];e.length<r.minLength&&t.push("رمز عبور باید حداقل ".concat(r.minLength," کاراکتر باشد")),r.requireLetter&&!/[a-zA-Z]/.test(e)&&t.push("رمز عبور باید حداقل یک حرف انگلیسی داشته باشد"),r.requireNumbers&&!/[0-9]/.test(e)&&t.push("رمز عبور باید حداقل یک عدد داشته باشد");let s="weak";return 0===t.length&&(e.length>=10?s="strong":e.length>=8&&(s="medium")),{isValid:0===t.length,errors:t,strength:s}}function n(e){return[{id:"length",text:"حداقل ".concat(r.minLength," کاراکتر"),regex:new RegExp(".{".concat(r.minLength,",}")),met:e.length>=r.minLength},{id:"letter",text:"حداقل یک حرف انگلیسی",regex:/[a-zA-Z]/,met:/[a-zA-Z]/.test(e)},{id:"numbers",text:"حداقل یک عدد (0-9)",regex:/[0-9]/,met:/[0-9]/.test(e)}]}function l(e){switch(e){case"weak":return"text-red-500";case"medium":return"text-yellow-500";case"strong":return"text-green-500";default:return"text-gray-500"}}function i(e){switch(e){case"weak":return"ضعیف";case"medium":return"متوسط";case"strong":return"قوی";default:return""}}},76444:(e,t,s)=>{"use strict";s.d(t,{J:()=>l});var r=s(95155);s(12115);var a=s(10489),n=s(64269);function l(e){let{className:t,...s}=e;return(0,r.jsx)(a.b,{"data-slot":"label",className:(0,n.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...s})}}},e=>{e.O(0,[4909,2619,7882,8441,1255,7358],()=>e(e.s=4076)),_N_E=e.O()}]);