(()=>{var e={};e.id=5277,e.ids=[5277],e.modules={53524:e=>{"use strict";e.exports=require("@prisma/client")},47849:e=>{"use strict";e.exports=require("next/dist/client/components/action-async-storage.external")},72934:e=>{"use strict";e.exports=require("next/dist/client/components/action-async-storage.external.js")},55403:e=>{"use strict";e.exports=require("next/dist/client/components/request-async-storage.external")},54580:e=>{"use strict";e.exports=require("next/dist/client/components/request-async-storage.external.js")},94749:e=>{"use strict";e.exports=require("next/dist/client/components/static-generation-async-storage.external")},45869:e=>{"use strict";e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},50852:e=>{"use strict";e.exports=require("async_hooks")},32081:e=>{"use strict";e.exports=require("child_process")},82361:e=>{"use strict";e.exports=require("events")},57147:e=>{"use strict";e.exports=require("fs")},73292:e=>{"use strict";e.exports=require("fs/promises")},22037:e=>{"use strict";e.exports=require("os")},71017:e=>{"use strict";e.exports=require("path")},76224:e=>{"use strict";e.exports=require("tty")},73837:e=>{"use strict";e.exports=require("util")},45472:(e,t,s)=>{"use strict";s.r(t),s.d(t,{GlobalError:()=>i.ZP,__next_app__:()=>u,originalPathname:()=>d,pages:()=>c,routeModule:()=>x,tree:()=>o});var r=s(50482),a=s(69108),i=s(83543),l=s(68300),n={};for(let e in l)0>["default","tree","pages","GlobalError","originalPathname","__next_app__","routeModule"].indexOf(e)&&(n[e]=()=>l[e]);s.d(t,n);let o=["",{children:["(auth)",{children:["reset-password",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(s.bind(s,7791)),"C:\\test2\\pagecraft-ai\\src\\app\\(auth)\\reset-password\\page.tsx"]}]},{}]},{layout:[()=>Promise.resolve().then(s.bind(s,84295)),"C:\\test2\\pagecraft-ai\\src\\app\\(auth)\\layout.tsx"]}]},{layout:[()=>Promise.resolve().then(s.bind(s,43625)),"C:\\test2\\pagecraft-ai\\src\\app\\layout.tsx"],error:[()=>Promise.resolve().then(s.bind(s,24117)),"C:\\test2\\pagecraft-ai\\src\\app\\error.tsx"],"not-found":[()=>Promise.resolve().then(s.bind(s,48206)),"C:\\test2\\pagecraft-ai\\src\\app\\not-found.tsx"]}],c=["C:\\test2\\pagecraft-ai\\src\\app\\(auth)\\reset-password\\page.tsx"],d="/(auth)/reset-password/page",u={require:s,loadChunk:()=>Promise.resolve()},x=new r.AppPageRouteModule({definition:{kind:a.x.APP_PAGE,page:"/(auth)/reset-password/page",pathname:"/reset-password",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:o}})},39071:(e,t,s)=>{Promise.resolve().then(s.bind(s,22233))},54839:(e,t,s)=>{Promise.resolve().then(s.bind(s,45424))},66138:(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,s(69224).Z)("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},64290:(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,s(69224).Z)("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},1222:(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,s(69224).Z)("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]])},53148:(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,s(69224).Z)("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},42739:(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,s(69224).Z)("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},47958:(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,s(69224).Z)("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},22233:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>o});var r=s(95344),a=s(30473),i=s(56506),l=s(89410),n=s(93109);function o({children:e}){let{siteName:t,logoUrl:s,logoSize:o}=(0,n.T)();return(0,r.jsxs)("div",{className:"min-h-screen flex bg-[#0a0a14]",children:[(0,r.jsxs)("div",{className:"hidden lg:flex lg:w-1/2 relative overflow-hidden flex-col items-center justify-center p-12",children:[r.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-indigo-900/40 via-[#0a0a14] to-purple-900/30"}),r.jsx("div",{className:"absolute top-1/4 left-1/4 w-72 h-72 bg-indigo-600/20 rounded-full blur-3xl"}),r.jsx("div",{className:"absolute bottom-1/3 right-1/4 w-96 h-96 bg-purple-600/15 rounded-full blur-3xl"}),r.jsx("div",{className:"absolute top-1/2 left-1/2 w-48 h-48 bg-blue-500/10 rounded-full blur-2xl"}),(0,r.jsxs)("div",{className:"relative z-10 text-center max-w-md",children:[(0,r.jsxs)(i.default,{href:"/",className:"inline-flex items-center gap-3 mb-10",children:[s?r.jsx(l.default,{src:s,alt:t,width:1.5*o,height:1.5*o,className:"object-contain",unoptimized:!0}):r.jsx("div",{className:"w-12 h-12 rounded-2xl bg-gradient-to-br from-indigo-500 to-purple-600 flex items-center justify-center shadow-lg shadow-indigo-500/30",children:r.jsx(a.Z,{className:"h-6 w-6 text-white"})}),r.jsx("span",{className:"text-3xl font-bold text-white",children:t})]}),(0,r.jsxs)("h2",{className:"text-4xl font-bold text-white leading-tight mb-4",children:["أنشئ صفحات هبوط",r.jsx("span",{className:"block bg-gradient-to-r from-indigo-400 to-purple-400 bg-clip-text text-transparent",children:"بالذكاء الاصطناعي"})]}),r.jsx("p",{className:"text-gray-400 text-lg leading-relaxed mb-8",children:"حوّل صورة منتجك إلى صفحة تسويقية احترافية في ثوانٍ"}),r.jsx("div",{className:"flex flex-wrap justify-center gap-2",children:["⚡ توليد فوري","\uD83C\uDFA8 تصميم احترافي","\uD83D\uDCCA تحليلات متقدمة","\uD83C\uDF10 نشر فوري"].map(e=>r.jsx("span",{className:"px-3 py-1.5 bg-white/[0.06] border border-white/[0.08] rounded-full text-sm text-gray-300",children:e},e))})]}),r.jsx("div",{className:"absolute bottom-8 left-0 right-0 flex justify-center gap-1",children:[void 0,void 0,void 0].map((e,t)=>r.jsx("div",{className:`h-1 rounded-full bg-indigo-500 ${0===t?"w-6":"w-2 opacity-40"}`},t))})]}),(0,r.jsxs)("div",{className:"w-full lg:w-1/2 flex flex-col items-center justify-center p-6 lg:p-12",children:[(0,r.jsxs)(i.default,{href:"/",className:"flex lg:hidden items-center gap-2 mb-8",children:[s?r.jsx(l.default,{src:s,alt:t,width:o,height:o,className:"object-contain",unoptimized:!0}):r.jsx("div",{className:"w-8 h-8 rounded-xl bg-gradient-to-br from-indigo-500 to-purple-600 flex items-center justify-center",children:r.jsx(a.Z,{className:"h-4 w-4 text-white"})}),r.jsx("span",{className:"text-xl font-bold text-white",children:t})]}),r.jsx("div",{className:"w-full max-w-md",children:e})]})]})}},45424:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>h});var r=s(95344),a=s(3729),i=s(8428),l=s(56506),n=s(64290),o=s(66138),c=s(47958),d=s(1222),u=s(53148),x=s(42739);function p(){let e=(0,i.useRouter)(),t=(0,i.useSearchParams)(),s=t.get("token")||"",p=t.get("email")||"",[h,m]=(0,a.useState)(""),[f,g]=(0,a.useState)(""),[y,b]=(0,a.useState)(!1),[j,w]=(0,a.useState)(!1),[v,N]=(0,a.useState)(!1),[_,k]=(0,a.useState)("");(0,a.useEffect)(()=>{s&&p||k("رابط إعادة التعيين غير صالح. يرجى طلب رابط جديد.")},[s,p]);let P=0===h.length?0:h.length<6?1:h.length<10?2:3,S=["","bg-red-500","bg-yellow-500","bg-green-500"],q=async t=>{if(t.preventDefault(),k(""),h!==f){k("كلمتا المرور غير متطابقتين");return}if(h.length<8){k("يجب أن تكون كلمة المرور 8 أحرف على الأقل");return}w(!0);try{let t=await fetch("/api/auth/reset-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:p,token:s,password:h})}),r=await t.json();if(!t.ok)throw Error(r.error||"Something went wrong");N(!0),setTimeout(()=>e.push("/login"),3e3)}catch(e){k(e instanceof Error?e.message:"Something went wrong")}finally{w(!1)}};return v?(0,r.jsxs)("div",{className:"text-center",children:[r.jsx("div",{className:"w-16 h-16 rounded-2xl bg-green-500/10 border border-green-500/20 flex items-center justify-center mx-auto mb-6",children:r.jsx(n.Z,{className:"h-8 w-8 text-green-400"})}),r.jsx("h1",{className:"text-2xl font-bold text-white mb-3",children:"تم تغيير كلمة المرور!"}),r.jsx("p",{className:"text-gray-400 mb-2",children:"تم تحديث كلمة المرور بنجاح."}),r.jsx("p",{className:"text-gray-500 text-sm",children:"جاري تحويلك لصفحة تسجيل الدخول..."})]}):(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-8",children:[r.jsx("h1",{className:"text-3xl font-bold text-white mb-2",children:"تعيين كلمة مرور جديدة"}),r.jsx("p",{className:"text-gray-400",children:"اختر كلمة مرور قوية لحماية حسابك"})]}),_&&(0,r.jsxs)("div",{className:"flex items-center gap-3 p-4 mb-6 rounded-xl bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:[r.jsx(o.Z,{className:"h-4 w-4 shrink-0"}),r.jsx("span",{children:_}),(!s||!p)&&r.jsx(l.default,{href:"/forgot-password",className:"underline mr-auto shrink-0",children:"طلب رابط جديد"})]}),(0,r.jsxs)("form",{onSubmit:q,className:"space-y-5",children:[(0,r.jsxs)("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"كلمة المرور الجديدة"}),(0,r.jsxs)("div",{className:"relative",children:[r.jsx(c.Z,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-500"}),r.jsx("input",{type:y?"text":"password",placeholder:"••••••••",value:h,onChange:e=>m(e.target.value),required:!0,className:"w-full bg-white/[0.04] border border-white/[0.08] text-white rounded-xl pl-10 pr-10 py-3 text-sm placeholder:text-gray-600 focus:outline-none focus:border-indigo-500/60 focus:bg-white/[0.06] transition-all"}),r.jsx("button",{type:"button",onClick:()=>b(!y),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-300 transition-colors",children:y?r.jsx(d.Z,{className:"h-4 w-4"}):r.jsx(u.Z,{className:"h-4 w-4"})})]}),h&&(0,r.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[r.jsx("div",{className:"flex gap-1 flex-1",children:[1,2,3].map(e=>r.jsx("div",{className:`h-1 flex-1 rounded-full transition-all ${P>=e?S[P]:"bg-white/10"}`},e))}),r.jsx("span",{className:"text-xs text-gray-500",children:["","ضعيفة","متوسطة","قوية"][P]})]})]}),(0,r.jsxs)("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"تأكيد كلمة المرور"}),(0,r.jsxs)("div",{className:"relative",children:[r.jsx(c.Z,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-500"}),r.jsx("input",{type:y?"text":"password",placeholder:"••••••••",value:f,onChange:e=>g(e.target.value),required:!0,className:"w-full bg-white/[0.04] border border-white/[0.08] text-white rounded-xl pl-10 pr-4 py-3 text-sm placeholder:text-gray-600 focus:outline-none focus:border-indigo-500/60 focus:bg-white/[0.06] transition-all"})]}),f&&h!==f&&r.jsx("p",{className:"text-xs text-red-400 mt-1",children:"كلمتا المرور غير متطابقتين"})]}),(0,r.jsxs)("button",{type:"submit",disabled:j||!s||!p,className:"w-full bg-gradient-to-r from-indigo-600 to-purple-600 hover:from-indigo-500 hover:to-purple-500 disabled:opacity-60 disabled:cursor-not-allowed text-white font-semibold py-3 px-6 rounded-xl transition-all duration-200 flex items-center justify-center gap-2 shadow-lg shadow-indigo-500/20",children:[j?r.jsx(x.Z,{className:"h-4 w-4 animate-spin"}):r.jsx(c.Z,{className:"h-4 w-4"}),j?"جاري الحفظ...":"تعيين كلمة المرور"]})]}),r.jsx("div",{className:"text-center mt-8",children:r.jsx(l.default,{href:"/login",className:"text-gray-500 hover:text-gray-300 text-sm transition-colors",children:"العودة لتسجيل الدخول"})})]})}function h(){return r.jsx(a.Suspense,{fallback:r.jsx("div",{className:"text-gray-400 text-sm",children:"جاري التحميل..."}),children:r.jsx(p,{})})}},48096:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var s in t)Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}(t,{DynamicServerError:function(){return r},isDynamicServerError:function(){return a}});let s="DYNAMIC_SERVER_USAGE";class r extends Error{constructor(e){super("Dynamic server usage: "+e),this.description=e,this.digest=s}}function a(e){return"object"==typeof e&&null!==e&&"digest"in e&&"string"==typeof e.digest&&e.digest===s}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},72973:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var s in t)Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}(t,{isStaticGenBailoutError:function(){return n},staticGenerationBailout:function(){return c}});let r=s(48096),a=s(45869),i="NEXT_STATIC_GEN_BAILOUT";class l extends Error{constructor(...e){super(...e),this.code=i}}function n(e){return"object"==typeof e&&null!==e&&"code"in e&&e.code===i}function o(e,t){let{dynamic:s,link:r}=t||{};return"Page"+(s?' with `dynamic = "'+s+'"`':"")+" couldn't be rendered statically because it used `"+e+"`."+(r?" See more info here: "+r:"")}let c=(e,t)=>{let{dynamic:s,link:i}=void 0===t?{}:t,n=a.staticGenerationAsyncStorage.getStore();if(!n)return!1;if(n.forceStatic)return!0;if(n.dynamicShouldError)throw new l(o(e,{link:i,dynamic:null!=s?s:"error"}));let c=o(e,{dynamic:s,link:"https://nextjs.org/docs/messages/dynamic-server-error"});if(null==n.postpone||n.postpone.call(n,e),n.revalidate=0,n.isStaticGeneration){let t=new r.DynamicServerError(c);throw n.dynamicUsageDescription=e,n.dynamicUsageStack=t.stack,t}return!1};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},84295:(e,t,s)=>{"use strict";s.r(t),s.d(t,{$$typeof:()=>i,__esModule:()=>a,default:()=>l});let r=(0,s(86843).createProxy)(String.raw`C:\test2\pagecraft-ai\src\app\(auth)\layout.tsx`),{__esModule:a,$$typeof:i}=r,l=r.default},7791:(e,t,s)=>{"use strict";s.r(t),s.d(t,{$$typeof:()=>i,__esModule:()=>a,default:()=>l});let r=(0,s(86843).createProxy)(String.raw`C:\test2\pagecraft-ai\src\app\(auth)\reset-password\page.tsx`),{__esModule:a,$$typeof:i}=r,l=r.default}};var t=require("../../../webpack-runtime.js");t.C(e);var s=e=>t(t.s=e),r=t.X(0,[1638,5312,6632,3910],()=>s(45472));module.exports=r})();