PageSourceSearch

https://trueresume.ai/_next/static/chunks/pages/profile-management-ee14d146126cdf4b.js

js trueresume.ai collected 2026-10-02 01:13:33 UTC 61,318 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2005],{64791:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile-management",function(){return s(40857)}])},40306:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});var a=s(85893),r=s(67694),i=s(49240);function l(e){let{message:t="Loading...",fullScreen:s=!1,children:l,showBrandIcon:n=!0,ariaLabel:o,size:c="md"}=e,{theme:d}=(0,r.F)(),m={sm:{wrapper:"w-12 h-12 sm:w-14 sm:h-14",icon:"w-6 h-6 sm:w-7 sm:h-7"},md:{wrapper:"w-16 h-16 sm:w-20 sm:h-20",icon:"w-8 h-8 sm:w-10 sm:h-10"},lg:{wrapper:"w-20 h-20 sm:w-24 sm:h-24",icon:"w-10 h-10 sm:w-12 sm:h-12"}}[c];return(0,a.jsxs)("div",{className:s?"fixed inset-0 z-[9999] flex items-center justify-center":"absolute inset-0 z-10 flex items-center justify-center",role:"status","aria-live":"polite","aria-label":null!=o?o:t,children:[(0,a.jsx)("div",{className:"absolute inset-0  ".concat("dark"===d?"bg-[#1A1A1B]":"bg-white")}),(0,a.jsxs)("div",{className:"relative z-10 flex flex-col items-center space-y-4",children:[n&&(0,a.jsx)("div",{className:"relative ".concat(m.wrapper," rounded-2xl flex items-center justify-center ").concat("dark"===d?"bg-gradient-to-br from-blue-600 to-[#E03D00]":"bg-gradient-to-br from-blue-500 to-[#FF4500]"," shadow-lg"),children:(0,a.jsx)(i.Z,{className:"".concat(m.icon," animate-pulse"),fill:"white"})}),l?(0,a.jsx)("div",{className:"w-full",children:l}):(0,a.jsxs)("div",{className:"text-center px-4",children:[(0,a.jsx)("p",{className:"text-sm sm:text-base font-medium ".concat("dark"===d?"text-white":"text-gray-900"),style:{fontFamily:"Rajdhani, sans-serif",fontWeight:700},children:t}),(0,a.jsxs)("div",{className:"flex items-center justify-center space-x-1 mt-2",children:[(0,a.jsx)("div",{className:"w-2 h-2 rounded-full animate-bounce ".concat("dark"===d?"bg-blue-400":"bg-blue-600"),style:{animationDelay:"0ms"}}),(0,a.jsx)("div",{className:"w-2 h-2 rounded-full animate-bounce ".concat("dark"===d?"bg-[#FF4500]/20":"bg-[#FF4500]"),style:{animationDelay:"150ms"}}),(0,a.jsx)("div",{className:"w-2 h-2 rounded-full animate-bounce ".concat("bg-[#FF4500]"),style:{animationDelay:"300ms"}})]})]})]})]})}s(67294)},42949:function(e,t,s){"use strict";s.d(t,{q:function(){return i}});var a=s(85893);s(67294);var r=s(54271);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:26;return(0,a.jsx)(r.ZP,{variant:e,size:t,density:"full",animated:!0})}},79508:function(e,t,s){"use strict";s.d(t,{Z:function(){return i}});var a=s(85893);s(67294);var r=s(91594);function i(e){let{isOpen:t,onClose:s,cancelAt:i}=e;if(!t)return null;let l=i?new Date(i).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):null;return(0,a.jsxs)("div",{className:"fixed inset-0 z-50 flex items-end md:items-center justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black/40",onClick:s}),(0,a.jsxs)("div",{className:"relative w-full md:max-w-xl md:rounded-lg md:shadow-lg bg-white dark:bg-gray-900 md:mx-4 md:my-8 md:transform md:transition md:duration-150",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between p-4 md:p-6 border-b dark:border-gray-800",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:"Subscription scheduled for cancellation"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-gray-600 dark:text-gray-300",children:"Your subscription is scheduled to cancel at the end of your current billing period."})]}),(0,a.jsx)("button",{className:"ml-3 p-1 rounded-md text-gray-500 hover:text-gray-700 dark:text-gray-400",onClick:s,"aria-label":"Close",children:(0,a.jsx)(r.Z,{className:"h-6 w-6"})})]}),(0,a.jsxs)("div",{className:"p-4 md:p-6",children:[l?(0,a.jsxs)("p",{className:"text-sm text-gray-700 dark:text-gray-300",children:["You will keep access until ",(0,a.jsx)("strong",{children:l}),". After that date your plan will be downgraded and any paid features will be removed."]}):(0,a.jsx)("p",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Your subscription is scheduled to cancel at period end. You will c
1ontinue to have access until then."}),(0,a.jsx)("div",{className:"mt-4 flex gap-3 justify-end",children:(0,a.jsx)("button",{className:"inline-flex items-center justify-center rounded-full bg-gray-100 hover:bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-700 text-gray-800 dark:text-gray-200 px-4 py-2 text-sm",onClick:s,children:"OK"})})]}),(0,a.jsx)("div",{className:"h-6 md:hidden"})]})]})}},88129:function(e,t,s){"use strict";var a=s(85893),r=s(67294),i=s(14424),l=s(14025),n=s(87542),o=s(67694);t.Z=e=>{let{actions:t,className:s="",density:c="default"}=e,{theme:d}=(0,o.F)(),[m,x]=(0,r.useState)(!1),{scrollY:u}=(0,i.v)(),h=(0,r.useRef)(null),[f,p]=(0,r.useState)(92);(0,l.W)(u,"change",e=>{var t;let s=null!==(t=u.getPrevious())&&void 0!==t?t:0;e>s&&Math.abs(e-s)>120&&e>200?x(!0):x(!1)});let v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"primary",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t)return"dark"===d?"bg-[#272729] text-[#818384] cursor-not-allowed opacity-50":"bg-gray-200/50 text-gray-400 cursor-not-allowed opacity-50";switch(e){case"primary":return"bg-[#FF4500] text-white shadow-md active:bg-[#E03D00]";case"secondary":return"dark"===d?"bg-white text-[#1C1C1C] shadow-lg shadow-white/10 active:bg-[#EDEFF1]":"bg-[#1A1A1B] text-white shadow-lg shadow-black/10 active:bg-[#272729]";case"outline":return"dark"===d?"bg-[#1A1A1B] text-[#D7DADC] border-2 border-[#343536] active:bg-[#272729]":"bg-white  text-gray-700 border-2 border-[#EDEFF1] active:bg-white";default:return""}},g="compact"===c;return(0,r.useLayoutEffect)(()=>{if(h.current&&p(h.current.offsetHeight||(g?64:72)),"ResizeObserver"in window&&h.current){let e=new ResizeObserver(e=>{for(let t of e)t.target===h.current&&p(Math.max(g?64:72,Math.ceil(t.contentRect&&t.contentRect.height||h.current.offsetHeight)))});return e.observe(h.current),()=>e.disconnect()}},[g]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.E.div,{initial:{y:120,opacity:0},animate:{y:m?120:0,opacity:m?0:1},transition:{y:{type:"spring",stiffness:350,damping:30},opacity:{duration:.15}},className:"md:hidden fixed bottom-0 left-0 right-0 z-[80] ".concat(s),ref:h,style:{pointerEvents:m?"none":"auto"},children:(0,a.jsxs)("div",{className:"border-t shadow-[0_-18px_40px_-12px_rgba(0,0,0,0.25)] ".concat(g?"rounded-t-2xl":"rounded-t-3xl")+("dark"===d?" bg-[#1A1A1B]/96 border-[#343536]/40":" bg-white border-gray-200"),children:[(0,a.jsx)("div",{className:"mx-auto rounded-full bg-[#C8CCD2]/40 dark:bg-[#343536]/40 ".concat(g?"mb-1.5 mt-1.5 h-1 w-12":"my-2 h-1.5 w-14"),"aria-hidden":!0}),(0,a.jsx)("div",{className:"px-4 pb-safe grid ".concat(g?"gap-2 py-2":"gap-3 py-3"),style:{gridTemplateColumns:"repeat(".concat(Math.min(t.length,2),", 1fr)")},children:t.map((e,s)=>{let r=e.icon,i=1===t.length;return(0,a.jsxs)("button",{onClick:e.onClick,disabled:e.disabled,className:"flex items-center justify-center font-semibold transition-all active:scale-95 ".concat(g?"gap-2 rounded-xl py-2 text-xs":"gap-3 rounded-2xl py-3 text-sm"," ").concat(i?"col-span-full":""," ").concat(v(e.variant,e.disabled)," ").concat(e.className||""),children:[(0,a.jsx)(r,{className:g?"h-4 w-4":"w-5 h-5"}),(0,a.jsx)("span",{children:e.label})]},s)})})]})}),(0,a.jsx)("div",{className:"md:hidden",style:{height:f},"aria-hidden":!0})]})}},26709:function(e,t,s){"use strict";s.d(t,{Z:function(){return o}});var a=s(85893);s(67294);var r=s(92761),i=s(79298),l=s(11163),n=s(67694);function o(e){let{title:t,subtitle:s,onPrimary:o,primaryLabel:c,showBack:d=!0}=e,m=(0,l.useRouter)(),{theme:x}=(0,n.F)();return(0,a.jsx)("div",{className:"md:hidden sticky top-12 z-40 px-3 py-2.5  transition-colors ".concat("dark"===x?"bg-[#1A1A1B] border-b border-[#343536]":"bg-white border-b border-[#EDEFF1]"),children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[d?(0,a.jsx)(i.hU,{onClick:()=>m.back(),icon:r.Z,"aria-label":"Back",variant:"ghost",size:"sm"}):(0,a.jsx)("div",{className:"w-9 h-9","aria-hidden":!0}),(0,a.jsxs)("div",{className:"flex-1 text-center min-w-0",children:[t&&(0,a.jsx)("div",{className:"font-semibold text-sm truncate ".concat("dark"===x?"text-white":"text-gray-900"),children:t}),s&&(0,a.jsx)("div",{className:"text-xs truncate ".concat("dark"===x?"text-[#818384]":"text-gray-500"),children:s})]}),(0,a.jsx)("div",{className:"flex-shrink-0 flex items-center justify-end",children:o?(0,a.jsx)(i.zx,{onClick:o,size:"sm",variant:"primary",className:"text-xs px-2.5 py-1.5 whitespace-nowrap",children:c||"Done"}):(0,a.jsx)("div",{className:"w-9 h-9","aria-hidden":!0})})]})})}},26915:function(e,t,s){"use strict";s.d(t,{Cv:function(){return d},Ki:function(){return m},V3:function(){return x}});var a,r=s(34155);let i={debug:10,info:20,warn:30,error:40,fatal:50},l=null!==(a=i[r.env.LOG_LEVEL||"info"])&&void 0!==a?a:i.info,n=null,o=/^(password|token|secret|api[_-]?key|authorization|cookie|stripe[_-]?key|otp|nextauth[_-]?secret|webhook[_-]?secret)/i;function c(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(i[e]<l)return;let a=function e(t){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(s>4)return{_truncated:!0};let a={};for(let[r,i]of Object.entries(t))o.test(r)?a[r]="[REDACTED]":!i||"object"!=typeof i||Array.isArray(i)||i instanceof Error||i instanceof Date?a[r]=i:a[r]=e(i,s+1);return a}(s);{let s=JSON.stringify({ts:new Date().toISOString(),level:e,event:t,...a})+"\n";void 0!==r&&r.stdout&&"function"==typeof r.stdout.write?r.stdout.write(s):console.log(s)}if("error"===e||"fatal"===e){let i=r.env.SENTRY_DSN?(n||(n=Function("m","return import(m)")("@sentry/nextjs").then(e=>e).catch(()=>null)),n):null;i&&i.then(r=>{if(!r)return;let i=s.err instanceof Error?s.err:null;i?r.captureException(i,{extra:a,tags:{event:t}}):r.captureMessage(t,{level:"fatal"===e?"fatal":"error",extra:a})}).catch(()=>{})}}!function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=e=>({...t,...e||{}}),a=e=>(t,a,r)=>{a instanceof Error?c(e,t,s({...r||{},err:a,err_message:a.message,err_stack:a.stack,err_name:a.name})):c(e,t,s(a))};return{debug:(e,t)=>c("debug",e,s(t)),info:(e,t)=>c("info",e,s(t)),warn:(e,t)=>c("warn",e,s(t)),error:a("error"),fatal:a("fatal"),child:s=>e({...t,...s})}}();let d=function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s]},m=function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s]},x=function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s]}},52217:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(63759).Z)("Activity",[["path",{d:"M22 12h-4l-3 9L9 3l-3 9H2",key:"d5dnw9"}]])},23488:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(63759).Z)("Award",[["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}],["path",{d:"M15.477 12.89 17 22l-5-3-5 3 1.523-9.11",key:"em7aur"}]])},58394:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});
1let a=(0,s(63759).Z)("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]])},50039:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(63759).Z)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},14235:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(63759).Z)("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]])},86691:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(63759).Z)("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]])},3350:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(63759).Z)("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]])},52042:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(63759).Z)("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z",key:"ymcmye"}]])},21700:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(63759).Z)("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]])},44976:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(63759).Z)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},72278:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(63759).Z)("ShieldCheck",[["path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10",key:"1irkt0"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},20113:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(63759).Z)("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]])},90437:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(63759).Z)("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]])},46611:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(63759).Z)("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]])},40857:function(e,t,s){"use strict";s.r(t),s.d(t,{__N_SSP:function(){return es},default:function(){return ea}});var a=s(85893),r=s(67294),i=s(41664),l=s.n(i),n=s(9008),o=s.n(n),c=s(87542),d=s(33299),m=s(11163),x=s(85412),u=s(40306),h=s(67694),f=s(42949),p=s(52042),v=s(46611),g=s(20113),b=s(80893),y=s(82591),j=s(32225),w=s(2553),N=s(8267),k=s(23488),C=s(86691),F=s(21700),S=s(3350),D=s(42020),A=s(90437),E=s(50039),Z=s(79298),P=s(16706);function R(e){let{name:t,subtitle:s,initial:r="U",imageSrc:i,completeness:l=30,onEdit:n,onGenerate:o}=e,{theme:d}=(0,h.F)(),m=Math.max(0,Math.min(100,l)),x=m>=80?"from-emerald-500 to-green-600":m>=50?"from-amber-500 to-[#FF4500]":"dark"===d?"from-rose-500 to-orange-500":"from-orange-600 to-[#FF4500]";return(0,a.jsx)(c.E.section,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.22},className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4 shadow-sm dark:shadow-none sm:p-5","aria-labelledby":"dash-profile-heading",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-start gap-x-6 gap-y-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-4",children:[(0,a.jsx)(P.Z,{name:t||r,src:i,size:"xl"}),(0,a.jsxs)("div",{className:"min-w-0 max-w-xl",children:[(0,a.jsx)("h1",{id:"dash-profile-heading",className:"truncate text-xl font-bold text-[var(--color-text)] sm:text-2xl",style:{fontFamily:"Rajdhani, system-ui, sans-serif"},children:t}),s?(0,a.jsx)("p",{className:"mt-0.5 truncate text-sm text-[var(--color-text-secondary)]",style:{fontFamily:"Rajdhani, system-ui, sans-serif"},children:s}):null]})]}),(0,a.jsxs)("div",{className:"hidden w-full flex-wrap gap-2 sm:flex-1 sm:justify-end md:flex md:w-auto md:min-w-0",children:[(0,a.jsx)(Z.zx,{className:"min-w-[8rem]",onClick:n,variant:"outline",size:"md",icon:p.Z,"aria-label":"Edit profile",children:"Edit profile"}),(0,a.jsx)(Z.zx,{className:"min-w-[8rem]",onClick:o,variant:"primary",size:"md",icon:v.Z,"aria-label":"Generate resume",children:"Generate resume"})]})]}),(0,a.jsxs)("div",{className:"w-full border-t border-[var(--color-border)] pt-3",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between sm:gap-4",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-[var(--color-text-secondary)]",children:"Profile completeness"}),(0,a.jsxs)("span",{className:"tabular-nums text-sm font-semibold text-[var(--color-text)] sm:hidden",children:[m,"%"]})]}),(0,a.jsx)("div",{className:"mt-2 h-2.5 w-full overflow-hidden rounded-full bg-[var(--color-border)] sm:mt-3",role:"progressbar","aria-valuenow":m,"aria-valuemin":0,"aria-valuemax":100,children:(0,a.jsx)("div",{className:"h-full rounded-full bg-gradient-to-r ".concat(x," transition-[width] duration-500"),style:{width:"".concat(m,"%")}})}),(0,a.jsxs)("div",{className:"mt-1 hidden justify-end text-xs font-medium text-[var(--color-text)] sm:flex",children:[m,"%"]})]})]})})}function z(e){let{label:t,value:s,Icon:r,color:i="bg-[#FF4500]",hint:l}=e;return(0,a.jsx)("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-3.5 shadow-sm transition-shadow hover:shadow-md dark:shadow-none dark:hover:shadow-md",children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,a.jsx)("div",{className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-lg text-white shadow-inner ".concat(i),children:r?(0,a.jsx)(r,{className:"h-5 w-5"}):(0,a.jsx)("div",{className:"h-5 w-5"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",children:t}),(0,a.jsx)("div",{className:"mt-0.5 text-xl font-bold tabular-nums text-[var(--color-text)] sm:text-2xl",children:s})]})]}),l?(0,a.jsx)("div",{className:"max-w-[42%] pl-2 text-right text-[10px] font-medium leading-snug text-[var(--color-text-secondary)] sm:max-w-[48%] sm:text-[11px]",children:l}):null]})})}var M=s(88129),_=s(26709),L=s(24942),T=s(31767),I=s(79508),O=s(58394),q=s(52217),G=s(63759);let B=(0,G.Z)("FileStack",[["path",{d:"M16 2v5h5",key:"kt2in0"}],["path",{d:"M21 6v6.5c0 .8-.7 1.5-1.5 1.5h-7c-.8 0-1.5-.7-1.5-1.5v-9c0-.8.7-1.5 1.5-1.5H17l4 4z",key:"1km23n"}],["path",{d:"M7 8v8.8c0 .3.2.6.4.8.2.2.5.4.8.4H15",key:"16874u"}],["path",{d:"M3 12v8.8c0 .3.2.6.4.8.2.2.5.4.8.4H11",key:"k2ox98"}]]);var Y=s(44976);
1let U=(0,G.Z)("CalendarDays",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);var H=s(14235),V=s(72278);function J(e){if(!e)return"—";try{return new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch(e){return"—"}}function W(){var e;let[t,s]=(0,r.useState)(!0),[i,l]=(0,r.useState)(null),[n,o]=(0,r.useState)(null),[c,d]=(0,r.useState)(!1),m=async()=>{s(!0);try{let e=await fetch("/api/subscription/status");if(!e.ok)throw Error("Failed to fetch subscription status");let t=await e.json();l(t.subscription)}catch(e){o(e.message||"Failed to fetch")}finally{s(!1)}};(0,r.useEffect)(()=>{m()},[]);let[x,u]=(0,r.useState)(!1),[h,f]=(0,r.useState)(!1),[p,v]=(0,r.useState)(!1),[g,b]=(0,r.useState)(null),y=async()=>{u(!1),d(!0);try{let e=await fetch("/api/stripe/cancel-subscription",{method:"POST"}),t=await e.json();if(!e.ok)throw Error(t.error||t.message||"Failed to cancel");await m();let s=t.currentPeriodEnd||i&&i.currentPeriodEnd||null;b(s?new Date(s):null),v(!0)}catch(e){o(e.message||"Cancel failed")}finally{d(!1)}},j=async()=>{f(!1),d(!0);try{let e=await fetch("/api/stripe/resume-subscription",{method:"POST"}),t=await e.json();if(!e.ok)throw Error(t.error||t.message||"Failed to resume");await m(),alert(t.message||"Subscription resumed")}catch(e){o(e.message||"Resume failed")}finally{d(!1)}},w=(0,r.useMemo)(()=>{if(!i)return{used:0,limit:null,pct:null};
1let e="number"==typeof i.resumesGenerated?i.resumesGenerated:0,t="number"==typeof i.resumeLimit&&i.resumeLimit>0?i.resumeLimit:null;return{used:e,limit:t,pct:null!=t?Math.min(100,Math.round(e/t*100)):null}},[i]);if(t)return(0,a.jsxs)("div",{className:"grid animate-pulse gap-4 lg:grid-cols-12 lg:gap-6","aria-busy":"true","aria-label":"Loading subscription",children:[(0,a.jsx)("div",{className:"h-36 rounded-lg bg-[var(--color-surface-hover)] lg:col-span-5"}),(0,a.jsxs)("div",{className:"grid h-36 grid-cols-2 gap-3 lg:col-span-4",children:[(0,a.jsx)("div",{className:"rounded-lg bg-[var(--color-surface-hover)]"}),(0,a.jsx)("div",{className:"rounded-lg bg-[var(--color-surface-hover)]"})]}),(0,a.jsx)("div",{className:"h-36 rounded-lg bg-[var(--color-surface-hover)] lg:col-span-3"})]});if(n)return(0,a.jsx)(Z.Zb,{variant:"outlined",padding:"md",className:"bg-red-50 text-red-800 dark:bg-red-900/20 dark:text-red-300",children:n});if(!i)return(0,a.jsx)(Z.Zb,{variant:"outlined",padding:"md",className:"border-amber-200 bg-amber-50 text-[var(--color-text)] dark:border-[#343536] dark:bg-[#272729] dark:text-[#D7DADC]",children:"No subscription data"});let N=J(i.currentPeriodEnd);return i.cancelAtPeriodEnd||i.isFree&&i.stripeSubscriptionId,(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"grid w-full gap-4 lg:grid-cols-12 lg:items-stretch lg:gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 rounded-xl border border-[var(--color-border)] bg-gradient-to-r from-[var(--color-surface-hover)] to-[var(--color-surface)] px-4 py-3 shadow-sm dark:from-[#272729] dark:to-[#1A1A1B] dark:shadow-none lg:col-span-12",children:[(0,a.jsx)(O.Z,{className:"h-5 w-5 shrink-0 text-[var(--color-text-secondary)]","aria-hidden":!0}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-[11px] font-bold uppercase tracking-wide text-[var(--color-text-secondary)]",children:"Subscription"}),(0,a.jsxs)("p",{className:"text-sm font-bold text-[var(--color-text)] sm:text-base",children:[(0,a.jsx)("span",{className:"text-[var(--color-text)]",children:(e=i.plan)?e.replace(/[-_]/g," ").replace(/\b\w/g,e=>e.toUpperCase()):"—"}),i.isFree?(0,a.jsx)("span",{className:"ml-1.5 text-[var(--color-text-secondary)]",children:"Free"}):(0,a.jsx)("span",{className:"ml-1.5 text-[var(--color-text-secondary)]",children:"Paid"})]})]}),(0,a.jsx)("span",{className:"hidden h-9 w-px shrink-0 bg-[var(--color-border)] sm:block","aria-hidden":!0}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1 font-semibold text-[var(--color-text)]",children:[(0,a.jsx)(q.Z,{className:"h-4 w-4 text-[var(--color-text-secondary)]","aria-hidden":!0}),"Status:"]}),(0,a.jsx)("span",{className:"inline-flex rounded-full px-2.5 py-0.5 text-xs font-bold uppercase tracking-wide ".concat(function(e,t){let s=(e||"").toLowerCase();return t?"bg-amber-100 text-amber-900 ring-1 ring-amber-200 dark:bg-amber-950/40 dark:text-amber-200 dark:ring-amber-800":"active"===s?"bg-emerald-100 text-emerald-900 ring-1 ring-emerald-200 dark:bg-emerald-950/35 dark:text-emerald-200 dark:ring-emerald-800":"canceled"===s||"cancelled"===s?"bg-slate-200 text-slate-800 ring-1 ring-slate-300 dark:bg-[#343536] dark:text-[#D7DADC] dark:ring-[#454547]":"bg-[var(--color-surface-hover)] text-[var(--color-text)] ring-1 ring-[var(--color-border)]"}(i.status,i.cancelAtPeriodEnd)),children:i.cancelAtPeriodEnd?"Ending":i.status||"—"})]}),(0,a.jsx)("span",{className:"hidden h-9 w-px shrink-0 bg-[var(--color-border)] md:block","aria-hidden":!0}),(0,a.jsxs)("div",{className:"flex flex-wrap items-baseline gap-1 text-sm tabular-nums text-[var(--color-text-secondary)]",children:[(0,a.jsx)(B,{className:"h-4 w-4 shrink-0 text-[#0079D3]","aria-hidden":!0}),(0,a.jsxs)("span",{children:["Resumes \xb7"," ",(0,a.jsx)("strong",{className:"text-[var(--color-text)]",children:w.used}),null!=w.limit?(0,a.jsxs)(a.Fragment,{children:[" ","/ ",(0,a.jsx)("strong",{className:"text-[var(--color-text)]",children:w.limit})]}):(0,a.jsx)("span",{className:"text-[var(--color-text-secondary)]",children:" generated"})]})]}),"—"!==N?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"hidden h-9 w-px shrink-0 bg-[var(--color-border)] xl:block","aria-hidden":!0}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-[var(--color-text-secondary)] xl:text-sm",children:[(0,a.jsx)("span",{"aria-hidden":!0,
1children:"\uD83D\uDCC5"}),(0,a.jsxs)("span",{children:["Renewal / access thru ",(0,a.jsx)("strong",{className:"text-[var(--color-text)]",children:N})]})]})]}):null]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 lg:col-span-5 lg:self-start",children:[(0,a.jsxs)("div",{className:"border-b border-[var(--color-border)] pb-3",children:[(0,a.jsx)("h3",{className:"text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",children:"Billing actions"}),(0,a.jsx)("p",{className:"mt-1 text-xs leading-snug text-[var(--color-text-secondary)] sm:text-sm",children:"Refresh billing data from Stripe or cancel your subscription at period end; the summary above updates automatically."})]}),i.cancelAtPeriodEnd?(0,a.jsxs)("div",{className:"rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-950 dark:border-amber-900/50 dark:bg-amber-950/25 dark:text-amber-100",children:["Access continues through ",(0,a.jsx)("strong",{children:N}),". You will not be charged after that date."]}):null,(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[!i.cancelAtPeriodEnd&&!i.isFree&&(0,a.jsx)(Z.zx,{onClick:()=>u(!0),loading:c,variant:"danger",children:"Cancel at period end"}),i.cancelAtPeriodEnd&&(0,a.jsx)(Z.zx,{onClick:()=>f(!0),loading:c,variant:"primary",children:"Resume subscription"}),(0,a.jsx)(Z.zx,{onClick:m,variant:"outline",icon:Y.Z,disabled:c,children:"Refresh"})]})]}),(0,a.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 lg:col-span-4 lg:grid-cols-2",children:[(0,a.jsxs)("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-hover)] p-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[var(--color-text-secondary)]",children:[(0,a.jsx)(B,{className:"h-4 w-4 shrink-0 text-[#0079D3]","aria-hidden":!0}),(0,a.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wide",children:"Resume usage"})]}),(0,a.jsxs)("p",{className:"mt-2 text-2xl font-bold tabular-nums text-[var(--color-text)]",children:[w.used,null!=w.limit?(0,a.jsxs)("span",{className:"text-base font-semibold text-[var(--color-text-secondary)]",children:[" ","/ ",w.limit]}):(0,a.jsx)("span",{className:"ml-1 text-sm font-medium text-[var(--color-text-secondary)]",children:"generated"})]}),null!=w.pct?(0,a.jsx)("div",{className:"mt-3 h-2 w-full overflow-hidden rounded-full bg-[var(--color-border)]",children:(0,a.jsx)("div",{className:"h-full rounded-full bg-gradient-to-r from-[#0079D3] to-[#FF4500] transition-all",style:{width:"".concat(w.pct,"%")}})}):null,null!=w.limit?(0,a.jsx)("p",{className:"mt-1.5 text-xs text-[var(--color-text-secondary)]",children:null!=w.pct?"".concat(w.pct,"% of plan allocation"):"Plan allocation"}):null]}),(0,a.jsxs)("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-hover)] p-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[var(--color-text-secondary)]",children:[(0,a.jsx)(U,{className:"h-4 w-4 shrink-0 text-emerald-600 dark:text-emerald-400","aria-hidden":!0}),(0,a.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wide",children:"Billing period"})]}),(0,a.jsxs)("p",{className:"mt-2 text-sm font-semibold text-[var(--color-text)]",children:[J(i.currentPeriodStart)," → ",N]}),(0,a.jsxs)("p",{className:"mt-1 text-xs text-[var(--color-text-secondary)]",children:["Renews or ends on ",(0,a.jsx)("strong",{className:"text-[var(--color-text)]",children:N})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-hover)] p-4 sm:col-span-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[var(--color-text-secondary)]",children:[(0,a.jsx)(H.Z,{className:"h-4 w-4 shrink-0 text-[var(--color-text)]","aria-hidden":!0}),(0,a.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wide",children:"Last payment"})]}),i.lastPaymentDate?(0,a.jsxs)("p",{className:"mt-2 text-sm text-[var(--color-text)]",children:[(0,a.jsx)("strong",{children:null!=i.lastPaymentAmount?"$".concat((+i.lastPaymentAmount).toFixed(2)):"—"}),(0,a.jsxs)("span",{className:"text-[var(--color-text-secondary)]",children:[" ","\xb7 ",J(i.lastPaymentDate)]})]}):(0,a.jsx)("p",{className:"mt-2 text-sm text-[var(--color-text-secondary)]",children:"No invoice on file yet."}),i.lastPaymentStatus?(0,a.jsxs)("p",{className:"mt-1 text-xs capitalize text-[var(--color-text-secondary)]",children:["Status: ",i.lastPaymentStatus]}):null]})]}),(0,a.jsx)("div",{className:"flex lg:col-span-3",children:(0,a.jsxs)("div",{className:"flex w-full flex-col justify-between rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-hover)] p-4 ring-1 ring-[#0079D3]/10 dark:bg-[var(--color-surface-hover)] dark:ring-[#0079D3]/25",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(V.Z,{className:"h-8 w-8 shrink-0 text-emerald-500 dark:text-emerald-400","aria-hidden":!0}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",children:"Account status"}),(0,a.jsx)("p",{className:"text-lg font-bold text-[var(--color-text)]",children:i.isActive||"active"===i.status?"In good standing":"Review required"})]})]}),(0,a.jsx)("p",{className:"mt-4 text-sm leading-relaxed text-[var(--color-text-secondary)]",children:i.isFree?"You are on the free tier. Upgrade anytime for higher limits and premium features.":i.cancelAtPeriodEnd?"Your paid features remain available until the end of the current period.":"Your subscription is active. Resume generation and premium features are available."})]}),(0,a.jsx)("p",{className:"mt-4 border-t border-[var(--color-border)] pt-3 text-xs leading-snug text-[var(--color-text-secondary)]",children:"Billing runs on calendar periods above. Changes to cancellation take effect after the current period ends unless you resume."})]})})]}),(0,a.jsx)(L.u,{appear:!0,show:x,as:r.Fragment,children:(0,a.jsxs)(T.Vq,{as:"div",className:"relative z-40",onClose:()=>u(!1),children:[(0,a.jsx)(L.u.Child,{as:r.Fragment,enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,a.jsx)("div",{className:"fixed inset-0 bg-black/50"})}),(0,a.jsx)("div",{className:"fixed inset-0 overflow-y-auto",children:(0,a.jsx)("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:(0,a.jsx)(L.u.Child,{as:r.Fragment,enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:(0,a.jsxs)(T.Vq.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[(0,a.jsx)(T.Vq.Title,{as:"h3",className:"text-lg font-semibold leading-6 text-gray-900",children:"Cancel subscription"}),(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsxs)("p",{className:"text-sm text-gray-500",children:["Your subscription stays active until the end of your current billing period; you retain full access until"," ",(0,a.jsx)("strong",{children:i.currentPeriodEnd?J(i.currentPeriodEnd):"the end of this billing cycle"}),". You will not be billed after that date."]})}),(0,a.jsxs)("div",{className:"mt-4 flex justify-end gap-2",children:[(0,a.jsx)(Z.zx,{onClick:()=>u(!1),variant:"outline",children:"Close"}),(0,a.jsx)(Z.zx,{onClick:y,loading:c,variant:"danger",children:"Confirm cancellation"})]})]})})})})]})}),(0,a.jsx)(L.u,{appear:!0,show:h,as:r.Fragment,children:(0,a.jsxs)(T.Vq,{as:"div",className:"relative z-40",onClose:()=>f(!1),children:[(0,a.jsx)(L.u.Child,{as:r.Fragment,enter:"ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,a.jsx)("div",{className:"fixed inset-0 bg-black/50"})}),(0,a.jsx)("div",{className:"fixed inset-0 overflow-y-auto",children:(0,a.jsx)("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:(0,a.jsx)(L.u.Child,{as:r.Fragment,enter:"ease-out duration-200",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-150",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:(0,a.jsxs)(T.Vq.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[(0,a.jsx)(T.Vq.Title,{as:"h3",className:"text-lg font-semibold leading-6 text-gray-900",children:"Resume subscription"}),(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)("p",{className:"text-sm text-gray-500",children:"Resuming your subscription will keep your plan active and ensure you continue to be billed on the normal schedule."})}),(0,a.jsxs)("div",{className:"mt-4 flex justify-end gap-2",children:[(0,a.jsx)(Z.zx,{onClick:()=>f(!1),variant:"outline",children:"Close"}),(0,a.jsx)(Z.zx,{onClick:j,loading:c,variant:"primary",children:"Confirm resume"})]})]})})})})]})}),(0,a.jsx)(I.Z,{isOpen:p,onClose:()=>
1v(!1),cancelAt:g})]})}var X=s(86501);function K(e){if(e&&"string"==typeof e)return e.trim().toLowerCase()}var Q=s(34155);async function $(e){let t=await e.text().catch(()=>"");try{let s=JSON.parse(t);return s.error||s.message||t||e.statusText||"Request failed"}catch(s){return t||e.statusText||"Request failed"}}function ee(){let{data:e}=(0,d.useSession)(),t=K((null==e?void 0:e.sessionId)||void 0),[s,i]=(0,r.useState)([]),[l,n]=(0,r.useState)(!0),[o,c]=(0,r.useState)(!1),[m,x]=(0,r.useState)(null),u=(0,r.useCallback)(async()=>{c(!0),x(null);try{let e=await fetch("/api/sessions");if(!e.ok){let t=await $(e);throw Error(t)}let t=await e.json();i(Array.isArray(t.sessions)?t.sessions:[])}catch(e){console.error("Failed to load sessions",e),x(e instanceof Error?e.message:"Failed to load sessions")}finally{c(!1),n(!1)}},[]);(0,r.useEffect)(()=>{u()},[u]);let h=async()=>{if(window.confirm("Sign out all other devices? This browser session stays active.")){c(!0),x(null);try{let e=await fetch("/api/sessions/logout-others",{method:"POST"});if(!e.ok)throw Error(await $(e));let t=await e.json().catch(()=>({}));await u(),X.default.success("number"==typeof t.updated?"✅ Signed out ".concat(t.updated," other session(s)."):"✅ Other sessions signed out.",{icon:(0,f.q)("wave"),duration:4500,style:{background:"var(--color-surface)",color:"var(--color-text)",border:"1px solid var(--color-border)"}})}catch(e){console.error(e),x(e instanceof Error?e.message:"Failed to logout other sessions"),X.default.error("Could not sign out other sessions.")}finally{c(!1)}}},p=async e=>{let s=K(e);if(s&&s===t){X.default.error("Use “Log out” from the account menu to leave this device.");return}if(window.confirm("Invalidate this session? That device will need to sign in again.")){c(!0),x(null);try{let t=await fetch("/api/sessions/logout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e})});if(!t.ok)throw Error(await $(t));await u(),X.default.success("Session invalidated.",{icon:(0,f.q)("wave"),duration:3500})}catch(e){console.error(e),x(e instanceof Error?e.message:"Failed to invalidate session")}finally{c(!1)}}},v=async e=>{let s=K(e);if(s&&s===t){X.default.error("You cannot remove the record for your active session while signed in.");return}if(window.confirm("Permanently delete this session record from history? This does not affect other devices until you invalidate them.")){c(!0),x(null);try{let t=await fetch("/api/sessions/logout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e,remove:!0})});if(!t.ok)throw Error(await $(t));await u(),X.default.success("Session record removed.",{icon:(0,f.q)("wave"),duration:3e3})}catch(e){console.error(e),x(e instanceof Error?e.message:"Failed to remove session record")}finally{c(!1)}}},g=(0,r.useMemo)(()=>new Set(s.map(e=>{if(e.deviceFingerprint)return"fp:".concat(e.deviceFingerprint);let t=e.ip||"",s=(e.userAgent||"").slice(0,120);return t||s?"heur:".concat(t,"|").concat(s):"sid:".concat(e.sessionId)})).size,[s]),b=Number(Q.env.NEXT_PUBLIC_SESSION_WARN_THRESHOLD||2),y=Number(Q.env.NEXT_PUBLIC_SESSION_LOCK_THRESHOLD||3),j=e=>{if(!e)return"Unknown device";let t=e.toLowerCase(),s="Desktop";/mobile|android|iphone|windows phone/.test(t)?s="Mobile":/ipad|tablet/.test(t)&&(s="Tablet");let a="Browser";t.includes("edg/")||t.includes("edge/")?a="Edge":t.includes("opr/")||t.includes("opera")?a="Opera":t.includes("chrome/")&&!t.includes("chromium")?a="Chrome":t.includes("firefox/")?a="Firefox":t.includes("safari/")&&!t.includes("chrome")&&(a="Safari");let r="";return t.includes("windows nt")?r="Windows":t.includes("mac os x")?r="macOS":t.includes("linux")&&(r="Linux"),"".concat(s," • ").concat(a).concat(r?" on "+r:"")},w=e=>{let s=K(e);return!!(s&&t&&s===t)};return(0,a.jsxs)("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4 shadow-sm dark:shadow-none",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-[var(--color-text)]",children:"Device & session management \uD83D\uDDA5️"}),(0,a.jsx)("p",{className:"text-sm text-[var(--color-text-secondary)]",children:"See where you are signed in \xb7 invali
1date other browsers or clean up old records."})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,a.jsx)(Z.zx,{onClick:()=>void u(),variant:"outline",disabled:o,children:o&&l?"Loading…":"Refresh"}),(0,a.jsx)(Z.zx,{onClick:h,variant:"ghost",disabled:o||s.length<=1,children:"Logout others \uD83D\uDD12"})]})]}),(0,a.jsxs)("div",{className:"mt-3",children:[m?(0,a.jsx)("div",{role:"alert",className:"rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-800 dark:border-red-900/50 dark:bg-red-950/25 dark:text-red-200",children:m}):null,g>=y?(0,a.jsx)("div",{className:"mt-2 rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-800 dark:border-red-900/40 dark:bg-red-950/30 dark:text-red-300",children:"⚠️ Multiple distinct devices detected — your account may be restricted. If this wasn't you, invalidate sessions and contact support."}):g>=b?(0,a.jsxs)("div",{className:"mt-2 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-950 dark:border-amber-900/40 dark:bg-amber-950/30 dark:text-amber-100",children:["\uD83D\uDC40 Unusual device mix — if you don't recognize activity, use ",(0,a.jsx)("strong",{children:"Logout others"}),"."]}):null,(0,a.jsx)("div",{className:"mt-3 max-h-64 space-y-2 overflow-y-auto pr-1 scrollbar-slim",children:l?(0,a.jsx)("div",{className:"text-sm text-[var(--color-text-secondary)]",children:"Loading sessions… ⏳"}):0===s.length?(0,a.jsx)("div",{className:"text-sm text-[var(--color-text-secondary)]",children:"No sessions found."}):s.map(e=>{let t=w(e.sessionId);return(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border p-3 sm:flex-row sm:items-center sm:justify-between ".concat(t?"border-emerald-400/60 bg-emerald-50/80 dark:border-emerald-800/50 dark:bg-emerald-950/20":"border-[var(--color-border)] bg-[var(--color-surface-hover)]"),children:[(0,a.jsxs)("div",{className:"min-w-0 text-sm",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"font-semibold text-[var(--color-text)]",children:j(e.userAgent)}),t?(0,a.jsx)("span",{className:"rounded-full bg-emerald-600 px-2 py-0.5 text-[10px] font-bold uppercase tracking-wide text-white",children:"This device ✓"}):null]}),(0,a.jsxs)("div",{className:"mt-0.5 text-xs text-[var(--color-text-secondary)]",children:[e.ip?"".concat(e.ip," \xb7 "):"",e.status||"unknown",e.lastSeenAt?" \xb7 last seen ".concat(new Date(e.lastSeenAt).toLocaleString()):"",e.createdAt&&!e.lastSeenAt?" \xb7 created ".concat(new Date(e.createdAt).toLocaleString()):""]})]}),(0,a.jsxs)("div",{className:"flex shrink-0 flex-wrap gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>void p(e.sessionId),disabled:o||t,title:t?"Cannot invalidate your active session here":void 0,className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] px-3 py-1.5 text-xs font-semibold text-[var(--color-text)] transition-colors hover:bg-[var(--color-surface-hover)] disabled:cursor-not-allowed disabled:opacity-45",children:"Invalidate"}),(0,a.jsx)("button",{type:"button",onClick:()=>void v(e.sessionId),disabled:o||t,title:t?"Switch devices before removing this record":void 0,className:"rounded-lg border border-red-200 bg-red-50 px-3 py-1.5 text-xs font-semibold text-red-800 transition-colors hover:bg-red-100 dark:border-red-900/40 dark:bg-red-950/35 dark:text-red-200 dark:hover:bg-red-950/50 disabled:cursor-not-allowed disabled:opacity-45",children:"Delete"})]})]},e.sessionId)})})]})]})}var et=s(26915),es=!0;function ea(){var e;let{data:t,status:i}=(0,d.useSession)(),n=(0,m.useRouter)(),{theme:P}=(0,h.F)(),[L,T]=(0,r.useState)(!1),[I,O]=(0,r.useState)(null),[q,G]=(0,r.useState)(!1),[B,Y]=(0,r.useState)(!1),U="text-[var(--color-text)]",H="dark"===P?"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)]":"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] shadow-sm",V="text-[var(--color-text-secondary)]";(0,r.useEffect)(()=>{T(!0),"unauthenticated"===i&&n.push("/login?callbackUrl=/profile-management")},[i,n]);let J=(0,r.useCallback)(async()=>{var e,s,a,r,i,l,n,o,c,d,m,x,u,h,f,p,v,g,b,y,j,w,N,k,C,F,S,D,A,E,Z,P,R,z,M,_,L,T;Y(!0);try{let _=await fetch("/api/check-profile"),L=await _.json();if((0,et.Cv)("\uD83D\uDCCA Dashboard - API Response:",L),L.exists&&L.profile){let Z=L.profile;(0,et.Cv)("\uD83D\uDCE6 Dashboard - Profile Data:",{name:null===(e=Z.personal)||void 0===e?void 0:e.fullName,experiences:null===(s=Z.experiences)||void 0===s?void 0:s.length,education:null===(a=Z.education)||void 0===a?void 0:a.length,skills:null===(r=Z.skills)||void 0===r?void 0:r.length,certifications:null===(i=Z.certifications)||void 0===i?void 0:i.length,resumesGenerated:Z.resumesGenerated});let P=e=>{if(!e)return 0;if(Array.isArray(e))return e.length;let t=Array.isArray(e.primary)?e.primary.length:0,s=Array.isArray(e.secondary)?e.secondary.length:0,a=Array.isArray(e.tools)?e.tools.length:0,r=Array.isArray(e.domains)?e.domains.length:0;return t+s+a+r},R=[null===(l=Z.personal)||void 0===l?void 0:l.fullName,null===(n=Z.personal)||void 0===n?void 0:n.email,null===(o=Z.personal)||void 0===o?void 0:o.phone,null===(c=Z.personal)||void 0===c?void 0:c.location,null===(d=Z.personal)||void 0===d?void 0:d.linkedin,null===(m=Z.personal)||void 0===m?void 0:m.github,Z.summary,(null===(x=Z.experiences)||void 0===x?void 0:x.length)>0,(null===(u=Z.education)||void 0===u?void 0:u.length)>0,P(Z.skills)>
10],z=R.filter(Boolean).length,M=Math.round(z/R.length*100);(0,et.Cv)("✅ Profile Completeness:",M+"%","(".concat(z,"/").concat(R.length," fields)"));let _=0;Z.experiences&&Array.isArray(Z.experiences)&&Z.experiences.forEach(e=>{e.projects&&Array.isArray(e.projects)&&(_+=e.projects.length)}),O({id:Z._id||(null==t?void 0:null===(h=t.user)||void 0===h?void 0:h.email)||"user1",name:(null===(f=Z.personal)||void 0===f?void 0:f.fullName)||(null==t?void 0:null===(p=t.user)||void 0===p?void 0:p.name)||"",email:(null===(v=Z.personal)||void 0===v?void 0:v.email)||(null==t?void 0:null===(g=t.user)||void 0===g?void 0:g.email)||"",phone:(null===(b=Z.personal)||void 0===b?void 0:b.phone)||"",location:(null===(y=Z.personal)||void 0===y?void 0:y.location)||"",website:(null===(j=Z.personal)||void 0===j?void 0:j.website)||(null===(w=Z.personal)||void 0===w?void 0:w.portfolio)||"",bio:Z.summary||(null===(N=Z.personal)||void 0===N?void 0:N.summary)||"",experienceCount:(null===(k=Z.experiences)||void 0===k?void 0:k.length)||0,educationCount:(null===(C=Z.education)||void 0===C?void 0:C.length)||0,skillsCount:P(Z.skills),certificationsCount:(null===(F=Z.certifications)||void 0===F?void 0:F.length)||0,resumesGenerated:Z.resumesGenerated||0,lastResumeDate:Z.lastResumeDate||Z.updatedAt||null,profileCompleteness:M}),(0,et.Cv)("\uD83D\uDCC8 Dashboard Stats Set:",{experiences:(null===(S=Z.experiences)||void 0===S?void 0:S.length)||0,education:(null===(D=Z.education)||void 0===D?void 0:D.length)||0,skills:(null===(A=Z.skills)||void 0===A?void 0:A.length)||0,certifications:(null===(E=Z.certifications)||void 0===E?void 0:E.length)||0,projects:_,resumesGenerated:Z.resumesGenerated||0})}else{(0,et.Cv)("⚠️ No profile found - using default values");let e=(null==t?void 0:null===(Z=t.user)||void 0===Z?void 0:Z.name)&&(null==t?void 0:null===(P=t.user)||void 0===P?void 0:P.email);O({id:(null==t?void 0:null===(R=t.user)||void 0===R?void 0:R.email)||"user1",name:(null==t?void 0:null===(z=t.user)||void 0===z?void 0:z.name)||"",email:(null==t?void 0:null===(M=t.user)||void 0===M?void 0:M.email)||"",phone:"",location:"",website:"",bio:"",experienceCount:0,educationCount:0,skillsCount:0,certificationsCount:0,resumesGenerated:0,lastResumeDate:null,profileCompleteness:e?20:10})}}catch(e){(0,et.V3)("❌ Failed to load profile:",e),O({id:(null==t?void 0:null===(_=t.user)||void 0===_?void 0:_.email)||"user1",name:(null==t?void 0:null===(L=t.user)||void 0===L?void 0:L.name)||"",email:(null==t?void 0:null===(T=t.user)||void 0===T?void 0:T.email)||"",phone:"",location:"",website:"",bio:"",experienceCount:0,educationCount:0,skillsCount:0,certificationsCount:0,resumesGenerated:0,lastResumeDate:null,profileCompleteness:10})}finally{Y(!1)}},[t]);(0,r.useEffect)(()=>{let{success:e,session_id:t,canceled:a}=n.query;if("true"===a&&L){Date.now();let e=sessionStorage.getItem("last_cancel_shown");(e?Date.now()-parseInt(e):1/0)>5e3&&(sessionStorage.setItem("last_cancel_shown",Date.now().toString()),Promise.resolve().then(s.bind(s,86501)).then(e=>{let{default:t}=e;t.error("Subscription cancelled. No charges were made.",{duration:4e3,icon:(0,f.q)("wave"),style:{background:"dark"===P?"#1e293b":"#fff",color:"dark"===P?"#e2e8f0":"#1f2937",border:"dark"===P?"1px solid #475569":"1px solid #e5e7eb"}})})),n.replace("/profile-management",void 0,{shallow:!0});return}if("true"===e&&t&&L){let e="success_shown_".concat(t);sessionStorage.getItem(e)||(sessionStorage.setItem(e,"true"),fetch("/api/stripe/confirm-checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:String(t)})}).catch(()=>{}).finally(()=>{Promise.resolve().then(s.bind(s,86501)).then(e=>{let{default:t}=e;t.success("Welcome to Pro! You now have unlimited resumes!",{duration:8e3,icon:(0,f.q)("trophy"),style:{background:"#10B981",color:"#fff",fontWeight:"bold"}})}),setTimeout(()=>{J()},800)})),n.replace("/profile-management",void 0,{shallow:!0})}},[n.query,n,J,L,P]),(0,r.useEffect)(()=>{if("loading"!==i){if(!t){n.push("/login");return}J()}},[t,i,J,n]),(0,r.useCallback)(async()=>{Y(!0);try{await new Promise(e=>setTimeout(e,1e3)),G(!1)}catch(e){console.error("Failed to save profile:",e)}finally{Y(!1)}},[]),(0,r.useCallback)((e,t)=>{I&&O({...I,[e]:t})},[I]);let X=(0,r.useCallback)(e=>{let t="/profile-setup";e?n.push("".concat(t,"?section=").concat(encodeURIComponent(e))):n.push(t)},[n]),K=(0,r.useCallback)(()=>{n.push("/create-resume")},[n]);return"loading"===i||B?(0,a.jsx)(u.Z,{message:"Loading settings...",fullScreen:!0}):t&&I?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(o(),{children:[(0,a.jsx)("title",{children:"Settings - TrueResume"}),(0,a.jsx)("meta",{name:"description",content:"Account settings, subscription, sessions, and profile summary"})]}),(0,a.jsxs)("div",{className:"min-h-screen pt-12 sm:pt-16 transition-colors duration-300 ".concat("bg-[var(--color-canvas)]"," text-[var(--color-text)] antialiased"),children:[(0,a.jsx)(x.Z,{}),(0,a.jsx)(_.Z,{title:"Settings",subtitle:(null==I?void 0:I.email)||(null==I?void 0:I.name)||void 0,onPrimary:K,primaryLabel:"Generate"}),(0,a.jsxs)("div",{className:"w-full overflow-x-hidden px-4 sm:px-6 lg:px-10 xl:px-14 2xl:px-16 py-5 pb-28 sm:pb-14 has-bottom-bar safe-area-bottom safe-area-inset space-y-4",children:[(0,a.jsx)(R,{name:I.name||"Your profile",subtitle:I.email||void 0,initial:I.name&&I.name.charAt(0)||I.email&&I.email.charAt(0)||"U",imageSrc:null==t?void 0:null===(e=t.user)||void 0===e?void 0:e.image,completeness:I.profileCompleteness,onEdit:()=>X(),onGenerate:K}),(0,a.jsx)(M.Z,{actions:[{icon:p.Z,label:"Edit Profile",onClick:X,variant:"outline"},{icon:v.Z,label:"Generate Resume",onClick:K,variant:"primary"}]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-2 xl:grid-cols-4",children:[(0,a.jsx)(z,{label:"Profile Complete",value:"".concat(I.profileCompleteness,"%"),Icon:g.Z,color:"bg-[#FF4500]",hint:I.profileCompleteness>=80?"Ready for AI resume":void 0}),(0,a.jsx)(z,{label:"Experience",value:I.experienceCount,Icon:b.Z,color:"bg-gradient-to-br from-[#FF4500] to-[#FF7335]",hint:0===I.experienceCount?"Add roles":void 0}),(0,a.jsx)(z,{label:"Education",value:I.educationCount,Icon:y.Z,color:"bg-gradient-to-br from-emerald-500 to-green-600",hint:0===I.educationCount?"Add degrees":void 0}),(0,a.jsx)(z,{label:"Skills",value:I.skillsCount,Icon:j.Z,color:"bg-gradient-to-br from-[#0079D3] to-[#0c6bc7]",hint:I.skillsCount<5?"Add skill tags":void 0})]}),(0,a.jsx)(c.E.section,{initial:{opacity:0,y:8}
1,animate:{opacity:1,y:0},transition:{duration:.2},className:"p-4 sm:p-5 ".concat(H),children:(0,a.jsx)(W,{})}),(0,a.jsxs)("div",{className:"grid gap-4 lg:grid-cols-12 lg:items-start",children:[(0,a.jsxs)("div",{className:"space-y-4 lg:col-span-9",children:[(0,a.jsxs)(c.E.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.2},className:"p-4 sm:p-5 ".concat(H),children:[(0,a.jsxs)("h2",{className:"flex items-center gap-2 text-base font-bold sm:text-lg ".concat(U),style:{fontFamily:"Rajdhani, system-ui, sans-serif"},children:[(0,a.jsx)(v.Z,{className:"h-5 w-5 shrink-0 ".concat("dark"===P?"text-[#7CB9FF]":"text-[#0079D3]")}),"Quick actions"]}),(0,a.jsxs)("div",{className:"mt-3 grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,a.jsx)(Z.zx,{onClick:K,variant:"primary",size:"lg",className:"btn-mobile-lg w-full flex flex-col sm:flex-row items-start sm:items-center gap-3 p-4 h-auto min-h-[60px] text-left md:hidden",icon:w.Z,"aria-label":"Generate a resume from job description",children:(0,a.jsxs)("div",{className:"flex-1 text-left",children:[(0,a.jsx)("div",{className:"font-semibold text-sm sm:text-base",children:"Generate Resume"}),(0,a.jsx)("div",{className:"mt-0.5 text-xs ".concat(V),children:"AI-powered from JD"})]})}),(0,a.jsx)(Z.zx,{onClick:()=>X("experience"),variant:"secondary",size:"lg",className:"btn-mobile-lg w-full flex flex-col sm:flex-row items-start sm:items-center gap-3 p-4 h-auto min-h-[60px] text-left md:hidden",icon:N.Z,"aria-label":"Manage your profile sections",children:(0,a.jsxs)("div",{className:"flex-1 text-left",children:[(0,a.jsx)("div",{className:"font-semibold text-sm sm:text-base",children:"Manage Profile"}),(0,a.jsx)("div",{className:"mt-0.5 text-xs ".concat(V),children:"Edit details, add experience & skills"})]})}),(0,a.jsxs)("div",{className:"col-span-1 sm:col-span-2 grid grid-cols-1 sm:grid-cols-2 gap-3",children:[(0,a.jsx)(Z.zx,{onClick:()=>X("experience"),variant:"outline",size:"lg",className:"btn-mobile-lg w-full flex items-center gap-3 p-3 h-auto min-h-[52px] text-left",icon:b.Z,"aria-label":"Add work experience",children:(0,a.jsxs)("div",{className:"flex-1 text-left",children:[(0,a.jsx)("div",{className:"font-semibold text-sm",children:"Add Experience"}),(0,a.jsx)("div",{className:"mt-0.5 text-xs ".concat(V),children:"Add roles & projects"})]})}),(0,a.jsx)(Z.zx,{onClick:()=>X("skills"),variant:"outline",size:"lg",className:"btn-mobile-lg w-full flex items-center gap-3 p-3 h-auto min-h-[52px] text-left",icon:k.Z,"aria-label":"Add skills",children:(0,a.jsxs)("div",{className:"flex-1 text-left",children:[(0,a.jsx)("div",{className:"font-semibold text-sm",children:"Add Skills"}),(0,a.jsx)("div",{className:"mt-0.5 text-xs ".concat(V),children:"Showcase expertise"})]})})]})]})]}),(0,a.jsx)(c.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.2},children:(0,a.jsx)(ee,{})}),(0,a.jsxs)(c.E.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.2},className:"p-4 sm:p-5 ".concat(H),children:[(0,a.jsxs)("div",{className:"mb-3 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("h2",{className:"flex items-center gap-2 text-lg font-bold sm:text-xl ".concat(U),children:[(0,a.jsx)(N.Z,{className:"h-5 w-5 shrink-0 text-[#FF4500]"}),"Profile"]}),(0,a.jsx)(Z.zx,{onClick:()=>X(),variant:"outline",size:"sm",icon:v.Z,"aria-label":"Optimize with AI",children:"Optimize with AI"})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)(C.Z,{className:"mt-0.5 h-5 w-5 shrink-0 text-[var(--color-text-secondary)]"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs ".concat(V),children:"Email"}),(0,a.jsx)("div",{className:U,style:{fontFamily:"Rajdhani, sans-serif"},children:I.email})]})]}),I.phone&&(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)(F.Z,{className:"mt-0.5 h-5 w-5 shrink-0 text-[var(--color-text-secondary)]"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs ".concat(V),children:"Phone"}),(0,a.jsx)("div",{className:U,children:I.phone})]})]}),I.location&&(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)(S.Z,{className:"mt-0.5 h-5 w-5 shrink-0 text-[var(--color-text-secondary)]"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs ".concat(V),children:"Location"}),(0,a.jsx)("div",{className:U,children:I.location})]})]}),I.website&&(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)(D.Z,{className:"mt-0.5 h-5 w-5 shrink-0 text-[var(--color-text-secondary)]"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-xs ".concat(V),children:"Website"}),(0,a.jsx)("a",{href:I.website,target:"_blank",rel:"noopener noreferrer",className:"break-all font-medium text-[#0079D3] underline decoration-[#0079D3]/30 underline-offset-2 hover:text-[#005fa3] dar
1k:text-[#5eb5f8] dark:hover:text-[#8cc8ff]",children:I.website})]})]}),I.bio&&(0,a.jsxs)("div",{className:"flex items-start gap-3 border-t border-[var(--color-border)] pt-3",children:[(0,a.jsx)(w.Z,{className:"mt-0.5 h-5 w-5 shrink-0 text-[var(--color-text-secondary)]"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("div",{className:"text-xs mb-2 ".concat(V),children:"Professional Summary"}),(0,a.jsx)("div",{className:"text-sm leading-relaxed ".concat(U),children:I.bio})]})]}),!I.phone&&!I.location&&!I.website&&!I.bio&&(0,a.jsxs)("div",{className:"text-center py-4 text-sm ".concat(V),children:[(0,a.jsx)("p",{children:"Complete your profile to unlock all features"}),(0,a.jsx)(c.E.button,{type:"button",onClick:()=>X(),whileHover:{scale:1.02},className:"mt-2 font-semibold text-[#0079D3] hover:text-[#005fa3] dark:text-[#5eb5f8] dark:hover:text-[#8cc8ff]",children:"Complete Profile →"})]})]})]})]}),(0,a.jsxs)("div",{className:"space-y-4 lg:col-span-3",children:[(0,a.jsxs)(c.E.section,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.2},className:"border-l-[3px] border-l-[#FF4500] p-4 sm:p-5 ".concat(H),children:[(0,a.jsxs)("h2",{className:"mb-3 flex items-center gap-2 text-base font-bold sm:text-lg ".concat(U),style:{fontFamily:"Rajdhani, system-ui, sans-serif"},children:[(0,a.jsx)(A.Z,{className:"h-5 w-5 shrink-0 text-[#FF4500]"}),"Next steps"]}),(0,a.jsxs)("div",{className:"space-y-2",children:[I.profileCompleteness<100&&(0,a.jsxs)("div",{className:"flex gap-3 rounded-lg border border-[var(--color-border)] p-3 ".concat("bg-[var(--color-surface-hover)]"),children:[(0,a.jsx)("div",{className:"mt-1.5 h-2 w-2 shrink-0 rounded-full bg-amber-400"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-semibold ".concat(U),children:"Finish your profile"}),(0,a.jsxs)("div",{className:"mt-1 text-xs ".concat(V),children:[100-I.profileCompleteness,"% to go"]})]})]}),0===I.experienceCount&&(0,a.jsxs)("div",{className:"flex gap-3 rounded-lg border border-[var(--color-border)] p-3 bg-[var(--color-surface-hover)]",children:[(0,a.jsx)("div",{className:"mt-1.5 h-2 w-2 shrink-0 rounded-full bg-[#0079D3]"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-semibold ".concat(U),children:"Add experience"}),(0,a.jsx)("div",{className:"mt-1 text-xs ".concat(V),children:"Required for strong AI resumes"})]})]}),I.skillsCount<5&&(0,a.jsxs)("div",{className:"flex gap-3 rounded-lg border border-[var(--color-border)] p-3 bg-[var(--color-surface-hover)]",children:[(0,a.jsx)("div",{className:"mt-1.5 h-2 w-2 shrink-0 rounded-full bg-[#FF4500]"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-semibold ".concat(U),children:"Add skills"}),(0,a.jsx)("div",{className:"mt-1 text-xs ".concat(V),children:"Aim for 5+ relevant skills"})]})]}),I.profileCompleteness>=80&&(0,a.jsxs)("div",{className:"flex gap-3 rounded-xl border p-3 ".concat("dark"===P?"border-emerald-800/50 bg-emerald-950/25":"border-emerald-200 bg-emerald-50"),children:[(0,a.jsx)("div",{className:"mt-1.5 h-2 w-2 shrink-0 rounded-full bg-emerald-500"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-semibold ".concat("dark"===P?"text-emerald-200":"text-emerald-800"),children:"You're in great shape"}),(0,a.jsx)("div",{className:"mt-1 text-xs ".concat("dark"===P?"text-emerald-300/80":"text-emerald-700"),children:"Ready to generate tailored resumes"})]})]})]})]}),(0,a.jsxs)(c.E.section,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.2},className:"p-4 sm:p-5 ".concat(H),children:[(0,a.jsxs)("h2",{className:"mb-3 flex items-center gap-2 text-base font-bold sm:text-lg ".concat(U),children:[(0,a.jsx)(E.Z,{className:"h-5 w-5 shrink-0 ".concat("dark"===P?"text-[#7CB9FF]":"text-[#0079D3]")}),"Activity"]}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-sm ".concat(V),style:{fontFamily:"Rajdhani, sans-serif"},children:"Resumes Generated"}),(0,a.jsx)("span",{className:"text-lg font-bold ".concat(U),children:I.resumesGenerated})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-sm ".concat(V),children:"Certifications"}),(0,a.jsx)("span",{className:"text-lg font-bold ".concat(U),children:I.certificationsCount})]}),I.lastResumeDate&&(0,a.jsxs)("div",{className:"border-t border-[var(--color-border)] pt-3",children:[(0,a.jsx)("span",{className:"text-xs ".concat(V),children:"Last Resume"}),(0,a.jsx)("div",{className:"text-sm mt-1 ".concat(U),children:new Date(I.lastResumeDate).toLocaleDateString()})]})]})]})]})]}),(0,a.jsx)(c.E.section,{initial:{opacity:0,y:8}
1,animate:{opacity:1,y:0},transition:{duration:.25,delay:.05},className:"p-4 sm:p-5 ".concat(H),children:(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-bold ".concat(U),children:"Applied jobs"}),(0,a.jsx)("p",{className:"mt-1 text-sm ".concat(V),children:"Track applications and confirmations on the dedicated My Jobs page."})]}),(0,a.jsx)("div",{className:"shrink-0",children:(0,a.jsx)(l(),{href:"/my-jobs",className:"inline-flex items-center gap-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-hover)] px-4 py-2.5 text-sm font-semibold text-[var(--color-text)] transition-colors hover:bg-[var(--color-canvas)]",children:"Open My Jobs"})})]})})]})]})]}):null}}},function(e){e.O(0,[4968,1296,8993,7100,5412,2888,9774,179],function(){return e(e.s=64791)}),_N_E=e.O()}]);

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.