1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7951],{47580:function(e,t,s){Promise.resolve().then(s.bind(s,48815))},76858:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(79205).Z)("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},92934:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(79205).Z)("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},78867:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(79205).Z)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},96362:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(79205).Z)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},29202:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(79205).Z)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},51817:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(79205).Z)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},66337:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(79205).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"}]])},10866:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(79205).Z)("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]])},82023:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(79205).Z)("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]])},48815:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return g}});
1var l=s(57437),i=s(2265),r=s(96602),o=s(71837),a=s(68667),n=s(51817),c=s(82023),d=s(29202),x=s(92934),u=s(78867),p=s(96362),m=s(69064),h=s(54916),f=s(89786),b=s(10866);function g(){var e,t,s;let{t:g,locale:j}=(0,h.$G)(),{user:y}=(0,r.useAuthStore)(),[w,v]=(0,i.useState)(null),[N,k]=(0,i.useState)(!0),[_,Z]=(0,i.useState)(!1),[C,S]=(0,i.useState)(!1),[M,z]=(0,i.useState)(!1),[L,P]=(0,i.useState)({is_public:!1,custom_title:"",show_experience:!0,show_education:!0,show_skills:!0,show_certifications:!0}),E=(null==y?void 0:null===(e=y.plan)||void 0===e?void 0:e.toLowerCase())==="premium";(0,i.useEffect)(()=>{if(!E){k(!1);return}G()},[E]);let G=async()=>{try{let{data:e}=await o.h.get("/portfolio/me");v(e),P({is_public:e.is_public,custom_title:e.custom_title||"",show_experience:e.show_experience,show_education:e.show_education,show_skills:e.show_skills,show_certifications:e.show_certifications})}catch(t){var e;(null===(e=t.response)||void 0===e?void 0:e.status)!==404&&m.ZP.error((0,a.t)(t,g("portfolio.errorLoad")))}finally{k(!1)}},O=async()=>{Z(!0);try{let{data:e}=await o.h.post("/portfolio/generate?locale=".concat(encodeURIComponent(j)));v(e),P({is_public:e.is_public,custom_title:e.custom_title||"",show_experience:e.show_experience,show_education:e.show_education,show_skills:e.show_skills,show_certifications:e.show_certifications}),m.ZP.success(g("portfolio.successGenerate"))}catch(e){m.ZP.error((0,a.t)(e,g("portfolio.errorGenerate")))}finally{Z(!1)}},T=async()=>{S(!0);try{let{data:e}=await o.h.patch("/portfolio/me",L);v(e),m.ZP.success(g("portfolio.successSave"))}catch(e){m.ZP.error((0,a.t)(e,g("portfolio.errorSave")))}finally{S(!1)}};return N?(0,l.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,l.jsx)(n.Z,{className:"animate-spin text-primary w-8 h-8"})}):E?w?(0,l.jsxs)("div",{className:"w-full space-y-6",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h1",{className:"text-2xl font-bold text-navy-900",children:g("portfolio.title")}),(0,l.jsx)("p",{className:"text-slate-500 text-sm mt-1",children:g("portfolio.subtitle2")})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[(0,l.jsx)("div",{className:"lg:col-span-2",children:(0,l.jsxs)("div",{className:"bg-white rounded-2xl shadow-sm border border-slate-200 overflow-hidden flex flex-col",children:[(0,l.jsxs)("div",{className:"bg-slate-50 border-b border-slate-200 px-6 py-3 flex items-center gap-2 text-slate-500 text-sm",children:[(0,l.jsx)(d.Z,{size:16})," ",g("portfolio.livePreview"),w.is_public?(0,l.jsx)("span",{className:"bg-emerald-100 text-emerald-700 px-2 py-0.5 rounded-full text-xs font-semibold ml-2",children:g("portfolio.public")}):(0,l.jsx)("span",{className:"bg-amber-100 text-amber-700 px-2 py-0.5 rounded-full text-xs font-semibold ml-2",children:g("portfolio.private")})]}),(0,l.jsxs)("div",{className:"p-8 prose prose-slate max-w-none",children:[(0,l.jsx)("h1",{className:"text-2xl font-bold text-navy-900 m-0",children:L.custom_title||g("portfolio.defaultTitle",{name:null!==(t=null==y?void 0:y.full_name)&&void 0!==t?t:""})}),w.ai_about&&(0,l.jsxs)("div",{className:"mt-6",children:[(0,l.jsx)("h3",{className:"text-sm uppercase tracking-widest text-slate-400 font-semibold mb-3",children:g("portfolio.aboutMe")}),(0,l.jsx)("p",{className:"text-slate-700",children:w.ai_about})]}),w.ai_highlights.length>0&&(0,l.jsxs)("div",{className:"mt-8",children:[(0,l.jsx)("h3",{className:"text-sm uppercase tracking-widest text-slate-400 font-semibold mb-3",children:g("portfolio.highlights")}),(0,l.jsx)("ul",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 pl-0 list-none m-0",children:w.ai_highlights.map((e,t)=>(0,l.jsxs)("li",{className:"flex items-start gap-2 bg-slate-50 p-3 rounded-lg border border-slate-100 m-0",children:[(0,l.jsx)(x.Z,{className:"w-5 h-5 text-primary shrink-0 mt-0.5"}),(0,l.jsx)("span",{className:"text-sm text-slate-700 leading-snug",children:e})]},t))})]}),(0,l.jsx)("div",{className:"mt-8 pt-6 border-t border-slate-100 flex gap-4 opacity-50",children:(0,l.jsx)("p",{className:"text-xs text-slate-400 italic",children:g("portfolio.previewSubtitle",{content:[L.show_experience&&g("portfolio.sectionsExperience"),L.show_education&&g("portfolio.sectionsEducation"),L.show_skills&&g("portfolio.sectionsSkills"),L.show_certifications&&g("portfolio.sectionsCertifications")].filter(
1Boolean).join(", ")})})})]})]})}),(0,l.jsx)("div",{className:"space-y-6",children:(0,l.jsxs)("div",{className:"bg-white rounded-2xl shadow-sm border border-slate-200 p-6",children:[(0,l.jsxs)("h3",{className:"font-semibold text-navy-900 mb-6 flex items-center gap-2",children:[(0,l.jsx)(b.Z,{size:18})," ",g("portfolio.settings")]}),(0,l.jsxs)("div",{className:"space-y-5",children:[(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between p-3 bg-slate-50 rounded-xl border border-slate-100",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-sm font-medium text-slate-900",children:g("portfolio.makePublic")}),(0,l.jsx)("div",{className:"text-xs text-slate-500",children:g("portfolio.makePublicDesc")})]}),(0,l.jsxs)("label",{className:"relative inline-flex items-center cursor-pointer",children:[(0,l.jsx)("input",{type:"checkbox",checked:L.is_public,onChange:e=>P({...L,is_public:e.target.checked}),className:"sr-only peer"}),(0,l.jsx)("div",{className:"w-11 h-6 bg-slate-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-slate-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary"})]})]}),L.is_public&&w.slug&&(0,l.jsxs)("div",{className:"p-3 bg-emerald-50 border border-emerald-200 rounded-xl space-y-2",children:[(0,l.jsxs)("p",{className:"text-xs font-semibold text-emerald-700 flex items-center gap-1",children:[(0,l.jsx)(d.Z,{size:12})," ",g("portfolio.yourLink")]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)("span",{className:"flex-1 text-xs text-slate-600 bg-white border border-slate-200 rounded-lg px-2 py-1.5 truncate font-mono",children:[window.location.origin,"/p/",w.slug]}),(0,l.jsx)("button",{onClick:()=>{if(!w)return;let e="".concat(window.location.origin,"/p/").concat(w.slug);navigator.clipboard.writeText(e),z(!0),m.ZP.success(g("portfolio.linkCopied")),setTimeout(()=>z(!1),2e3)},className:"flex-shrink-0 p-1.5 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 transition-colors",title:"Copy link",children:M?(0,l.jsx)(x.Z,{size:14,className:"text-emerald-500"}):(0,l.jsx)(u.Z,{size:14,className:"text-slate-500"})}),(0,l.jsx)("a",{href:"/p/".concat(w.slug),target:"_blank",rel:"noreferrer",className:"flex-shrink-0 p-1.5 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 transition-colors",title:"Open portfolio",children:(0,l.jsx)(p.Z,{size:14,className:"text-slate-500"})})]}),!w.is_public&&(0,l.jsx)("p",{className:"text-[11px] text-amber-600",children:g("portfolio.activateLink")})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:[g("portfolio.customTitle")," ",(0,l.jsxs)("span",{className:"text-slate-400 font-normal",children:["(",g("portfolio.optional"),")"]})]}),(0,l.jsx)("input",{type:"text",value:L.custom_title,onChange:e=>P({...L,custom_title:e.target.value}),placeholder:g("portfolio.defaultTitle",{name:null!==(s=null==y?void 0:y.full_name)&&void 0!==s?s:""}),className:"w-full px-3 py-2 border border-slate-200 rounded-lg text-sm focus:ring-2 focus:ring-primary/20 focus:border-primary"})]}),(0,l.jsxs)("div",{className:"space-y-3 pt-3 border-t border-slate-100",children:[(0,l.jsx)("span",{className:"text-xs font-semibold uppercase text-slate-400 tracking-wider",children:g("portfolio.visibleSections")}),(0,l.jsxs)("label",{className:"flex items-center gap-2 text-sm text-slate-700 cursor-pointer",children:[(0,l.jsx)("input",{type:"checkbox",checked:L.show_experience,onChange:e=>P({...L,show_experience:e.target.checked}),className:"rounded text-primary focus:ring-primary"}),g("portfolio.showExperience")]}),(0,l.jsxs)("label",{className:"flex items-center gap-2 text-sm text-slate-700 cursor-pointer",children:[(0,l.jsx)("input",{type:"checkbox",checked:L.show_education,onChange:e=>P({...L,show_education:e.target.checked}),className:"rounded text-primary focus:ring-primary"}),g("portfolio.showEducation")]}),(0,l.jsxs)("label",{className:"flex items-center gap-2 text-sm text-slate-700 cursor-pointer",children:[(0,l.jsx)("input",{type:"checkbox",checked:L.show_skills,onChange:e=>P({...L,show_skills:e.target.checked}),className:"rounded text-primary focus:ring-primary"}),g("portfolio.showSkills")]}),(0,l.jsxs)("label",{className:"flex items-center gap-2 text-sm text-slate-700 cursor-pointer",children:[(0,l.jsx)("input",{type:"checkbox",checked:L.show_certifications,onChange:e=>P({...L,show_certifications:e.target.checked}),className:"rounded text-primary focus:ring-primary"}),g("portfolio.showCertifications")]})]}),(0,l.jsxs)("div",{className:"pt-4 flex flex-col gap-3",children:[(0,l.jsx)("button",{onClick:T,disabled:C,className:"w-full py-2.5 bg-navy-900 text-white text-sm font-semibold rounded-lg hover:bg-navy-800 disabled:opacity-50 transition-colors",children:C?g("portfolio.saving"):g("portfolio.saveSettings")}),(0,l.jsxs)("button",{onClick:O,disabled:_,className:"w-full py-2 bg-slate-100 text-slate-600 text-sm font-medium rounded-lg hover:bg-slate-200 disabled:opacity-50 transition-colors flex items-center justify-center gap-2",children:[_?(0,l.jsx)(n.Z,{className:"w-4 h-4 animate-spin"}):(0,l.jsx)(c.Z,{className:"w-4 h-4"}),_?g("portfolio.regenerating"):g("portfolio.regenerate")]})]})]})]})})]})]}):(0,l.jsxs)("div",{className:"w-full space-y-6",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h1",{className:"text-2xl font-bold text-navy-900",children:g("portfolio.title")}),(0,l.jsx)("p",{className:"text-slate-500 text-sm mt-1",children:g("portfolio.subtitle")})]}),(0,l.jsxs)("div",{className:"bg-white border mb-3 border-slate-200 rounded-2xl p-12 text-center text-slate-500 shadow-sm",children:[(0,l.jsx)("div",{className:"bg-emerald-50 rounded-full w-16 h-16 flex items-center justify-center mx-auto mb-4",children:(0,l.jsx)(c.Z,{className:"w-8 h-8 text-emerald-500"})}),(0,l.jsx)("h2",{className:"text-xl font-semibold text-navy-900 mb-2",children:g("portfolio.createTitle")}),(0,l.jsx)("p",{className:"mb-8 max-w-md mx-auto",children:g("portfolio.createDesc")}),(0,l.jsxs)("button",{onClick:O,disabled:_,className:"flex items-center gap-2 mx-auto px-6 py-3 bg-primary text-white font-bold rounded-xl shadow-lg hover:bg-primary/90 transition-all disabled:opacity-50",children:[_?(0,l.jsx)(n.Z,{className:"w-5 h-5 animate-spin"}):(0,l.jsx)(c.Z,{className:"w-5 h-5"}),_?g("portfolio.generating"):g("portfolio.generate")]})]})]}):(0,l.jsx)(f.Z,{requiredPlan:"premium",featureTitle:g("portfolio.title"),featureDesc:g("portfolio.locked"),bullets:[g("portfolio.bullet1"),g("portfolio.bullet2"),g("portfolio.bullet3")],children:null})}},89786:function(e,t,s){"use strict";s.d(t,{Z:function(){return p}});var l=s(57437),i=s(27648),r=s(66337),o=s(82023),a=s(76858),n=s(54916),c=s(96602),d=s(56858);let x={pro:{badge:"bg-indigo-100 text-indigo-700 border-indigo-200",icon:"from-indigo-500 to-violet-600",glow:"shadow-indigo-500/20",btn:"from-indigo-600 to-violet-600 hover:from-indigo-500 hover:to-violet-500 shadow-indigo-500/30",label:"Pro"},premium:{badge:"bg-violet-100 text-violet-700 border-violet-200",icon:"from-violet-500 to-purple-700",glow:"shadow-violet-500/20",btn:"from-violet-600 to-purple-700 hover:from-violet-500 hover:to-purple-600 shadow-violet-500/30",label:"Premium"}},u=["free","pro","premium"];function p(e){var t,s;let{requiredPlan:p,featureTitle:m,featureDesc:h,bullets:f=[],trialFeature:b,children:g}=e,{user:j}=(0,c.useAuthStore)(),{t:y}=(0,n.$G)(),w=(0,d.y2)(),v=(null==j?void 0:null===(t=j.plan)||void 0===t?void 0:t.toLowerCase())||"free",N=u.indexOf(v)>=u.indexOf(p),k=b&&(null==j?void 0:j.trial_remaining)&&null!==(s=j.trial_remaining[b])&&void 0!==s?s:0;if(N||k>0)return(0,l.jsx)(l.Fragment,{children:g});let _=x[p];return(0,l.jsx)("div",{className:"flex items-center justify-center min-h-[60vh] px-4",children:(0,l.jsxs)("div",{className:"w-full max-w-md text-center",children:[(0,l.jsx)("div",{className:"flex justify-center mb-5",children:(0,l.jsx)("div",{className:"w-20 h-20 rounded-3xl bg-gradient-to-br ".concat(_.icon," flex items-center justify-center shadow-2xl ").concat(_.glow),children:(0,l.jsx)(r.Z,{size:32,className:"text-white/90"})})}),(0,l.jsx)("div",{className:"flex justify-center mb-3",children:(0,l.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-bold border ".concat(_.badge),children:[(0,l.jsx)(o.Z,{size:11}),_.label," ",y("planGate.feature")]})}),(0,l.jsx)("h2",{className:"text-2xl font-black text-slate-900 tracking-tight mb-2",children:m}),(0,l.jsx)("p",{className:"text-slate-500 text-sm leading-relaxed mb-6 max-w-sm mx-auto",children:h}),f.length>0&&(0,l.jsx)("ul",{className:"mb-7 space-y-2 text-left max-w-xs mx-auto",children:f.map((e,t)=>(0,l.jsxs)("li",{className:"flex items-start gap-2.5 text-sm text-slate-600",children:[(0,l.jsx)("span",{className:"mt-0.5 w-4 h-4 rounded-full bg-gradient-to-br from-indigo-500 to-violet-600 flex items-center justify-center shrink-0",children:(0,l.jsx)("svg",{width:"8",he
1ight:"8",viewBox:"0 0 8 8",fill:"none",children:(0,l.jsx)("path",{d:"M1.5 4L3 5.5L6.5 2",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),e]},t))}),w&&(0,l.jsxs)(i.default,{href:"/upgrade",className:"inline-flex items-center gap-2 px-6 py-3 bg-gradient-to-r ".concat(_.btn," text-white text-sm font-bold rounded-xl shadow-lg transition-all"),children:[y("planGate.upgradePlan"),(0,l.jsx)(a.Z,{size:15})]}),b&&(0,l.jsx)("p",{className:"mt-3 text-xs text-slate-400",children:y("planGate.trialsUsed")})]})})}},3011:function(e,t,s){"use strict";s.d(t,{U:function(){return n}});var l=s(2265);let i=e=>{let t;let s=new Set,l=(e,l)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let e=t;t=(null!=l?l:"object"!=typeof i||null===i)?i:Object.assign({},t,i),s.forEach(s=>s(t,e))}},i=()=>t,r={setState:l,getState:i,getInitialState:()=>o,subscribe:e=>(s.add(e),()=>s.delete(e))},o=t=e(l,i,r);return r},r=e=>e?i(e):i,o=e=>e,a=e=>{let t=r(e),s=e=>(function(e,t=o){let s=l.useSyncExternalStore(e.subscribe,l.useCallback(()=>t(e.getState()),[e,t]),l.useCallback(()=>t(e.getInitialState()),[e,t]));return l.useDebugValue(s),s})(t,e);return Object.assign(s,t),s},n=e=>e?a(e):a}},function(e){e.O(0,[5878,2972,3464,9064,4517,7505,4916,2858,6858,2971,2117,1744],function(){return e(e.s=47580)}),_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.