PageSourceSearch

https://www.elevolt.co.ke/_next/static/chunks/8251-50812c78caeea082.js

js elevolt.co.ke collected 2026-10-04 21:46:38 UTC 64,194 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="63ece3be-ae94-4d95-a009-8c867fb642da",e._sentryDebugIdIdentifier="sentry-dbid-63ece3be-ae94-4d95-a009-8c867fb642da")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8251],{14749:function(e,t,i){i.d(t,{Z:function(){return I}});var r=i(52322),a=i(2369),n=i(92942),o=i(13980),s=i.n(o),l=i(2784),c=i(76467);let u=e=>e>=80?{segment:"bg-green-500",text:"text-green-600"}:e>=60?{segment:"bg-yellow-500",text:"text-yellow-600"}:{segment:"bg-purple-500",text:"text-purple-600"},d=e=>{var t,i,o,s;let{contentType:l,currentContext:d={},variant:p="compact",className:m="",schema:y=null}=e;if(!y)return null;let h=(null===(t=y.fields)||void 0===t?void 0:t.filter(e=>e.required))||[],f=(null===(i=y.fields)||void 0===i?void 0:i.filter(e=>!e.required))||[],g=e=>{let t=d[e];return null!=t&&("string"!=typeof t||t.trim().length>0)},v=h.filter(e=>g(e.key)).length,b=f.filter(e=>g(e.key)).length,x=h.length,w=f.length,k=x>0?Math.round((v+.5*b)/(x+.5*w)*100):100,I=e=>({filled:g(e.key)}),{segment:j,text:A}=u(k),N=Math.round(k/20);return(0,r.jsxs)("div",{className:"ai-context-guide bg-white border border-purple-100 rounded-lg p-4 ".concat(m),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(n.FontAwesomeIcon,{className:"text-purple-500",icon:a.X8G}),(0,r.jsx)(c.Z,{as:"span",className:"font-display",color:"text-gray-700",responsive:!1,size:"text-sm",weight:"font-semibold",children:"Tips for Better AI Results"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:"flex gap-0.5 w-24",children:[1,2,3,4,5].map(e=>(0,r.jsx)("div",{className:"h-1.5 flex-1 rounded-full transition-colors duration-200 ".concat(e<=N?j:"bg-gray-200")},e))}),(0,r.jsxs)(c.Z,{as:"span",className:"font-body",color:A,responsive:!1,size:"text-xs",weight:"font-medium",children:[k,"%"]})]})]}),!!((null===(o=y.guidance)||void 0===o?void 0:o.overview)&&"detailed"===p)&&(0,r.jsx)(c.Z,{as:"p",className:"font-body mb-4 pb-4 border-b border-purple-100",color:"text-gray-600",responsive:!1,size:"text-sm",children:y.guidance.overview}),h.length>0&&(0,r.jsxs)("div",{className:"mb-4 bg-purple-50/60 rounded-md p-3 -mx-1",children:[(0,r.jsx)(c.Z,{as:"h4",className:"font-display uppercase tracking-wide mb-2",color:"text-purple-700",responsive:!1,size:"text-xs",weight:"font-semibold",children:"Required Information"}),(0,r.jsx)("ul",{className:"space-y-2",children:h.map(e=>{let t=I(e);return(0,r.jsxs)("li",{className:"flex items-start gap-2",children:[(0,r.jsx)("span",{className:"mt-1.5 w-4 h-4 flex-shrink-0 flex items-center justify-center rounded-full ".concat(t.filled?"bg-green-500":"border-2 border-gray-300"),children:!!t.filled&&(0,r.jsx)(n.FontAwesomeIcon,{className:"text-white text-[8px]",icon:a.LEp})}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)(c.Z,{as:"span",className:"font-body",color:t.filled?"text-gray-400":"text-gray-800",responsive:!1,size:"text-sm",weight:t.filled?void 0:"font-medium",children:e.label}),!!(!t.filled&&e.tip)&&(0,r.jsx)(c.Z,{as:"p",className:"font-body mt-0.5",color:"text-gray-400",responsive:!1,size:"text-xs",children:e.tip})]})]},e.key)})})]}),!!(f.length>0&&"detailed"===p)&&(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsxs)(c.Z,{as:"h4",className:"font-display uppercase tracking-wide mb-2",color:"text-gray-500",responsive:!1,size:"text-xs",weight:"font-semibold",children:["Recommended"," ",(0,r.jsx)(c.Z,{as:"span",className:"normal-case",color:"text-gray-400",responsive:!1,weight:"font-normal",children:"(improves quality)"})]}),(0,r.jsx)("ul",{className:"space-y-2",children:f.map(e=>{let t=I(e);return(0,r.jsxs)("li",{className:"flex items-start gap-2",children:[(0,r.jsx)("span",{className:"mt-1.5 w-4 h-4 flex-shrink-0 flex items-center justify-center rounded-full ".concat(t.filled?"bg-green-500":"border-2 border-gray-300"),children:!!t.filled&&(0,r.jsx)(n.FontAwesomeIcon,{className:"text-white text-[8px]",icon:a.LEp})}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)(c.Z,{as:"span",className:"font-body capitalize",color:t.filled?"text-gray-400":"text-gray-600",responsive:!1,size:"text-sm",children:e.label}),!!(!t.filled&&e.impact)&&(0,r.jsx)(c.Z,{as:"p",className:"font-body mt-0.5",color:"text-gray-400",responsive:!1,size:"text-xs",children:e.impact})]})]},e.key)})})]}),!!((null===(s=y.guidance)||void 0===s?void 0:s.bestPractices)&&"detailed"===p)&&(0,r.jsxs)("div",{className:"mt-4 pt-4 border-t border-purple-100",children:[(0,r.jsx)(c.Z,{as:"h4",className:"font-display uppercase tracking-wide mb-2",color:"text-gray-500",responsive:!1,size:"text-xs",weight:"font-semibold",children:"Best Practices"}),(0,r.jsx)("ul",{className:"space-y-2",children:y.guidance.bestPractices.map((e,t)=>(0,r.jsxs)("li",{className:"font-body text-xs text-gray-600 flex items-center gap-2",children:[(0,r.jsx)(n.FontAwesomeIcon,{className:"text-[8px] text-purple-400 flex-shrink-0",icon:a._tD}),(0,r.jsx)(c.Z,{as:"span",responsive:!1,children:e})]},t))})]})]})};d.propTypes={contentType:s().string.isRequired,currentContext:s().object,variant:s().oneOf(["compact","detailed","inline"]),className:s().string,
1schema:s().shape({fields:s().arrayOf(s().shape({key:s().string.isRequired,label:s().string.isRequired,required:s().bool,tip:s().string,impact:s().string})),guidance:s().shape({overview:s().string,bestPractices:s().arrayOf(s().string)})})};let p=()=>!0,m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{defaultValue:i=null,parseJson:r=!1}=t;if(!p())return i;try{let t=window.localStorage.getItem(e);if(null===t)return i;if(r)try{return JSON.parse(t)}catch(e){return i}return t}catch(e){return i}},y=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{stringify:r=!1}=i;if(!p())return{success:!1};try{let i=r?JSON.stringify(t):String(t);return window.localStorage.setItem(e,i),{success:!0}}catch(e){return{success:!1}}},h={bio:{title:"Professional Bio",overview:"AI will create a compelling professional summary that highlights your unique value proposition.",contextGuidance:{user_summary:{tip:"Describe yourself in 2-3 sentences. Include your role, expertise, and what makes you unique.",example:"I am a software engineer with 5 years of experience building fintech applications...",impact:"This is the foundation of your AI-generated bio. Be specific about your expertise."},skills:{tip:"List your top 3-5 skills relevant to your target role.",example:"React, Node.js, System Design, Team Leadership",impact:"Helps AI weave your technical competencies naturally into the narrative."},experienceSummary:{tip:"Mention your years of experience and industries you have worked in.",example:"8 years in fintech and e-commerce",impact:"Establishes credibility and context for your professional journey."},careerGoals:{tip:"What role or direction are you pursuing?",example:"Seeking senior engineering leadership roles in healthtech",impact:"Helps AI position your bio toward your target audience."}},bestPractices:["Be specific about your expertise rather than generic","Include measurable achievements when possible","Think about who will read this bio and what they care about"],aiLimitations:["AI cannot verify facts - ensure all claims are accurate","AI may not know industry-specific nuances - review terminology","AI generates based on patterns - add your unique voice in review"]},experience:{title:"Work Experience",overview:"AI will generate achievement-focused bullet points highlighting your contributions and impact.",contextGuidance:{company_name:{tip:"Enter the exact company name.",example:"Google, Inc.",impact:"AI uses this to understand the company size and industry context."},job_title:{tip:"Use your official job title or a clear equivalent.",example:"Senior Software Engineer",impact:"Determines the level of responsibility in generated content."},industry:{tip:"What industry or sector was the company in?",example:"Financial Technology, Healthcare, E-commerce",impact:"Enables AI to use industry-appropriate terminology."},key_responsibilities:{tip:"List 2-3 main things you were responsible for. Use simple phrases.",example:"Led frontend team, Designed payment system, Mentored junior developers",impact:"Critical for generating relevant, accurate job descriptions."}},bestPractices:["Mention specific projects or initiatives you led","Include any metrics or measurable outcomes you can recall","Note any promotions or scope increases during your tenure"],aiLimitations:["AI cannot invent achievements - provide real accomplishments","AI may not capture company-specific context accurately","Review for accuracy especially around metrics and timelines"]},education:{title:"Education",overview:"AI will create a professional description of your educational background and achievements.",contextGuidance:{school_name:{tip:"Use the official institution name.",example:"University of Nairobi, MIT",impact:"AI may tailor language based on institution type."},course_name:{tip:"Your degree and major/concentration.",example:"Bachelor of Science in Computer Science",impact:"Determines the technical depth and focus of the description."},achievements:{tip:"Academic honors, relevant projects, leadership roles.",example:"First Class Honours, Led capstone project on ML",impact:"Adds credibility and specificity to your education section."},relevant_skills:{tip:"Key skills gained during this education.",example:"Python, Data Analysis, Research Methods",impact:"Connects your education to practical, employable skills."}},bestPractices:["Include relevant coursework for entry-level positions","Highlight research projects or thesis work if applicable","Mention any academic societies or leadership positions"],aiLimitations:["AI cannot verify graduation status or grades","Course-specific details should be verified","Review institution-s
1pecific terminology for accuracy"]},job_description:{title:"Job Description",overview:"AI will generate a comprehensive job posting with responsibilities, qualifications, and benefits.",contextGuidance:{title:{tip:"Be specific about the role level and function.",example:"Senior Frontend Developer, Junior Marketing Manager",impact:"This is the primary context for the entire job description."},company_name:{tip:"Your company or organization name.",example:"TechCorp Kenya",impact:"Helps AI match your company culture and tone."},industry:{tip:"What sector or industry is your company in?",example:"Fintech, Healthcare, Agriculture",impact:"Enables industry-specific requirements and terminology."},key_responsibilities:{tip:"List 3-5 main duties for this role.",example:"Lead development team, Design system architecture, Code review",impact:"Most critical for generating accurate job responsibilities."},qualifications:{tip:"Required skills, experience level, education.",example:"5+ years experience, Bachelor degree, React expertise",impact:"Ensures the job description attracts qualified candidates."},tone:{tip:"How should the job posting feel?",example:"Professional, Friendly, Technical",impact:"Set
1s the voice and style of the entire posting."}},bestPractices:["Include specific technologies or tools used in the role","Mention team size and reporting structure if relevant","Think about what makes this role unique at your company"],aiLimitations:["AI cannot know your specific company benefits - add those manually","Legal requirements vary by location - verify compliance","Review for any unconscious bias in language"]},certification:{title:"Certification",overview:"AI will describe your certification and its relevance to your professional expertise.",contextGuidance:{certification_title:{tip:"The official name of the certification.",example:"AWS Solutions Architect Associate",impact:"AI uses this to understand the certification scope and level."},institution:{tip:"The issuing organization.",example:"Amazon Web Services, Google, PMI",impact:"Adds credibility and context to the certification."},relevant_skills:{tip:"What skills does this certification validate?",example:"Cloud architecture, Security best practices",impact:"Connects the certification to practical capabilities."}},bestPractices:["Include any specializations within the certification","Mention how you apply this certification in your work"],aiLimitations:["AI cannot verify certification validity","Expiry dates should be kept current"]},course:{title:"Professional Course",overview:"AI will create a description of the course and how it enhanced your skills.",contextGuidance:{course_name:{tip:"The official course name.",example:"Advanced Machine Learning, Full Stack Web Development",impact:"Determines the technical depth of the description."},institution:{tip:"The provider or platform.",example:"Coursera, Udacity, General Assembly",impact:"Adds credibility to the learning experience."},relevant_skills:{tip:"Key skills you gained.",example:"TensorFlow, Neural Networks, Model Deployment",impact:"Connects the course to practical, employable skills."}},bestPractices:["Mention any projects or assignments completed","Note if you received a certificate or credential"],aiLimitations:["AI may not know course-specific details","Review technical terminology for accuracy"]},placement:{title:"Internship or Placement",overview:"AI will generate a description of your internship experience and contributions.",contextGuidance:{company_name:{tip:"The company where you interned.",example:"Microsoft, Safaricom",impact:"Provides context about the work environment."},role:{tip:"Your internship role or title.",example:"Software Engineering Intern",impact:"Set
1s the scope and responsibility level."},industry:{tip:"What industry was the company in?",example:"Technology, Telecommunications",impact:"Enables industry-appropriate terminology."}},bestPractices:["Highlight specific projects you contributed to","Mention any skills you developed during the placement","Note any offers or recognition received"],aiLimitations:["AI may not capture the learning nature of internships","Review to ensure it does not overstate responsibility"]},language:{title:"Language Proficiency",overview:"AI will describe your language proficiency and how you use it professionally.",contextGuidance:{language_name:{tip:"The language name.",example:"Spanish, Swahili, Mandarin",impact:"Identifies the language being described."},proficiency_level:{tip:"Your proficiency level.",example:"Native, Fluent, Conversational",impact:"Sets appropriate expectations in the description."},usage_context:{tip:"Where or how you use this language.",example:"Business meetings, Customer support, Translation",impact:"Shows practical application of the language skill."}},bestPractices:["Be honest about your proficiency level","Mention any certifications (e.g., TOEFL, DELE)"],aiLimitations:["AI cannot verify language proficiency","Cultural nuances may not be captured"]},hobby:{title:"Personal Interest or Hobby",overview:"AI will create a description of your hobby and how it reflects your character.",contextGuidance:{hobby_name:{tip:"The hobby or interest.",example:"Photography, Rock Climbing, Chess",impact:"Determines the focus of the description."},years_of_experience:{tip:"How long you have pursued this hobby.",example:"5 years, Since childhood",impact:"Shows commitment and dedication."},achievements:{tip:"Any notable accomplishments.",example:"Won local tournament, Published photos",impact:"Adds credibility and depth to the hobby."}},bestPractices:["Choose hobbies that reflect positively on your character","Consider mentioning transferable skills"],aiLimitations:["AI may generate generic descriptions","Add personal details to make it unique"]},reference:{title:"Professional Reference",overview:"AI will create a description of your professional relationship with the reference.",contextGuidance:{reference_name:{tip:"The name of your reference.",example:"Dr. Jane Smith",impact:"Identifies the reference."},relationship:{tip:"How you know this person.",example:"Former Manager, Professor, Colleague",impact:"Establishes the nature of the relationship."},organization:{tip:"Where you worked or studied together.",example:"Google Inc., University of Nairobi",impact:"Provides context about the relationship."},duration:{tip:"How long you worked together.",example:"2 years, 2018-2020",impact:"Shows the depth of the relationship."}},bestPractices:["Ensure you have permission to list this reference","Provide contact information separately"],aiLimitations:["AI cannot verify the reference relationship","Always confirm details with the reference"]},skill:{title:"Professional Skill",overview:"AI will create a description of your skill proficiency and application.",contextGuidance:{skill_name:{tip:"The specific skill or technology.",example:"React.js, Project Management, Data Analysis",impact:"Determines the technical depth of the description."},proficiency_level:{tip:"Your level of expertise.",example:"Expert, Advanced, Intermediate",impact:"Set
1s appropriate expectations in the description."},years_of_experience:{tip:"How long you have been using this skill.",example:"5 years, 10+ years",impact:"Establishes credibility for your proficiency claim."}},bestPractices:["Be honest about your proficiency level","Consider mentioning specific projects where you used this skill"],aiLimitations:["AI generates descriptions based on common usage patterns","Review for accuracy in your specific application of the skill"]},summary:{title:"Professional Summary",overview:"AI will create a concise summary that highlights your key qualifications and career goals.",contextGuidance:{user_summary:{tip:"Brief overview of your professional background.",example:"Marketing professional with 7 years of digital marketing experience",impact:"Foundation for the entire summary."},target_role:{tip:"The type of role you are seeking.",example:"Senior Marketing Manager, Brand Director",impact:"Helps AI tailor the summary to your career goals."},key_strengths:{tip:"Your top 3-5 strengths or skills.",example:"Brand strategy, Team leadership, Analytics",impact:"Highlights what makes you stand out."}},bestPractices:["Focus on achievements rather than responsibilities","Tailor the summary to your target industry","Keep it concise and impactful"],aiLimitations:["AI may generate generic phrases - personalize it","Ensure it aligns with your actual experience","Review for authenticity and voice"]}},f=e=>h[e]||null,g={info:{icon:a.sqG,bgClass:"bg-blue-50",borderClass:"border-blue-200",iconClass:"text-blue-500",textClass:"text-blue-700"},warning:{icon:a.eHv,bgClass:"bg-amber-50",borderClass:"border-amber-200",iconClass:"text-amber-500",textClass:"text-amber-700"},educational:{icon:a.X8G,bgClass:"bg-purple-50",borderClass:"border-purple-200",iconClass:"text-purple-500",textClass:"text-purple-700"}},v={info:["AI content is generated based on the context you provide - more details lead to better results","Always review and verify AI suggestions for accuracy","AI works best for drafting and improving, not for factual research"],warning:["AI-generated content should be reviewed for accuracy before use","Do not include confidential or sensitive information in AI prompts","AI may not capture industry-specific nuances - adjust terminology as needed"],educational:["The more context you provide, the more personalized and accurate the AI output","AI can save time on drafting, but your expertise makes it exceptional","Use AI as a starting point, then add your unique perspective"]},b=e=>{let{contentType:t,variant:i="info",dismissible:o=!0,onDismiss:s,dismissKey:u="ai-expectations-banner",className:d=""}=e,[p,h]=(0,l.useState)(!1),[b,x]=(0,l.useState)(!1);if((0,l.useEffect)(()=>{o&&u&&"true"===m(u)&&h(!0)},[o,u]),p)return null;let w=g[i]||g.info,k=t?f(t):null,I=(null==k?void 0:k.aiLimitations)||v[i]||v.info;return(0,r.jsx)("div",{className:"ai-expectations-banner ".concat(w.bgClass," border ").concat(w.borderClass," rounded-lg p-2 ").concat(d),role:"alert",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)(n.FontAwesomeIcon,{className:"".concat(w.iconClass," mt-0.5 flex-shrink-0"),icon:w.icon}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsxs)("button",{"aria-expanded":b,className:"flex items-center gap-1 text-sm font-medium ".concat(w.textClass," mb-1 bg-transparent border-0 p-0 cursor-pointer sm:pointer-events-none sm:cursor-default"),onClick:()=>x(e=>!e),type:"button",children:["About AI-Generated Content",(0,r.jsx)(n.FontAwesomeIcon,{className:"text-xs sm:hidden transition-transform ".concat(b?"rotate-180":""),icon:a.ptq})]}),(0,r.jsx)("ul",{className:"space-y-1 ".concat(b?"block":"hidden"," sm:block"),children:I.map((e,t)=>(0,r.jsx)("li",{className:"opacity-90",children:(0,r.jsxs)(c.Z,{as:"span",color:w.textClass,responsive:!1,size:"text-xs",children:["* ",e]})},t))})]}),!!o&&(0,r.jsx)("button",{"aria-label":"Dismiss",className:"".concat(w.textClass," opacity-50 hover:opacity-100 transition-opacity"),onClick:()=>{h(!0),u&&y(u,"true"),s&&s()},type:"button",children:(0,r.jsx)(n.FontAwesomeIcon,{icon:a.NBC})})]})})};b.propTypes={contentType:s().string,variant:s().oneOf(["info","warning","educational"]),dism
1issible:s().bool,onDismiss:s().func,dismissKey:s().string,className:s().string};var x=i(45654),w=i(18966);let k=e=>{let{fieldLabel:t,children:i,className:o="",helperText:s="AI can help you write professional content for this field",showTooltip:u=!0,showContextGuide:p=!1,showExpectationsBanner:m=!1,contentType:y=null,currentContext:h={},view:f="individual"}=e,[g,v]=(0,l.useState)(!1),{user:k}=(0,w.Eu)();if((null==k?void 0:k.tenant_id)&&"individual"===f)return(0,r.jsx)("div",{className:"".concat(o),children:i});let I=y?(0,x.gi)(y):null;return(0,r.jsxs)("div",{className:"ai-field-wrapper relative rounded-lg border border-purple-200 bg-gradient-to-br from-purple-50/40 to-transparent ".concat(o),children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-y-1 p-2 bg-purple-50 rounded-t-lg border-b border-purple-100",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 sm:gap-2 min-w-0",children:[(0,r.jsx)(n.FontAwesomeIcon,{className:"text-purple-600 text-sm flex-shrink-0",icon:a.Z30}),(0,r.jsx)(c.Z,{as:"span",className:"truncate",color:"text-purple-800",responsive:!1,size:"text-sm",weight:"font-medium",children:t}),(0,r.jsx)(c.Z,{as:"span",className:"hidden sm:inline flex-shrink-0",color:"text-purple-600",responsive:!1,size:"text-xs",weight:"font-normal",children:"(AI-Assisted)"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[!!(y&&(p&&I||m))&&(0,r.jsxs)("button",{"aria-expanded":g,"aria-label":"Show tips for better AI results",className:"text-purple-500 hover:text-purple-700 text-xs flex items-center gap-1 transition-colors",onClick:()=>v(!g),type:"button",children:[(0,r.jsx)(n.FontAwesomeIcon,{icon:a.X8G}),(0,r.jsx)("span",{children:"Tips"}),(0,r.jsx)(n.FontAwesomeIcon,{className:"text-[10px] transition-transform duration-200 ".concat(g?"":"-rotate-180"),icon:a.ptq})]}),!!u&&(0,r.jsxs)("div",{className:"group relative",children:[(0,r.jsx)(n.FontAwesomeIcon,{className:"text-purple-400 text-xs cursor-help hover:text-purple-600 transition-colors",icon:a.sqG}),(0,r.jsxs)("div",{className:"absolute right-0 top-6 z-10 hidden group-hover:block w-48 sm:w-64 p-2 bg-gray-900 text-white text-xs rounded-md shadow-lg",children:[s,(0,r.jsx)("div",{className:"absolute -top-1 right-2 w-2 h-2 bg-gray-900 rotate-45"})]})]})]})]}),(0,r.jsxs)("div",{className:"p-2",children:[!!(m&&y&&g)&&(0,r.jsx)(b,{className:"mt-3",contentType:y,dismissKey:"ai-banner-".concat(y),dismissible:!0,variant:"info"}),!!(p&&y&&I&&g)&&(0,r.jsx)(d,{className:"mt-3",contentType:y,currentContext:h,schema:I,variant:"detailed"})]}),(0,r.jsx)("div",{className:"p-2",children:i})]})};k.propTypes={fieldLabel:s().string.isRequired,children:s().node.isRequired,className:s().string,helperText:s().string,showTooltip:s().bool,showContextGuide:s().bool,showExpectationsBanner:s().bool,contentType:s().string,currentContext:s().object,view:s().oneOf(["individual","portal"])};var I=k},63798:function(e,t,i){i.d(t,{P:function(){return c}});var r=i(52322),a=i(12524),n=i.n(a),o=i(13980),s=i.n(o);i(2784);let{parseUnderScore:l}=i(77590),c=e=>{let{name:t,error:i,label:a,description:o,options:s,onChange:c,selected:u,required:d=!1,defaultOption:p,...m}=e,y=n()("block","tracking-wide","text-sm","font-medium","mb-2",{"text-gray-700":!i},{"text-red-400":i}),h=n()("block appearance-none w-full bg-blue-50 border border-gray-200 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500 capitalize",{border:i},{"border-red-400":i}),f=e=>"object"==typeof e&&null!==e?e.label||e.value||"":"string"!=typeof e?String(e):e.replace(/_/g," ").replace(/-/g," ");return(0,r.jsxs)(r.Fragment,{children:[a?(0,r.jsxs)("label",{className:y,htmlFor:t,children:[a,d?(0,r.jsx)("span",{className:"text-red-400 text-xs ml-1",children:"*"}):null]}):null,(0,r.jsx)("div",{className:"flex relative w-full",children:(0,r.jsxs)("select",{className:h,id:t,name:t,onChange:c,value:null!=u?u:"",...m,children:[(0,r.jsx)("option",{value:"",children:p||"Select ".concat(l(t))}),null==s?void 0:s.map((e,t)=>{let i="object"==typeof e&&null!==e?e.value:"string"==typeof e?e.toLowerCase():e;return(0,r.jsx)("option",{value:i,children:f(e)},"option-".concat(t))})]})}),o?(0,r.jsx)("span",{className:"text-gray-500 text-sm mt-1 block",children:o}):null,i?(0,r.jsx)("span",{className:"text-red-400 text-xs",children:i}):null]})};c.propTypes={label:s().string,name:s().string.isRequired,options:s().array.isRequired,selected:s().string,error:s().string,onChange:s().func.isRequired,required:s().bool,defaultOption:s().string}},45654:function(e,t,i){i.d(t,{e7:function(){return n},gi:function(){return a}});let r={bio:{description:"Professional biography or profile summary",minimumContextMessage:"Please provide at least a brief description about yourself to generate a bio.",guidance:{overview:"AI will create a compelling professional summary that highlights your unique value proposition.",bestPractices:["Be specific about your expertise rather than generic","Include measurable achievements when possible","Think about who will read this bio and what they care about"],aiLimitations:["AI cannot verify facts - ensure all claims are accurate","AI may not know industry-specific nuances - review terminology","AI generates based on patterns - add your unique voice in review"]},fields:[{key:"user_summary",label:"brief description about yourself",required:!0,description:"A sentence or tw
1o about who you are, your profession, or what you do",tip:"Describe yourself in 2-3 sentences. Include your role, expertise, and what makes you unique.",example:"I am a software engineer with 5 years of experience building fintech applications...",impact:"This is the foundation of your AI-generated bio. Be specific about your expertise."},{key:"skills",label:"key skills",required:!1,description:"List of relevant skills",tip:"List your top 3-5 skills relevant to your target role.",example:"React, Node.js, System Design, Team Leadership",impact:"Helps AI weave your technical competencies naturally into the narrative."},{key:"experienceSummary",label:"experience summary",required:!1,description:"Brief summary of work experience",tip:"Mention your years of experience and industries you have worked in.",example:"8 years in fintech and e-commerce",impact:"Establishes credibility and context for your professional journey."},{key:"educationSummary",label:"education summary",required:!1,description:"Brief summary of educational background",tip:"Mention your highest degree and field of study.",example:"BSc in Computer Science from University of Nairobi",impact:"Adds educational credibility to your professional bio."},{key:"careerGoals",label:"career goals",required:!1,description:"Professional aspirations or career direction",tip:"What role or direction are you pursuing?",example:"Seeking senior engineering leadership roles in healthtech",impact:"Helps AI position your bio toward your target audience."}]},education:{description:"Description of educational qualification",minimumContextMessage:"Please enter the school name and course/degree name to generate a description.",guidance:{overview:"AI will create a professional description of your educational background and achievements.",bestPractices:["Include relevant coursework for entry-level positions","Highlight research projects or thesis work if applicable","Mention any academic societies or leadership positions"],aiLimitations:["AI cannot verify graduation status or grades","Course-specific details should be verified","Review institution-specific terminology for accuracy"]},fields:[{key:"school_name",label:"School/Institution Name",required:!0,description:"Name of the educational institution",tip:"Use the official institution name.",example:"University of Nairobi, MIT",impact:"AI may tailor language based on institution type."},{key:"course_name",label:"Course/Degree Name",required:!0,description:"Name of the degree, course, or program",tip:"Your degree and major/concentration.",example:"Bachelor of Science in Computer Science",impact:"Determines the technical depth and focus of the description."},{key:"start_year",label:"Start Year",required:!1,tip:"When did you start this program?",example:"2015",impact:"Provides timeline context."},{key:"end_year",label:"End Year",required:!1,tip:"When did you complete this program?",example:"2019",impact:"Shows duration of study."},{key:"achievements",label:"Academic Achievements",required:!1,description:"Notable achievements, honors, or awards",tip:"Academic honors, relevant projects, leadership roles.",example:"First Class Honours, Led capstone project on ML",impact:"Adds credibility and specificity to your education section."},{key:"relevant_skills",label:"Relevant Skills Gained",required:!1,tip:"Key skills gained during this education.",example:"Python, Data Analysis, Research Methods",impact:"Connects your education to practical, employable skills."}]},experience:{description:"Description of work experience",minimumContextMessage:"Please enter the company name and job title to generate a description.",guidance:{overview:"AI will generate achievement-focused bullet points highlighting your contributions and impact.",bestPractices:["Mention specific projects or initiatives you led","Include any metrics or measurable outcomes you can recall","Note any promotions or scope increases during your tenure"],aiLimitations:["AI cannot invent achievements - provide real accomplishments","AI may not capture company-specific context accurately","Review for accuracy especially around metrics and timelines"]},fields:[{key:"company_name",label:"Company Name",required:!0,description:"Name of the employer or organization",tip:"Enter the exact company name.",example:"Google, Inc.",impact:"AI uses this to understand the company size and industry context."},{key:"job_title",label:"Job Title",required:!0,description:"Your role or position title",tip:"Use your official job title or a clear equivalent.",example:"Senior Softw
1are Engineer",impact:"Determines the level of responsibility in generated content."},{key:"start_year",label:"Start Year",required:!1,tip:"When did you start this role?",example:"2020",impact:"Provides timeline context for your experience."},{key:"end_year",label:"End Year",required:!1,tip:"When did you leave this role? Leave blank if current.",example:"2023",impact:"Shows duration and recency of experience."},{key:"industry",label:"Industry",required:!1,description:"The industry or sector",tip:"What industry or sector was the company in?",example:"Financial Technology, Healthcare, E-commerce",impact:"Enables AI to use industry-appropriate terminology."},{key:"key_responsibilities",label:"Key Responsibilities",required:!1,description:"Main duties or responsibilities",tip:"List 2-3 main things you were responsible for. Use simple phrases.",example:"Led frontend team, Designed payment system, Mentored junior developers",impact:"Critical for generating relevant, accurate job descriptions."}]},certification:{description:"Description of professional certification",minimumContextMessage:"Please enter the certification title and issuing institution to generate a description.",guidance:{overview:"AI will describe your certification and its relevance to your professional expertise.",bestPractices:["Include any specializations within the certification","Mention how you apply this certification in your work"],aiLimitations:["AI cannot verify certification validity","Expiry dates should be kept current"]},fields:[{key:"certification_title",label:"Certification Title",required:!0,description:"Name of the certification",tip:"The official name of the certification.",example:"AWS Solutions Architect Associate",impact:"AI uses this to understand the certification scope and level."},{key:"institution",label:"Issuing Institution",required:!0,description:"Organization that issued the certification",tip:"The issuing organization.",example:"Amazon Web Services, Google, PMI",impact:"Adds credibility and context to the certification."},{key:"year",label:"Year Obtained",required:!1,tip:"When did you obtain this certification?",example:"2022",impact:"Shows recency of the certification."},{key:"expiry",label:"Expiry Year",required:!1,tip:"When does this certification expire?",example:"2025",impact:"Shows current validity."},{key:"relevant_skills",label:"Skills Validated",required:!1,description:"Skills or competencies this certification validates",tip:"What skills does this certification validate?",example:"Cloud architecture, Security best practices",impact:"Connects the certification to practical capabilities."}]},course:{description:"Description of training or course completed",minimumContextMessage:"Please enter the course name and institution to generate a description.",guidance:{overview:"AI will describe your professional course and its impact on your skills.",bestPractices:["Mention any projects or assignments completed","Include certification if the course offered one"],aiLimitations:["AI may not be familiar with all course platforms","Review course-specific terminology for accuracy"]},fields:[{key:"course_name",label:"Course Name",required:!0,description:"Name of the course or training",tip:"The name of the course or training program.",example:"Advanced React Development, Agile Project Management",impact:"Determines the focus of the description."},{key:"institution",label:"Provider/Institution",required:!0,description:"Organization that provided the course",tip:"Where did you take this course?",example:"Coursera, Udacity, LinkedIn Learning",impact:"Adds context about the course quality and format."},{key:"year",label:"Year Completed",required:!1,tip:"When did you complete this course?",example:"2023",impact:"Shows recency of learning."},{key:"relevant_skills",label:"Skills Learned",required:!1,description:"Key skills or knowledge gained",tip:"Key skills learned in this course.",example:"React Hooks, Context API, Testing",impact:"Shows the practical value of the course."}]},placement:{description:"Description of internship or placement experience",minimumContextMessage:"Please enter the company name and role to generate a description.",guidance:{overview:"AI will describe your internship experience and key learnings.",bestPractices:["Mention specific projects worked on","Include any measurable contributions","Note skills gained during the internship"],aiLimitations:["AI may not understand company-specific programs","Verify all achievements are accurate"]},fields:[{key:"company_name",label:"Company/Organization Name",required:!0,description:"Name of the organization",tip:"The company where you did your internship.",example:"Microsoft Kenya",impact:"Provides context about the internship environment."},{key:"role",label:"Role/Position",required:!0,description:"Your role or position during the placement",tip:"Your role or title during the internship.",example:"Software Engineering Intern",impact:"Describes the nature of the placement."},{key:"start_year",label:"Start Year",required:!1,tip:"When did the internship start?",example:"2021",impact:"Provides timeline context."},{key:"end_year",label:"End Year",required:!1,tip:"When did the internship end?",example:"2021",impact:"Shows duration of the placement."},{key:"industry",label:"Industry",required:!1,tip:"What industry was the company in?",example:"Technology, Finance, Healthcare",impact:"Adds industry context to the experience."}]},language:{description:"Description of language proficiency",minimumContextMessage:"Please enter the language name and proficiency level to generate a description.",guidance:{overview:"AI will describe your language skills and their application.",bestPractices:["Be honest about your proficiency level","Mention any certifications (e.g., IELTS, DELE)","Include years of experience with the language"],aiLimitations:["AI cannot assess your actual language ability","Proficiency should be verified before claiming"]},fields:[{key:"language_name",label:"Language Name",required:!0,description:"The language",tip:"The language you speak.",example:"Spanish, Swahili, Mandarin",impact:"Identifies the language being described."},{key:"proficiency_level",label:"Proficiency Level",required:!0,description:"Your level of proficiency",tip:"Your level of fluency.",example:"Native, Fluent, Intermediate, Basic",impact:"Set
1s appropriate expectations in the description."},{key:"usage_context",label:"Usage Context",required:!1,description:"How and where you use this language",tip:"Where do you use this language?",example:"Business meetings, Customer support, Translation",impact:"Shows practical application of the language skill."}]},hobby:{description:"Description of hobby or interest",minimumContextMessage:"Please enter the hobby/interest name to generate a description.",guidance:{overview:"AI will describe your hobby and how it demonstrates transferable skills.",bestPractices:["Choose hobbies that show transferable skills","Mention any leadership roles or community involvement","Keep it professional and appropriate"],aiLimitations:["AI may not connect hobbies to work skills effectively","Review to ensure appropriate professional tone"]},fields:[{key:"hobby_name",label:"Hobby/Interest Name",required:!0,description:"Name of the hobby or interest",tip:"The hobby or interest.",example:"Photography, Marathon Running, Blogging",impact:"Identifies what will be described."},{key:"years_of_experience",label:"Years of Experience",required:!1,description:"How long you have been doing this",tip:"How long have you been doing this?",example:"5 years",impact:"Shows commitment and depth of engagement."},{key:"achievements",label:"Achievements",required:!1,description:"Any notable achievements or accomplishments",tip:"Any notable accomplishments in this hobby.",example:"Completed 3 marathons, Published 50+ blog posts",impact:"Demonstrates dedication and transferable skills."}]},reference:{description:"Description of professional reference",minimumContextMessage:"Please enter the reference name and relationship to generate a description.",guidance:{overview:"AI will describe your professional relationship with this reference.",bestPractices:["Always ask permission before listing someone as a reference","Provide current contact information","Choose references who can speak to different aspects of your work"],aiLimitations:["AI cannot verify the reference relationship","Contact information should be manually added and verified"]},fields:[{key:"reference_name",label:"Reference Name",required:!0,description:"Name of the reference person",tip:"Your reference's full name.",example:"Dr. Jane Smith",impact:"Identifies the reference."},{key:"relationship",label:"Relationship Type",required:!0,description:"Your professional relationship with this person",tip:"How do you know this person?",example:"Former Manager, Professor, Mentor",impact:"Establishes the context of the reference."},{key:"organization",label:"Organization",required:!1,description:"Organization where you worked together",tip:"Where did you work/study together?",example:"Google Kenya, University of Nairobi",impact:"Adds credibility and context."},{key:"duration",label:"Duration of Relationship",required:!1,description:"How long you worked together",tip:"How long have you known this person?",example:"3 years",impact:"Shows depth of the professional relationship."}]},skill:{description:"Description of professional skill",minimumContextMessage:"Please enter the skill name to generate a description.",guidance:{overview:"AI will create a description of your skill proficiency and application.",bestPractices:["Be honest about your proficiency level","Consider mentioning specific projects where you used this skill","Group related skills together"],aiLimitations:["AI generates descriptions based on common usage patterns","Review for accuracy in your specific application of the skill"]},fields:[{key:"skill_name",label:"Skill Name",required:!0,description:"Name of the skill",tip:"The specific skill or technology.",example:"React.js, Project Management, Data Analysis",impact:"Determines the technical depth of the description."},{key:"proficiency_level",label:"Proficiency Level",required:!1,tip:"Your level of expertise.",example:"Expert, Advanced, Intermediate",impact:"Set
1s appropriate expectations in the description."},{key:"years_of_experience",label:"Years of Experience",required:!1,tip:"How long you have been using this skill.",example:"5 years, 10+ years",impact:"Establishes credibility for your proficiency claim."}]},summary:{description:"Professional summary or objective statement",minimumContextMessage:"Please provide at least a brief description about yourself to generate a summary.",guidance:{overview:"AI will create a concise professional summary highlighting your value proposition.",bestPractices:["Focus on achievements and impact, not just responsibilities","Quantify accomplishments where possible","Tailor the summary to your target role"],aiLimitations:["AI cannot know your unique career story","Add specific achievements that make you stand out","Review for authenticity and personal voice"]},fields:[{key:"user_summary",label:"Brief Description About Yourself",required:!0,description:"A sentence or two about your professional background",tip:"Describe your professional background in 2-3 sentences.",example:"Marketing professional with 7 years of experience in digital campaigns...",impact:"Foundation for the entire summary."},{key:"user_name",label:"Your Name",required:!1,tip:"Your full name.",example:"John Doe",impact:"Personalizes the generated content."},{key:"target_role",label:"Target Role",required:!1,description:"The role or position you are seeking",tip:"What type of role are you targeting?",example:"Senior Marketing Manager, Product Lead",impact:"Helps AI focus the summary toward your goal."},{key:"key_strengths",label:"Key Strengths",required:!1,tip:"What are your top 3 strengths?",example:"Strategic thinking, Team leadership, Data-driven decisions",impact:"Highlights what makes you valuable."}]},job_description:{description:"Professional job description for a position",minimumContextMessage:"Please enter a job title to generate a description.",guidance:{overview:"AI will generate a comprehensive job posting with responsibilities, qualifications, and benefits.",bestPractices:["Include specific technologies or tools used in the role","Mention team size and reporting structure if relevant","Think about what makes this role unique at your company"],aiLimitations:["AI cannot know your specific company benefits - add those manually","Legal requirements vary by location - verify compliance","Review for any unconscious bias in language"]},fields:[{key:"title",label:"Job Title",required:!0,description:"The title of the position",tip:"Be specific about the role level and function.",example:"Senior Frontend Developer, Junior Marketing Manager",impact:"This is the primary context for the entire job description."},{key:"company_name",label:"Company Name",required:!1,description:"Name of the hiring company",tip:"Your company or organization name.",example:"TechCorp Kenya",impact:"Helps AI match your company culture and tone."},{key:"industry",label:"Industry",required:!1,description:"Industry or sector",tip:"What sector or industry is your company in?",example:"Fintech, Healthcare, Agriculture",impact:"Enables industry-specific requirements and terminology."},{key:"employment_type",label:"Employment Type",required:!1,description:"Full-time, part-time, contract, etc."},{key:"location",label:"Location",required:!1,description:"Job location or remote status"},{key:"key_responsibilities",label:"Key Responsibilities",required:!1,description:"Hints about main duties",tip:"List 3-5 main duties for this role.",example:"Lead development team, Design system architecture, Code review",impact:"Most critical for generating accurate job responsibilities."},{key:"qualifications",label:"Required Qualifications",required:!1,description:"Hints about required skills/experience",tip:"Required skills, experience level, education.",example:"5+ years experience, Bachelor degree, React expertise",impact:"Ensures the job description attracts qualified candidates."},{key:"company_overview",label:"Company Overview",required:!1,description:"Brief description of the company"},{key:"tone",label:"Tone",required:!1,description:"Desired tone: professional, friendly, technical, creative",tip:"How should the job posting feel?",example:"Professional, Friendly, Technical",impact:"Set
1s the voice and style of the entire posting."}]}},a=e=>r[e]||null,n=e=>{let t=a(e);return t?t.fields.filter(e=>e.required):[]}},66162:function(e,t,i){i.d(t,{O5:function(){return f},Sg:function(){return m},_p:function(){return y},nq:function(){return h},z9:function(){return g}});var r=i(2784),a=i(59820),n=i(14010),o=i(87686),s=i(60418),l=i(62202),c=i(82036),u=i(84475),d=i(33790);let p=async e=>(await s.Z.get("".concat(c.JW,"user/").concat(e,"/ai-content/usage"),{headers:{...(0,u.g0)({realm:"jobs"})}})).data,m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,a.a)({queryKey:["ai-content-usage",e],queryFn:()=>p(e),enabled:!!e&&!1!==t.enabled,staleTime:3e5,refetchOnWindowFocus:!1,onError:e=>{var t,i,r,a;let n=(null===(i=e.response)||void 0===i?void 0:null===(t=i.data)||void 0===t?void 0:t.message)||(null===(a=e.response)||void 0===a?void 0:null===(r=a.data)||void 0===r?void 0:r.error)||"Failed to fetch usage data";l.default.error(n)},...t})},y=()=>{var e;let t=(0,n.NL)(),[i,p]=(0,r.useState)(null),[m,y]=(0,r.useState)(d.pj.IDLE),[h,f]=(0,r.useState)(null),[g,v]=(0,r.useState)(null),[b,x]=(0,r.useState)(!1),w=(0,r.useRef)(null),k=(0,r.useRef)(null),I=(0,o.D)({mutationFn:async e=>{let{userId:t,contentType:i,context:r,outputFormat:a="text"}=e;return(await s.Z.post("".concat(c.JW,"user/").concat(t,"/ai-content/draft-async"),{user_id:t,content_type:i,context:r,output_format:a},{headers:{...(0,u.g0)({realm:"jobs"})}})).data}}),j=null===(e=w.current)||void 0===e?void 0:e.userId,A=(0,a.a)({queryKey:["ai-content-draft-status",j,i],queryFn:async()=>{var e;let t=await s.Z.get("".concat(c.JW,"user/").concat(j,"/ai-content/jobs/").concat(i),{headers:{...(0,u.g0)({realm:"jobs"})}});return(null===(e=t.data)||void 0===e?void 0:e.data)||t.data},enabled:!!i&&!!j&&b,refetchInterval:e=>{var t;let i=null===(t=e.state)||void 0===t?void 0:t.data;return(null==i?void 0:i.status)!=="completed"&&(null==i?void 0:i.status)!=="failed"&&d.gT.INTERVAL_MS},refetchIntervalInBackground:!1,meta:{expected404:!0}});(0,r.useEffect)(()=>()=>{k.current&&clearTimeout(k.current)},[]),(0,r.useEffect)(()=>{if(!A.data)return;let e=A.data;if("completed"===e.status){var i,r,a;y(d.pj.COMPLETED),v((null===(i=e.result)||void 0===i?void 0:i.content)||(null===(r=e.result)||void 0===r?void 0:r.output_content)||""),x(!1),k.current&&clearTimeout(k.current),(null===(a=w.current)||void 0===a?void 0:a.userId)&&t.invalidateQueries({queryKey:["ai-content-usage",w.current.userId]}),l.default.success("Content drafted successfully!")}else"failed"===e.status?(y(d.pj.FAILED),f(e.error||"Draft generation failed"),x(!1),k.current&&clearTimeout(k.current)):"processing"===e.status?y(d.pj.PROCESSING):"pending"===e.status&&y(d.pj.PENDING)},[A.data,t]),(0,r.useEffect)(()=>{if(A.error){var e,t,i,r,a,n,o;let s=null===(e=A.error.response)||void 0===e?void 0:e.status;if(403===s)throw f("Subscription required"),y(d.pj.FAILED),x(!1),A.error;429===s?f((null===(i=A.error.response)||void 0===i?void 0:null===(t=i.data)||void 0===t?void 0:t.message)||"Rate limit exceeded"):422===s?f((null===(a=A.error.response)||void 0===a?void 0:null===(r=a.data)||void 0===r?void 0:r.message)||"Validation failed"):f((null===(o=A.error.response)||void 0===o?void 0:null===(n=o.data)||void 0===n?void 0:n.message)||"Failed to check draft status"),y(d.pj.FAILED),x(!1),k.current&&clearTimeout(k.current)}},[A.error]);let N=(0,r.useCallback)(async e=>{var i,r,a,n,o,s,c;p(null),y(d.pj.PENDING),f(null),v(null),w.current=e;try{let r=await I.mutateAsync(e),a=(null==r?void 0:null===(i=r.data)||void 0===i?void 0:i.ajid)||(null==r?void 0:r.ajid);if(!a)throw Error("No AI job ID returned from server");p(a),x(!0),k.current=setTimeout(()=>{y(d.pj.TIMEOUT),f("Draft generation timed out. Please try again."),x(!1),t.invalidateQueries({queryKey:["ai-content-draft-status",e.userId,a]})},d.gT.MAX_TIMEOUT_MS)}catch(i){y(d.pj.FAILED);let e=null===(r=i.response)||void 0===r?void 0:r.status,t="Failed to start draft generation";if(403===e)throw i;if(null===(n=i.response)||void 0===n?void 0:null===(a=n.data)||void 0===a?void 0:a.message)t=i.response.data.message;else if(null===(s=i.response)||void 0===s?void 0:null===(o=s.data)||void 0===o?void 0:o.errors){let e=i.response.data.errors,r=Object.keys(e)[0];r&&(null===(c=e[r])||void 0===c?void 0:c[0])&&(t=e[r][0])}else i.message&&(t=i.message);f(t),403!==e&&429!==e&&422!==e&&l.default.error(t)}},[I,t]),T=(0,r.useCallback)(()=>{p(null),y(d.pj.IDLE),f(null),v(null),x(!1),w.current=null,k.current&&clearTimeout(k.current)},[]),E=(0,r.useCallback)(()=>{w.current&&N(w.current)},[N]);return{generateDraft:N,status:m,draftContent:g,error:h,isPolling:b,ajid:i,reset:T,retry:E,isQueuing:I.isPending,pollQuery:A}},h=()=>{var e;let t=(0,n.NL)(),[i,p]=(0,r.useState)(null),[m,y]=(0,r.useState)(d.pj.IDLE),[h,f]=(0,r.useState)(null),[g,v]=(0,r.useState)(null),[b,x]=(0,r.useState)(!1),w=(0,r.useRef)(null),k=(0,r.useRef)(null),I=(0,o.D)({mutationFn:async e=>{let{userId:t,contentType:i,currentContent:r,context:a,outputFormat:n="text"}=e;return(await s.Z.post("".concat(c.JW,"user/").concat(t,"/ai-content/improve-async"),{user_id:t,content_type:i,current_content:r,context:a,output_format:n},{headers:{...(0,u.g0)({realm:"jobs"})}})).data}}),j=null===(e=w.current)||void 0===e?void 0:e.userId,A=(0,a.a)({queryKey:["ai-content-improve-status",j,i],queryFn:async()=>{var e;let t=await s.Z.get("".concat(c.JW,"user/").concat(j,"/ai-content/jobs/").concat(i),{headers:{...(0,u.g0)({realm:"jobs"})}});return(null===(e=t.data)||void 0===e?void 0:e.data)||t.data},enabled:!!i&&!!j&&b,refetchInterval:e=>{var t;let i=null===(t=e.state)||void 0===t?void 0:t.data;return(null==i?void 0:i.status)!=="completed"&&(null==i?void 0:i.status)!=="failed"&&d.gT.INTERVAL_MS}
1,refetchIntervalInBackground:!1,meta:{expected404:!0}});(0,r.useEffect)(()=>()=>{k.current&&clearTimeout(k.current)},[]),(0,r.useEffect)(()=>{if(!A.data)return;let e=A.data;if("completed"===e.status){var i,r,a;y(d.pj.COMPLETED),v((null===(i=e.result)||void 0===i?void 0:i.content)||(null===(r=e.result)||void 0===r?void 0:r.output_content)||""),x(!1),k.current&&clearTimeout(k.current),(null===(a=w.current)||void 0===a?void 0:a.userId)&&t.invalidateQueries({queryKey:["ai-content-usage",w.current.userId]}),l.default.success("Content improved successfully!")}else"failed"===e.status?(y(d.pj.FAILED),f(e.error||"Improvement failed"),x(!1),k.current&&clearTimeout(k.current)):"processing"===e.status?y(d.pj.PROCESSING):"pending"===e.status&&y(d.pj.PENDING)},[A.data,t]),(0,r.useEffect)(()=>{if(A.error){var e,t,i,r,a,n,o;let s=null===(e=A.error.response)||void 0===e?void 0:e.status;if(403===s)throw f("Subscription required"),y(d.pj.FAILED),x(!1),A.error;429===s?f((null===(i=A.error.response)||void 0===i?void 0:null===(t=i.data)||void 0===t?void 0:t.message)||"Rate limit exceeded"):422===s?f((null===(a=A.error.response)||void 0===a?void 0:null===(r=a.data)||void 0===r?void 0:r.message)||"Validation failed"):f((null===(o=A.error.response)||void 0===o?void 0:null===(n=o.data)||void 0===n?void 0:n.message)||"Failed to check status"),y(d.pj.FAILED),x(!1),k.current&&clearTimeout(k.current)}},[A.error]);let N=(0,r.useCallback)(async e=>{var i,r,a,n,o,s,c;p(null),y(d.pj.PENDING),f(null),v(null),w.current=e;try{let r=await I.mutateAsync(e),a=(null==r?void 0:null===(i=r.data)||void 0===i?void 0:i.ajid)||(null==r?void 0:r.ajid);if(!a)throw Error("No AI job ID returned from server");p(a),x(!0),k.current=setTimeout(()=>{y(d.pj.TIMEOUT),f("Improvement timed out. Please try again."),x(!1),t.invalidateQueries({queryKey:["ai-content-improve-status",e.userId,a]})},d.gT.MAX_TIMEOUT_MS)}catch(i){y(d.pj.FAILED);let e=null===(r=i.response)||void 0===r?void 0:r.status,t="Failed to start improvement";if(403===e)throw i;if(null===(n=i.response)||void 0===n?void 0:null===(a=n.data)||void 0===a?void 0:a.message)t=i.response.data.message;else if(null===(s=i.response)||void 0===s?void 0:null===(o=s.data)||void 0===o?void 0:o.errors){let e=i.response.data.errors,r=Object.keys(e)[0];r&&(null===(c=e[r])||void 0===c?void 0:c[0])&&(t=e[r][0])}else i.message&&(t=i.message);f(t),403!==e&&429!==e&&422!==e&&l.default.error(t)}},[I,t]),T=(0,r.useCallback)(()=>{p(null),y(d.pj.IDLE),f(null),v(null),x(!1),w.current=null,k.current&&clearTimeout(k.current)},[]),E=(0,r.useCallback)(()=>{w.current&&N(w.current)},[N]);return{improveContent:N,status:m,improvedContent:g,error:h,isPolling:b,ajid:i,reset:T,retry:E,isQueuing:I.isPending,pollQuery:A}},f=()=>{var e;let t=(0,n.NL)(),[i,p]=(0,r.useState)(null),[m,y]=(0,r.useState)(d.pj.IDLE),[h,f]=(0,r.useState)(null),[g,v]=(0,r.useState)(null),[b,x]=(0,r.useState)(!1),w=(0,r.useRef)(null),k=(0,r.useRef)(null),I=(0,o.D)({mutationFn:async e=>{let{userId:t,contentType:i,currentContent:r,tone:a,outputFormat:n="text"}=e;return(await s.Z.post("".concat(c.JW,"user/").concat(t,"/ai-content/adapt-tone-async"),{user_id:t,content_type:i,current_content:r,tone:a,output_format:n},{headers:{...(0,u.g0)({realm:"jobs"})}})).data}}),j=null===(e=w.current)||void 0===e?void 0:e.userId,A=(0,a.a)({queryKey:["ai-content-adapt-tone-status",j,i],queryFn:async()=>{var e;let t=await s.Z.get("".concat(c.JW,"user/").concat(j,"/ai-content/jobs/").concat(i),{headers:{...(0,u.g0)({realm:"jobs"})}});return(null===(e=t.data)||void 0===e?void 0:e.data)||t.data},enabled:!!i&&!!j&&b,refetchInterval:e=>{var t;let i=null===(t=e.state)||void 0===t?void 0:t.data;return(null==i?void 0:i.status)!=="completed"&&(null==i?void 0:i.status)!=="failed"&&d.gT.INTERVAL_MS},refetchIntervalInBackground:!1,meta:{expected404:!0}});(0,r.useEffect)(()=>()=>{k.current&&clearTimeout(k.current)},[]),(0,r.useEffect)(()=>{if(!A.data)return;let e=A.data;if("completed"===e.status){var i,r,a;y(d.pj.COMPLETED),v((null===(i=e.result)||void 0===i?void 0:i.content)||(null===(r=e.result)||void 0===r?void 0:r.output_content)||""),x(!1),k.current&&clearTimeout(k.current),(null===(a=w.current)||void 0===a?void 0:a.userId)&&t.invalidateQueries({queryKey:["ai-content-usage",w.current.userId]}),l.default.success("Tone adapted successfully!")}else"failed"===e.status?(y(d.pj.FAILED),f(e.error||"Tone adaptation failed"),x(!1),k.current&&clearTimeout(k.current)):"processing"===e.status?y(d.pj.PROCESSING):"pending"===e.status&&y(d.pj.PENDING)},[A.data,t]),(0,r.useEffect)(()=>
1{if(A.error){var e,t,i,r,a,n,o;let s=null===(e=A.error.response)||void 0===e?void 0:e.status;if(403===s)throw f("Subscription required"),y(d.pj.FAILED),x(!1),A.error;429===s?f((null===(i=A.error.response)||void 0===i?void 0:null===(t=i.data)||void 0===t?void 0:t.message)||"Rate limit exceeded"):422===s?f((null===(a=A.error.response)||void 0===a?void 0:null===(r=a.data)||void 0===r?void 0:r.message)||"Validation failed"):f((null===(o=A.error.response)||void 0===o?void 0:null===(n=o.data)||void 0===n?void 0:n.message)||"Failed to check status"),y(d.pj.FAILED),x(!1),k.current&&clearTimeout(k.current)}},[A.error]);let N=(0,r.useCallback)(async e=>{var i,r,a,n,o,s,c;p(null),y(d.pj.PENDING),f(null),v(null),w.current=e;try{let r=await I.mutateAsync(e),a=(null==r?void 0:null===(i=r.data)||void 0===i?void 0:i.ajid)||(null==r?void 0:r.ajid);if(!a)throw Error("No AI job ID returned from server");p(a),x(!0),k.current=setTimeout(()=>{y(d.pj.TIMEOUT),f("Tone adaptation timed out. Please try again."),x(!1),t.invalidateQueries({queryKey:["ai-content-adapt-tone-status",e.userId,a]})},d.gT.MAX_TIMEOUT_MS)}catch(i){y(d.pj.FAILED);let e=null===(r=i.response)||void 0===r?void 0:r.status,t="Failed to start tone adaptation";if(403===e)throw i;if(null===(n=i.response)||void 0===n?void 0:null===(a=n.data)||void 0===a?void 0:a.message)t=i.response.data.message;else if(null===(s=i.response)||void 0===s?void 0:null===(o=s.data)||void 0===o?void 0:o.errors){let e=i.response.data.errors,r=Object.keys(e)[0];r&&(null===(c=e[r])||void 0===c?void 0:c[0])&&(t=e[r][0])}else i.message&&(t=i.message);f(t),403!==e&&429!==e&&422!==e&&l.default.error(t)}},[I,t]),T=(0,r.useCallback)(()=>{p(null),y(d.pj.IDLE),f(null),v(null),x(!1),w.current=null,k.current&&clearTimeout(k.current)},[]),E=(0,r.useCallback)(()=>{w.current&&N(w.current)},[N]);return{adaptTone:N,status:m,adaptedContent:g,error:h,isPolling:b,ajid:i,reset:T,retry:E,isQueuing:I.isPending,pollQuery:A}},g=()=>{let e=(0,n.NL)(),[t,i]=(0,r.useState)(null),[p,m]=(0,r.useState)(d.pj.IDLE),[y,h]=(0,r.useState)(null),[f,g]=(0,r.useState)(null),[v,b]=(0,r.useState)(!1),x=(0,r.useRef)(null),w=(0,r.useRef)(null),k=(0,o.D)({mutationFn:async e=>{let{mode:t,currentContent:i,context:r}=e,a={mode:t,title:r.title,employment_type:r.contract_type,location:r.location,key_responsibilities:r.key_responsibilities,qualifications:r.qualifications,tone:r.tone};return"improve"===t&&i&&(a.description=i),(await s.Z.post("".concat(c.JW,"jobposts/description-assist-async"),a,{headers:{...(0,u.g0)({realm:"hr"})}})).data}}),I=(0,a.a)({queryKey:["job-description-assist-status",t],queryFn:async()=>{var e;let i=await s.Z.get("".concat(c.JW,"jobposts/description-assist/").concat(t),{headers:{...(0,u.g0)({realm:"hr"})}});return(null===(e=i.data)||void 0===e?void 0:e.data)||i.data},enabled:!!t&&v,refetchInterval:e=>{var t;let i=null===(t=e.state)||void 0===t?void 0:t.data;return(null==i?void 0:i.status)!=="completed"&&(null==i?void 0:i.status)!=="failed"&&d.gT.INTERVAL_MS},refetchIntervalInBackground:!1,meta:{expected404:!0}});(0,r.useEffect)(()=>()=>{w.current&&clearTimeout(w.current)},[]),(0,r.useEffect)(()=>{if(!I.data)return;let e=I.data;if("completed"===e.status){var t,i,r,a,n;m(d.pj.COMPLETED),g({generated_description:(null===(t=e.result)||void 0===t?void 0:t.generated_description)||"",improvements_summary:(null===(i=e.result)||void 0===i?void 0:i.improvements_summary)||[],suggested_title:(null===(r=e.result)||void 0===r?void 0:r.suggested_title)||null,mode:null===(a=e.result)||void 0===a?void 0:a.mode,...e.result}),b(!1),w.current&&clearTimeout(w.current);let o=(null===(n=e.result)||void 0===n?void 0:n.mode)==="draft"?"Job description drafted successfully!":"Job description improved successfully!";l.default.success(o)}else"failed"===e.status?(m(d.pj.FAILED),h(e.error||"Job description generation failed"),b(!1),w.current&&clearTimeout(w.current)):"processing"===e.status?m(d.pj.PROCESSING):"pending"===e.status&&m(d.pj.PENDING)},[I.data]),(0,r.useEffect)(()=>{if(I.error){var e,t,i;let r=null===(e=I.error.response)||void 0===e?void 0:e.status,a=(null===(i=I.error.response)||void 0===i?void 0:null===(t=i.data)||void 0===t?void 0:t.message)||"Failed to check job description status";h(a),m(d.pj.FAILED),b(!1),403!==r&&429!==r&&422!==r&&l.default.error(a),w.current&&clearTimeout(w.current)}},[I.error]);let j=(0,r.useCallback)(async t=>{var r,a,n,o,s,c,u;i(null),m(d.pj.PENDING),h(null),g(null),x.current=t;try{let a=await k.mutateAsync(t),n=(null==a?void 0:null===(r=a.data)||void 0===r?void 0:r.ajid)||(null==a?void 0:a.ajid);if(!n)throw Error("No AI job ID returned from server");i(n),b(!0),w.current=setTimeout(()=>{m(d.pj.TIMEOUT),h("Job description generation timed out. Please try again."),b(!1),e.invali
1dateQueries({queryKey:["job-description-assist-status",n]})},d.gT.MAX_TIMEOUT_MS)}catch(i){m(d.pj.FAILED);let e=null===(a=i.response)||void 0===a?void 0:a.status,t="Failed to start job description generation";if(null===(o=i.response)||void 0===o?void 0:null===(n=o.data)||void 0===n?void 0:n.message)t=i.response.data.message;else if(null===(c=i.response)||void 0===c?void 0:null===(s=c.data)||void 0===s?void 0:s.errors){let e=i.response.data.errors,r=Object.keys(e)[0];r&&(null===(u=e[r])||void 0===u?void 0:u[0])&&(t=e[r][0])}else i.message&&(t=i.message);throw h(t),403!==e&&429!==e&&422!==e&&l.default.error(t),i}},[k,e]),A=(0,r.useCallback)(()=>{i(null),m(d.pj.IDLE),h(null),g(null),b(!1),x.current=null,w.current&&clearTimeout(w.current)},[]),N=(0,r.useCallback)(()=>{x.current&&j(x.current)},[j]);return{generateJobDescription:j,status:p,resultData:f,error:y,isPolling:v,ajid:t,reset:A,retry:N,isQueuing:k.isPending,pollQuery:I}}},33790:function(e,t,i){i.d(t,{gT:function(){return a},pj:function(){return r}});let r={IDLE:"idle",PENDING:"pending",PROCESSING:"processing",COMPLETED:"completed",FAILED:"failed",TIMEOUT:"timeout"},a={INTERVAL_MS:5e3,MAX_TIMEOUT_MS:3e5}},67476:function(e,t,i){i.d(t,{J:function(){return o}});var r=i(2784),a=i(45654);let n=e=>null!=e&&("string"==typeof e?e.trim().length>0:Array.isArray(e)?e.length>0:"object"!=typeof e||Object.keys(e).length>0),o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,r.useMemo)(()=>{let i=(0,a.gi)(e);if(!i)return{isValid:!0,missingFields:[],errorMessage:"",validatedContext:t};let r=(0,a.e7)(e),o=[];r.forEach(e=>{n(t[e.key])||o.push(e.label)});let s=0===o.length,l="";if(!s){if(1===o.length)l="Please provide ".concat(o[0]," before generating content.");else if(2===o.length)l="Please provide ".concat(o[0]," and ").concat(o[1]," before generating content.");else{let e=o.pop();l="Please provide ".concat(o.join(", "),", and ").concat(e," before generating content.")}}let c={};return i.fields.forEach(e=>{n(t[e.key])&&(c[e.key]=t[e.key])}),{isValid:s,missingFields:o,errorMessage:l||i.minimumContextMessage,validatedContext:c}},[e,t])}},31948:function(e,t,i){var r=i(52322);i(2784);var a=i(25237),n=i.n(a),o=i(13980),s=i.n(o);let l=n()(()=>Promise.all([i.e(4004),i.e(6615),i.e(9450),i.e(8149),i.e(7413)]).then(i.bind(i,27413)),{loadableGenerated:{webpack:()=>[27413]},ssr:!1,loading:()=>(0,r.jsx)("div",{className:"rich-text-editor-loading",children:(0,r.jsx)("div",{className:"animate-pulse bg-gray-200 rounded h-24"})})}),c=e=>(0,r.jsx)(l,{...e});c.propTypes={name:s().string.isRequired,value:s().string,onChange:s().func.isRequired,label:s().string,placeholder:s().string,error:s().string,disabled:s().bool,required:s().bool,toolbar:s().oneOfType([s().oneOf(["minimal","standard","full"]),s().array]),minHeight:s().number,maxHeight:s().number,ariaLabel:s().string,className:s().string},t.ZP=c}}]);

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.