1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,2250,e=>{"use strict";var t=e.i(43476),s=e.i(71645),n=e.i(59230),i=e.i(52368),a=e.i(14940);function l(e,t,n=22,i=0){let[a,r]=(0,s.useState)("");return(0,s.useEffect)(()=>{let s;if(!t||!e)return void r("");r("");let a=0,l=window.setTimeout(()=>{s=window.setInterval(()=>{a+=1,r(e.slice(0,a)),a>=e.length&&void 0!==s&&window.clearInterval(s)},n)},i);return()=>{window.clearTimeout(l),void 0!==s&&window.clearInterval(s)}},[e,t,n,i]),a}let r=["experience","skills","achievements","results","projects","responsibilities","qualifications","expertise","background","strengths"],o=["requirements","responsibilities","essential","desirable","criteria","competencies","objectives","qualifications","deliverables","duties"],d=new Set(["the","and","for","with","that","this","from","your","you","our","are","was","have","has","had","will","they","their","them","then","than","into","over","across","within","while","when","where","which","what","who","whom","whose","but","not","all","any","each","per","via","also","more","most","some","such","able","its","out","off","other","every","being","been","were","would","could","should","may","can","into","onto","upon","here","there","these","those","etc","how","now","look","looking","looked","want","wants","like","just","make","made","take","takes","get","gets","put","keep","need","needs","send","hold","find","give","set","see","day","days","end","one","two","engine","next","key","get","summary","statement","history","profile","personal","career","education","qualifications","interests","references","objective","objectives","overview","skills","requirements","responsibilities","criteria","essential","desirable","deliverables","duties","competencies","experience","experienced","opportunity","success","offer","apply","bring","nice","looks","about","role","roles","using","used","include","including","includes","work","working","works","worked","own","owns","owned","lead","manage","manages","managed","managing","build","built","run","runs","ran","drive","drives","grow","grew","deliver","delivers","delivered","scale","report","reports","reporting","support","help","mentor","develop","provide","responsible","ability","range","wide","level","well","good","both","new","strong","excellent","years","year","team","teams","company","business","based"]);function c(e){return/\d/.test(e)||/^[A-Z]{2,5}$/.test(e)?4:/[a-z][A-Z]/.test(e)?3:+(e.length>=9)}function m(e,t=40){if(!e||!e.trim())return[];let s=new Set,n=[];for(let t of e.split(/\s+/)){let e=t.replace(/[^\w&'+-]/g,"").replace(/^[-'&+]+|[-'&+]+$/g,"");if(e.length<3||e.length>22||!/[A-Za-z]/.test(e)||/^\d+[kmbn]?$/i.test(e))continue;let i=e.toLowerCase();!d.has(i)&&(s.has(i)||(s.add(i),n.push(e)))}return n.map((e,t)=>({tok:e,i:t})).sort((e,t)=>c(t.tok)-c(e.tok)||e.i-t.i).map(e=>e.tok).slice(0,t)}let u=RegExp("\\b(manager|executive|director|officer|assistant|analyst|lead|head|coordinator|consultant|specialist|engineer|developer|designer|administrator|advisor|adviser|supervisor|associate|nurse|teacher|accountant|technician|representative|partner|apprentice|controller|architect|strategist|planner|buyer|recruiter|paralegal|solicitor|electrician|plumber|carpenter|driver|operative|practitioner|therapist|scientist|researcher|editor|producer|marketer|bookkeeper|chef|cashier|receptionist|secretary|agent|clerk|surveyor|estimator|foreman|technologist|paramedic|pharmacist)\\b","i");function h(e){return e>=80?"#16A34A":e>=60?"#D6A92E":"#DC2626"}function p({hasScore:e,initialScore:n,revisedScore:i,onSettled:a}){let[l,r]=(0,s.useState)(null),[o,d]=(0,s.useState)(null),[c,m]=(0,s.useState)(!1);(0,s.useEffect)(()=>{if(!e){r(null),d(null),m(!1);return}if(window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){r(n),d(i),m(!0),a?.();return}let t=e=>1-Math.pow(1-e,3),s=Math.max(0,i-1),l=Math.max(0,i-2),o=0,c=performance.now(),u=e=>{let h=e-c;r(h>=2200?n:Math.round(n*t(h/2200))),h<=3200?(d(Math.round(l*t(h/3200))),o=requestAnimationFrame(u)):h<=4700?(d(Math.round(l+(h-3200)/1500*(s-l))),o=requestAnimationFrame(u)):h<=5800?(d(s),o=requestAnimationFrame(u)):(d(i),r(n),m(!0),a?.())};return o=requestAnimationFrame(u),()=>cancelAnimationFrame(o)},[e,n,i,a]);let u=Math.round(i-n),x=n>=80?"Already optimised":n>=60?"Already well-aligned":"Ceiling reached",g=h(o??i),f=null===l?"··":`${l}%`,w=null===o?"··":`${o}%`;return(0,t.jsxs)("div",{className:"relative rounded-xl bg-gold-light border border-gold/30 px-4 sm:px-6 py-1.5
1sm:py-2",style:{animation:"fadeIn 450ms ease-out"},children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 items-center",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-end gap-1.5 pr-16 sm:pr-20",children:[(0,t.jsx)("span",{className:"text-[9px] sm:text-[10px] uppercase tracking-[0.2em] font-bold text-brand-gray leading-none",children:"Submission Before"}),(0,t.jsx)("span",{className:"text-lg sm:text-xl font-black tabular-nums leading-none",style:{color:h(n),opacity:.85},children:f})]}),(0,t.jsxs)("div",{className:"flex items-baseline justify-start gap-1.5 pl-16 sm:pl-20",children:[(0,t.jsx)("span",{className:"text-[9px] sm:text-[10px] uppercase tracking-[0.2em] font-bold text-navy leading-none",children:"Now"}),(0,t.jsx)("span",{className:"text-lg sm:text-xl font-black tabular-nums leading-none",style:{color:g,transition:"color 600ms ease-out"},children:w}),(0,t.jsx)("span",{className:"text-[9px] sm:text-[10px] uppercase tracking-[0.2em] font-bold text-navy leading-none",children:"Optimised"})]})]}),(0,t.jsx)("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 flex items-center gap-2 sm:gap-3 pointer-events-none","aria-hidden":!0,children:c?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-base sm:text-lg font-black leading-none",style:{color:g,transition:"color 600ms ease-out"},children:"â"}),(0,t.jsx)("span",{className:"inline-block px-1.5 sm:px-2 py-0.5 rounded-full text-[9px] font-bold uppercase tracking-wider whitespace-nowrap",style:{backgroundColor:`${g}1F`,color:g,border:`1px solid ${g}66`},children:u>0?`+${u} pts`:x}),(0,t.jsx)("span",{className:"text-base sm:text-lg font-black leading-none",style:{color:g,transition:"color 600ms ease-out"},children:"â"})]}):(0,t.jsx)("span",{className:"text-[9px] sm:text-[10px] font-bold uppercase tracking-[0.2em] text-brand-gray animate-pulse whitespace-nowrap",children:"Scoringâ¦"})})]})}function x({ready:e}){return(0,t.jsx)("div",{className:"relative flex items-center justify-center mb-3 h-6 sm:h-7",children:(0,t.jsx)("p",{className:"flex items-center justify-center text-[13px] sm:text-sm font-bold uppercase tracking-[0.2em] leading-tight text-center text-gold",style:{animation:"fadeIn 320ms ease-out"},children:e?"Job Application Optimisation Pack Build Now Complete":"Finalising Your Optimisation Pack"},e?"done":"working")})}function g(){return(0,t.jsx)("span",{"aria-hidden":!0,className:"inline-flex",children:["tailorDot1","tailorDot2","tailorDot3"].map((e,s)=>(0,t.jsx)("span",{className:"inline-block",style:{width:"0.34em",animation:`${e} 1.6s steps(1, end) infinite`},children:"."},s))})}function f({phase:e,currentIndex:n,docs:i,docCount:a}){let l=(0,s.useMemo)(()=>{switch(e){case"analysis":return"Analysing alignment";case"build":{let e=i[n];if(!e)return"Building";if("audio"===e.kind)return"Building your audio transcript";let t=i.slice(0,n+1).filter(e=>"doc"===e.kind).length;return`Building document ${t} of ${a}`}case"complete":return"Bundle ready"}},[e,n,i,a]),r=(0,s.useMemo)(()=>{switch(e){case"analysis":return"Phase 1 of 2 · Optimisation";case"build":return"Phase 2 of 2 · Build";case"complete":return"Done"}},[e]);return(0,t.jsx)("div",{className:"relative flex items-center justify-between gap-3 mb-3",children:(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"text-[9px] uppercase tracking-[0.2em] text-gold font-bold mb-0.5",children:r}),(0,t.jsxs)("p",{className:"text-sm sm:text-base text-white font-bold uppercase tracking-widest leading-tight truncate",style:{animation:"fadeIn 320ms ease-out"},children:[l,"complete"!==e&&(0,t.jsx)(g,{})]},l)]})})}function w({events:e,elapsedMs:s}){let n=e.filter(e=>s>=e.startMs&&s<=e.startMs+900);return 0===n.length?null:(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 z-40 flex items-center justify-center",children:n.map(e=>{let n=(s-e.startMs)/900,i=n<.15?n/.15:n<.7?1:Math.max(0,1-(n-.7)/.3);return(0,t.jsxs)("div",{className:"absolute flex items-center gap-1.5",style:{animation:"tickPop 600ms ease-out",opacity:i,transition:"opacity 120ms linear",filter:"drop-shadow(0 0 8px rgba(74, 222, 128, 0.65))"},children:[(0,t.jsx)("span",{className:"flex items-center justify-center w-6 h-6 sm:w-7 sm:h-7 rounded-full bg-green-500 text-white font-black text-sm shadow-lg",style:{boxShadow:"0 0 12px rgba(74, 222, 128, 0.85)"},children:"â"}),(0,t.jsx)("span",{className:"px-1.5 py-0.5 rounded-md bg-green-500/15 text-green-300 border border-green-400/40 text-[10px] sm:text-[11px] font-bold uppercase tracking-wide whitespace-nowrap",children:e.word})]},e.id)})})}function b({mode:e,initialScore:n=0,revisedScore:i=0,hasScore:a=!1,onFilled:l}
1){let r="resolved"===e,o="watermark"===e,[d,c]=(0,s.useState)(!1);(0,s.useEffect)(()=>{if(!r)return;let e=window.setTimeout(()=>c(!0),60),t=window.setTimeout(()=>l?.(),1060);return()=>{window.clearTimeout(e),window.clearTimeout(t)}},[r,l]);let m=Math.min(i+(i-n)*.2,100),u=Math.max(n,i-(i-n)*.2);return(0,t.jsx)("div",{className:"grid grid-cols-3 gap-1.5 sm:gap-2",children:[{key:"ats",label:"ATS",value:m},{key:"recruiter",label:"Recruiter",value:i},{key:"hm",label:"Hiring Manager",value:u}].map((e,s)=>{let n=r?h(e.value):"#C9A84C";return(0,t.jsxs)("div",{className:"flex flex-col items-center gap-1",children:[(0,t.jsxs)("div",{className:`relative w-full h-10 sm:h-12 rounded-md overflow-hidden ${o?"":"bg-navy-light"}`,children:[(0,t.jsx)("div",{className:"absolute inset-x-0 bottom-0 rounded-t-md",style:r?{height:`${d?Math.min(100,e.value):0}%`,backgroundColor:n,transition:"height 850ms cubic-bezier(0.22,1,0.36,1), background-color 850ms ease-out"}:{height:"100%",backgroundColor:n,transformOrigin:"bottom",opacity:.85,animation:`tailorGateCreep ${16e3+700*s}ms ease-out ${350*s}ms both`}}),r&&d&&(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute top-0.5 left-1/2 -translate-x-1/2 inline-flex items-center justify-center w-3.5 h-3.5 sm:w-4 sm:h-4 rounded-full text-white text-[8px] sm:text-[10px] font-black leading-none",style:{backgroundColor:n,animation:"tickPop 500ms ease-out",boxShadow:`0 0 8px ${n}99`},children:"â"})]}),!o&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:`text-[8px] sm:text-[9px] font-bold uppercase tracking-wider text-center leading-none ${r?"text-white":"text-slate-300"}`,children:e.label}),(0,t.jsx)("p",{className:"text-[9px] font-mono tabular-nums",style:{color:n},children:r&&a?`${Math.round(e.value)}%`:"···"})]})]},e.key)})})}function v({docs:e,cvWords:s,jdWords:n,cvName:i,jdTitle:a,matchTickEvents:l,analysisElapsedMs:r}){return(0,t.jsxs)("div",{className:"relative grid grid-cols-[auto_minmax(0,1fr)_auto] gap-2 sm:gap-4 items-stretch",children:[(0,t.jsx)(y,{accentClass:"text-gold",label:"Your CV",words:s,flowDirection:"right",headerText:i}),(0,t.jsxs)("div",{className:"relative flex flex-col gap-2 sm:gap-3 px-1 sm:px-2",children:[(0,t.jsx)(w,{events:l,elapsedMs:r}),(0,t.jsx)(b,{mode:"scanning"}),(0,t.jsx)("div",{className:"grid grid-cols-4 gap-1 mt-1",children:e.map((e,s)=>(0,t.jsx)("div",{className:"rounded-sm px-1 py-1.5 text-center text-[8px] font-bold leading-tight bg-navy-light/60 border border-navy-light text-slate-600",style:{opacity:s<3?.85:.4},children:e.name},e.name))})]}),(0,t.jsx)(y,{accentClass:"text-blue-300",label:"Job description",words:n,flowDirection:"left",headerText:a})]})}function y({label:e,accentClass:n,words:i,flowDirection:a,headerText:l}){let r=(0,s.useMemo)(()=>(i??[]).filter(Boolean),[i]),o=r.length>0&&!!a,d=Math.min(r.length,7),[c,m]=(0,s.useState)([]),u=(0,s.useRef)(0);(0,s.useEffect)(()=>{o?(m(Array.from({length:d},(e,t)=>t%r.length)),u.current=d%r.length):m([])},[o,r,d]);let h=(0,s.useCallback)(e=>{if(0===r.length)return;let t=u.current%r.length;u.current=(u.current+1)%r.length,m(s=>{if(!s.length)return s;let n=s.slice();return n[e]=t,n})},[r.length]),p=(0,s.useMemo)(()=>Array.from({length:d},(e,t)=>({topPct:4+Math.round(88*t/Math.max(1,d))+17*t%6,emphasis:t%2==0})),[d]),x="right"===a?"wordFlowRight":"wordFlowLeft";return(0,t.jsxs)("div",{className:"relative flex flex-col items-center gap-1.5",children:[(0,t.jsx)("p",{className:`text-[8px] sm:text-[9px] uppercase tracking-[0.2em] font-bold ${n}`,children:e}),(0,t.jsxs)("div",{className:"relative h-32 sm:h-40 aspect-210/297 overflow-visible",children:[(0,t.jsxs)("div",{className:"relative w-full h-full bg-white rounded-xs shadow-xl overflow-hidden",children:[(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 rounded-xs ring-1 ring-gold/30"}),(0,t.jsx)("div",{className:"absolute top-2 left-2 right-2",children:l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"font-bold text-navy text-[5px] sm:text-[6px] leading-tight line-clamp-1",children:l}),(0,t.jsx)("div",{className:"h-0.5 bg-slate-400 rounded-sm w-1/2 mt-0.5"})]}):(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:"h-1.5 bg-slate-700 rounded-sm w-3/4"}),(0,t.jsx)("div",{className:"h-1 bg-slate-400 rounded-sm w-1/2"})]})}),(0,t.jsx)("div",{className:"absolute top-9 left-2 right-2 space-y-1",children:Array.from({length:13}).map((e,s)=>{let n=["w-full","w-11/12","w-10/12","w-5/6"];return 4===s||9===s?(0,t.jsx)("div",{className:"pt-0.5",children:(0,t.jsx)("div",{className:"h-1 bg-navy/70 rounded-sm w-1/3"})},s):(0,t.jsx)("div",{className:`h-[2px] bg-slate-300 rounded-sm ${n[s%n.length]}`},s)})})]}),o&&c.length>
10&&(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 z-30",style:{overflow:"visible"},children:c.map((e,s)=>(0,t.jsx)("span",{onAnimationIteration:()=>h(s),className:`absolute whitespace-nowrap select-none font-mono text-[10px] sm:text-[11px] ${p[s].emphasis?`${n} font-bold drop-shadow-[0_2px_8px_rgba(201,168,76,0.55)]`:"text-white/85 drop-shadow-[0_1px_3px_rgba(0,0,0,0.7)]"}`,style:{top:`${p[s].topPct}%`,left:"20%",animation:`${x} 3800ms ease-out ${s/d*3800}ms infinite`,transformOrigin:"center"},children:r[e]},s))})]})]})}function j({docs:e,currentIndex:s,subPhase:i,isComplete:a,roleLine:l,executiveSummary:r,closingCta:o,cvName:d,jdTitle:c,startSummary:m,hasScore:u}){let h=e[s];return a?(0,t.jsx)(N,{roleLine:l,executiveSummary:r,closingCta:o,start:m??!0,hasScore:u??!0}):(0,t.jsx)("div",{className:"relative space-y-3 sm:space-y-4",children:(0,t.jsxs)("div",{className:"relative grid grid-cols-[auto_minmax(0,1fr)_auto] gap-2 sm:gap-4 items-stretch",children:[(0,t.jsx)(y,{accentClass:"text-gold",label:"Your CV",headerText:d}),(0,t.jsxs)("div",{className:"relative flex flex-col items-center justify-center px-1 sm:px-2 min-h-40 sm:min-h-48",children:[(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 z-0 flex items-end justify-center opacity-[0.16]",children:(0,t.jsx)("div",{className:"w-full",children:(0,t.jsx)(b,{mode:"watermark"})})}),!a&&h&&(0,t.jsxs)("div",{className:"relative z-10 w-full flex flex-col items-center justify-center",children:[(0,t.jsx)("p",{className:`text-sm sm:text-base text-gold font-bold uppercase tracking-widest mb-2 text-center transition-opacity duration-500 ${"flying-in"===i?"opacity-30":"opacity-100"}`,children:h.name}),(0,t.jsxs)("div",{className:"relative w-full h-32 sm:h-36 flex items-center justify-center",children:[("flying-in"===i||"merging"===i)&&(0,t.jsx)("div",{"aria-hidden":!0,className:`absolute top-1/2 left-1/2 w-16 sm:w-20 aspect-210/297 bg-white rounded-xs shadow-2xl ring-1 ring-gold/40 ${"flying-in"===i?"opacity-0":"opacity-100"}`,style:{animation:"flying-in"===i?"miniDocFromLeft 1100ms ease-out forwards":"miniDocSettleLeft 800ms ease-out forwards"},children:(0,t.jsxs)("div",{className:"absolute top-1.5 left-1.5 right-1.5 space-y-1",children:[(0,t.jsx)("div",{className:"h-1 bg-gold rounded-sm w-3/4"}),(0,t.jsx)("div",{className:"h-0.5 bg-slate-400 rounded-sm w-1/2"})]})}),("flying-in"===i||"merging"===i)&&(0,t.jsx)("div",{"aria-hidden":!0,className:`absolute top-1/2 left-1/2 w-16 sm:w-20 aspect-210/297 bg-white rounded-xs shadow-2xl ring-1 ring-blue-400/40 ${"flying-in"===i?"opacity-0":"opacity-100"}`,style:{animation:"flying-in"===i?"miniDocFromRight 1100ms ease-out forwards":"miniDocSettleRight 800ms ease-out forwards"},children:(0,t.jsxs)("div",{className:"absolute top-1.5 left-1.5 right-1.5 space-y-1",children:[(0,t.jsx)("div",{className:"h-1 bg-blue-400 rounded-sm w-3/4"}),(0,t.jsx)("div",{className:"h-0.5 bg-slate-400 rounded-sm w-1/2"})]})}),("merging"===i||"filling"===i||"ticking"===i||"sliding"===i)&&(0,t.jsx)("div",{className:`relative ${"sliding"===i?"translate-y-12 opacity-0":"translate-y-0 opacity-100"} transition-all duration-700`,style:"merging"===i?{animation:"mergedDocAppear 800ms ease-out"}:void 0,children:"doc"===h.kind?(0,t.jsxs)("div",{className:"relative w-24 sm:w-28 aspect-210/297 bg-white rounded-md shadow-2xl overflow-hidden",children:[(0,t.jsxs)("div",{className:"absolute top-2 left-2 right-2 space-y-1",children:[(0,t.jsx)("div",{className:"h-1.5 bg-navy rounded-sm w-3/4"}),(0,t.jsx)("div",{className:"h-1 bg-gold rounded-sm w-1/2"})]}),(0,t.jsx)("div",{className:"absolute top-7 left-2 right-2 space-y-1",children:Array.from({length:12}).map((e,s)=>{let n=["w-full","w-11/12","w-10/12","w-5/6"];return(0,t.jsx)("div",{className:`h-[2px] bg-slate-300 rounded-sm ${n[s%n.length]}`},s)})}),("ticking"===i||"sliding"===i)&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-emerald-500/10 backdrop-blur-xs",style:{animation:"fadeIn 280ms ease-out"},children:(0,t.jsx)("span",{className:"inline-flex items-center justify-center w-10 h-10 rounded-full bg-emerald-500 text-white text-2xl font-black",style:{animation:"tickPop 600ms ease-out"},children:"â"})})]}):(0,t.jsxs)("div",{className:"relative w-28 h-28 sm:w-32 sm:h-32 rounded-2xl bg-navy-light/90 border-2 border-gold/40 shadow-2xl overflow-hidden flex items-center justify-center",children:[(0,t.jsx)(n.SpeakerWaveIcon,{className:`w-12 h-12 sm:w-14 sm:h-14 text-gold ${"merging"===i||"filling"===i?"animate-audio-pulse":""}`,strokeWidth:1.6,"aria-hidden":"true"}
1),(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute bottom-3 left-1/2 -translate-x-1/2 flex items-end gap-0.5 opacity-40",style:{height:"18px"},children:[8,14,6,18,10,14,8].map((e,s)=>(0,t.jsx)("span",{className:"w-0.5 bg-gold rounded-full",style:{height:`${e}px`,transformOrigin:"bottom",animation:"merging"===i||"filling"===i?`tailorEqBar ${600+s%4*130}ms ease-in-out ${90*s}ms infinite`:void 0}},s))}),("ticking"===i||"sliding"===i)&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-emerald-500/15 backdrop-blur-xs",style:{animation:"fadeIn 280ms ease-out"},children:(0,t.jsx)("span",{className:"inline-flex items-center justify-center w-10 h-10 rounded-full bg-emerald-500 text-white text-2xl font-black",style:{animation:"tickPop 600ms ease-out"},children:"â"})})]})})]})]},`${s}-${i}`)]}),(0,t.jsx)(y,{accentClass:"text-blue-300",label:"Job description",headerText:c})]})})}function N({roleLine:e,executiveSummary:s,closingCta:n,start:i=!0,hasScore:a=!0}){let r=(e?32*e.length+220:0)+280,o=s?18*s.length:0,d=l(e??"",i,32,220),c=l(s??"",i&&!!(!e||e.length>0),18,r),m=l(n??"",i&&!!n,22,r+o+320),u=c.length>=(s??"").length,h=i&&!!s&&(s.length>c.length||!n&&u),p=!!n&&u&&m.length<n.length;return a?(0,t.jsxs)("div",{className:"relative flex flex-col items-center justify-center text-center py-4 sm:py-5 px-4 sm:px-10 max-w-4xl mx-auto min-h-32",children:[e&&(0,t.jsxs)("p",{className:"text-slate-400 text-[10px] sm:text-xs tracking-wide mb-2 font-medium",children:[d,(0,t.jsx)("span",{"aria-hidden":!0,className:`inline-block w-px h-2.5 ml-0.5 bg-slate-400 align-middle ${i&&d.length<(e?.length??0)?"animate-pulse":"opacity-0"}`})]}),s&&(0,t.jsxs)("p",{className:"text-slate-300 text-[13px] sm:text-sm leading-relaxed italic",children:[c,(0,t.jsx)("span",{"aria-hidden":!0,className:`inline-block w-[3px] h-[18px] sm:h-5 ml-1 bg-gold align-middle rounded-[1px] ${h?"animate-pulse":"opacity-0"}`,style:{boxShadow:h?"0 0 8px rgba(201, 168, 76, 0.7), 0 0 14px rgba(201, 168, 76, 0.35)":void 0}})]}),n&&(0,t.jsxs)("p",{className:"mt-3 text-white text-[13px] sm:text-sm leading-relaxed font-bold",children:[m,(0,t.jsx)("span",{"aria-hidden":!0,className:`inline-block w-[3px] h-[18px] sm:h-5 ml-1 bg-gold align-middle rounded-[1px] ${p?"animate-pulse":"opacity-0"}`,style:{boxShadow:p?"0 0 8px rgba(201, 168, 76, 0.7), 0 0 14px rgba(201, 168, 76, 0.35)":void 0}})]})]}):(0,t.jsxs)("div",{className:"relative flex flex-col items-center justify-center text-center gap-3 py-6 sm:py-8 px-4 sm:px-10 max-w-4xl mx-auto min-h-32",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"inline-block w-7 h-7 rounded-full border-2 border-gold/30 border-t-gold animate-spin"}),(0,t.jsxs)("p",{className:"text-gold text-base sm:text-lg font-bold animate-pulse",children:["Building your pack",(0,t.jsx)(g,{})]}),(0,t.jsx)("p",{className:"text-slate-300 text-xs sm:text-sm",children:"Your documents and summary are being prepared. Please wait."})]})}e.s(["AnalyseLoadingAnimationV2",0,function({initialScore:e,revisedScore:n,cvText:l,jdText:d,roleLine:c,executiveSummary:g,closingCta:w,onComplete:y,onDocBuilt:N}){let k=(0,i.useLocale)(),M=(0,a.vocab)(k),S=(0,s.useMemo)(()=>{var e;return e=M.CV,[{kind:"doc",name:`Optimised ${e}`,evidence:"Your strongest CV evidence",requirement:"Mapped to the JD's must-haves"},{kind:"doc",name:"Alignment Report",evidence:"Every CV claim, matched",requirement:"Against each JD requirement"},{kind:"doc",name:"Cover Letter",evidence:"Your evidence, in your voice",requirement:"The JD's priorities, addressed"},{kind:"doc",name:"Strategic Interview Briefing",evidence:"Your STAR + CAR stories",requirement:"The likely interview themes"},{kind:"doc",name:"Company Research",evidence:"Role and employer context",requirement:"What this employer cares about"},{kind:"doc",name:"30 / 60 / 90 Day Implementation Plan",evidence:"Your first-90-days plan",requirement:"The role's early deliverables"},{kind:"doc",name:"Battle Card",evidence:"Your power phrases",requirement:"Your headline pitch"},{kind:"audio",name:"Audio Companion",evidence:"Your spoken answer",requirement:"A confident first impression"}]},[M.CV]),$=(0,s.useMemo)(()=>S.filter(e=>"doc"===e.kind).length,[S]),C="number"==typeof e&&"number"==typeof n,T=C?e:55,A=C?n:85,D=(0,s.useMemo)(()=>
1{if(w)return w;if(!C)return"Review the Alignment Report for the full breakdown of how your application scores against this job.";let e=Math.round(A-T);return e>0?`Review the Alignment Report to see where the ${e} point optimisation was achieved.`:`Review the Alignment Report to see how your application already aligns at ${Math.round(A)}%.`},[w,C,T,A]),q=(0,s.useMemo)(()=>(function(e){if(!e)return null;for(let t of e.split(/\n/).map(e=>e.trim()).filter(Boolean).slice(0,6))if(function(e){if(!e||e.length>40||/[\d@|·,/]/.test(e))return!1;let t=e.split(/\s+/).filter(Boolean);return!(t.length<2)&&!(t.length>4)&&t.every(e=>/^[A-Z]/.test(e)&&/[a-z]/.test(e)&&/^[A-Za-z'â.-]+$/.test(e))}(t))return t;return null})(l??""),[l]),R=(0,s.useMemo)(()=>(function(e){if(!e)return null;let t=e.split(/\n/).map(e=>e.trim()).filter(Boolean),s=e=>e.split(/[|·â]/)[0].replace(/\s*\([^)]*\)/g,"").trim();for(let e of t.slice(0,8)){let t=s(e);if(t.length>=4&&t.length<=60&&u.test(t)&&!/[@]/.test(t))return t}let n=t[0]??"";return n&&n.length<=60?s(n):null})(d??""),[d]),B=(0,s.useMemo)(()=>(function(e,t=4){if(!e)return[];let s=[],n=new Set;for(let i of e.split(/\n/)){let e=i.split(/[,|·â]|\t/)[0].trim();if(e.length<4||e.length>40||/[\d@]/.test(e))continue;let a=e.split(/\s+/).filter(Boolean);if(a.length<1||a.length>5||!u.test(e))continue;let l=e.toLowerCase();if(!n.has(l)&&(n.add(l),s.push(e),s.length>=t))break}return s})(l??""),[l]),E=(0,s.useMemo)(()=>m(l??""),[l]),I=(0,s.useMemo)(()=>m(d??""),[d]),P=(0,s.useMemo)(()=>{if(!E.length||!I.length)return[];let e=new Set(E.map(e=>e.toLowerCase()));return I.filter(t=>e.has(t.toLowerCase()))},[E,I]),F=(0,s.useMemo)(()=>{let e=(function(e){let t=new Set,s=[];for(let n of e){let e=n.toLowerCase();!e||t.has(e)||(t.add(e),s.push(n))}return s})([...B,...E]).slice(0,22);return e.length>=6?e:r},[B,E]),L=(0,s.useMemo)(()=>{let e=I.slice(0,22);return e.length>=6?e:o},[I]),[Y,O]=(0,s.useState)("analysis"),[_,z]=(0,s.useState)(Date.now()),[,V]=(0,s.useState)(0),[J,W]=(0,s.useState)(0),[Z,K]=(0,s.useState)("flying-in"),[,U]=(0,s.useState)(0),[G,H]=(0,s.useState)(!1),Q=(0,s.useCallback)(()=>H(!0),[]),[X,ee]=(0,s.useState)(!1),et=(0,s.useCallback)(()=>ee(!0),[]),[es,en]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=window.setInterval(()=>V(e=>e+1),120);return()=>window.clearInterval(e)},[]),(0,s.useEffect)(()=>{let e,t=Date.now()-_;return"analysis"===Y&&t<22e3&&(e=window.setTimeout(()=>{O("build"),z(Date.now()),W(0),K("flying-in")},22e3-t)),()=>window.clearTimeout(e)},[Y,_]),(0,s.useEffect)(()=>{if("build"!==Y)return;let e=window.setTimeout(()=>K("merging"),1200),t=window.setTimeout(()=>K("filling"),2e3),s=window.setTimeout(()=>K("ticking"),4400),n=window.setTimeout(()=>K("sliding"),5200),i=window.setTimeout(()=>{U(e=>Math.min(S.length,e+1));let e=S[J];e&&N&&N(J,e),J+1>=S.length?(O("complete"),z(Date.now())):(W(e=>e+1),K("flying-in"))},6100);return()=>{window.clearTimeout(e),window.clearTimeout(t),window.clearTimeout(s),window.clearTimeout(n),window.clearTimeout(i)}},[Y,J,S.length]),(0,s.useEffect)(()=>{if("complete"!==Y||!X||es)return;let e=(c?.length??0)*32+220,t=(g?.length??0)*18,s=(D?.length??0)*22,n=window.setTimeout(()=>en(!0),e+280+t+320+s+350);return()=>window.clearTimeout(n)},[Y,X,es,c,g,D]),(0,s.useEffect)(()=>{if("complete"!==Y||!y||!G)return;let e=window.setTimeout(y,2500);return()=>window.clearTimeout(e)},[Y,G,y]);let ei=(0,s.useMemo)(()=>(function(){let e=12+Math.floor(5*Math.random()),t=[],s=[];for(let n=0;n<e;n++)t.push(.85+.3*Math.random()),s.push(.2+.8*Math.random());let n=e=>e.reduce((e,t)=>e+t,0),i=n(t),a=n(s),l=.65/i,r=.35/a,o=[],d=0,c=0;for(let n=0;n<e;n++){let e=t[n]*l,a=t[n]/i;d=Math.min(1,d+e),c=Math.min(1,c+a),o.push({tNorm:d,pNorm:c}),d=Math.min(1,d+s[n]*r),o.push({tNorm:d,pNorm:c})}return o.push({tNorm:1,pNorm:1}),o})(),[]),ea=(0,s.useMemo)(()=>(function(e){if(!e||0===e.length)return[];let t=Math.min(e.length,5+Math.floor(3*Math.random())),s=19e3/t,n=new Set,i=[];for(let a=0;a<t;a++){let t=null;for(let s=0;s<12;s++){let s=e[Math.floor(Math.random()*e.length)];if(!n.has(s)){t=s;break}}if(!t)break;n.add(t);let l=.7*s*Math.random();i.push({id:`mt-${a}`,word:t,startMs:Math.round(1500+a*s+l)})}return i})(P.length?P:L),[P,L]),el="analysis"===Y?Math.min(22e3,Date.now()-_):22e3,er=function(e,t){if(e<=0)return 0;if(e>=1)return 1;let s={tNorm:0,pNorm:0};for(let n of t){if(e<=n.tNorm){let t=n.tNorm-s.tNorm;if(0===t)return n.pNorm;let i=(e-s.tNorm)/t;return s.pNorm+(n.pNorm-s.pNorm)*i}s=n}return 1}(el/22e3,ei);return h("analysis"===Y?A*er:A),(0,t.jsxs)("div",{className:"space-y-3 sm:space-y-4",children:[es&&(0,t.jsx)(p,{hasScore:C,initialScore:T,revisedScore:A,onSettled:Q}),(0,t.jsxs)("section",{className:`relative overflow-hidden rounded-2xl bg-navy text-white p-3 sm:p-4 shadow-xl ${!C||"complete"===Y&&!G?"tailor-card-working":""}
1`,children:[(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute -top-16 -right-16 w-56 h-56 rounded-full bg-gold/20 blur-3xl"}),(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute -bottom-16 -left-16 w-56 h-56 rounded-full bg-blue-500/10 blur-3xl"}),"complete"!==Y?(0,t.jsx)(f,{phase:Y,currentIndex:J,docs:S,docCount:$}):(0,t.jsx)(x,{ready:es}),"complete"===Y&&C&&(0,t.jsx)("div",{className:"relative mb-3",children:(0,t.jsx)(b,{mode:"resolved",initialScore:T,revisedScore:A,hasScore:C,onFilled:et})}),"analysis"===Y&&(0,t.jsx)(v,{docs:S,cvWords:F,jdWords:L,cvName:q,jdTitle:R,matchTickEvents:ea,analysisElapsedMs:el}),("build"===Y||"complete"===Y)&&(0,t.jsx)(j,{docs:S,currentIndex:J,subPhase:Z,isComplete:"complete"===Y,roleLine:c,executiveSummary:g,closingCta:D,cvName:q,jdTitle:R,startSummary:X,hasScore:C}),C?"build"===Y&&(0,t.jsx)("p",{className:"relative mt-3 text-[9px] sm:text-[10px] text-slate-400 leading-relaxed text-center",children:"Each document is built from your real career evidence against this specific job ad."}):(0,t.jsx)("p",{className:"relative mt-3 text-center text-[10px] sm:text-xs text-slate-400 leading-relaxed",children:"This takes a moment. Please keep this tab open while we work."})]})]})}])}]);
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.