PageSourceSearch

https://www.infrasquad.ai/assets/CoaxProfileBuilder-Bc1Xz8zS.js

js infrasquad.ai collected 2026-10-05 15:23:02 UTC 16,155 bytes, 3 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a10856-00ac-72c2-9a51-b210245b0b67")}catch(e){}}();import{j as e}from"./flow-vendor-CumVsJQ6.js";import{r as m,u as Q,b as Z}from"./react-vendor-CfRIAywc.js";import{au as z,at as D,X as ee,D as F,I as se,$ as re,a0 as te,a1 as ae,z as ie}from"./index-CCucE9GQ.js";import{C as le}from"./CertTypeSelect-5yVU4d5H.js";import{R as oe}from"./RemovablePill-BpZuc7Ay.js";import{C as ne}from"./certifications-DsNSUphB.js";import{l as h,i as E,a as j,e as _}from"./styles-DubWT2-l.js";import{S as ce}from"./StepLocation-Qjla3g3N.js";import{S as de}from"./StepPayExpectations-DoYNOir6.js";import{S as ue}from"./StepBio-BHss_RLd.js";import{S as me}from"./StepReferences-DJo9tcFN.js";import{R as pe}from"./ResumeUploadedBanner-DVlnByfo.js";import{g as fe,R as S,a as xe,b as be}from"./parseResume-D1iu3mM_.js";import{storeResume as he}from"./resumeStorage-DdQBTJam.js";import{u as T}from"./i18n-j5-ApgEN.js";import{R as ge}from"./resumeTelemetry-BkTPBSxD.js";import"./analytics-D7QLstay.js";import"./supabase-BxX1FzgX.js";function je({certifications:s=[],onChange:n}){const[l,d]=m.useState(z[0].value),[r,x]=m.useState(""),b=s.map(o=>D[o.type]).filter(Boolean),u=z.filter(o=>!s.some(g=>g.type===o.value)),p=u.some(o=>o.value===l)?l:u[0]?.value??null,a=p?D[p]:null;function f(){a&&(n([...s,{type:a.value,certNumber:r.trim()||null,issueDate:null,expirationDate:null,documentPath:null,status:ne.NONE,submittedAt:new Date().toISOString()}]),x(""))}function i(o){n(s.filter(g=>g.type!==o))}return e.jsxs("div",{children:[e.jsxs("label",{className:h,children:["Certifications ",e.jsx("span",{className:"text-muted font-normal",children:"(optional)"})]}),e.jsx("p",{className:"text-xs text-muted mb-2",children:"Add any cable / broadband credentials — SCTE, NCTI, ETA, Xfinity badging, OSHA. You can add proof later."}),b.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 mb-3",children:b.map(o=>e.jsx(oe,{onRemove:()=>i(o.value),children:o.shortLabel},o.value))}),a&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(le,{options:u,value:p,onChange:d}),e.jsxs("div",{className:"flex items-stretch gap-2",children:[a.hasNumber&&e.jsx("input",{className:E,value:r,onChange:o=>x(o.target.value),placeholder:a.numberLabel}),e.jsx("button",{type:"button",onClick:f,className:"shrink-0 px-4 py-2 text-sm font-semibold text-accent border border-accent/40 rounded-lg hover:bg-accent/5 transition-colors",children:"Add"})]})]})]})}const q=["fiber.profile_builder.steps.basic_info","fiber.profile_builder.steps.location","fiber.profile_builder.steps.pay","fiber.profile_builder.steps.skills","fiber.profile_builder.steps.bio","fiber.profile_builder.steps.references"];function _e({data:s,onChange:n,errors:l={}}){const{t:d}=T("dashboard");return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:h,children:d("fiber.profile_builder.basic_info.first_name_label")}),e.jsx("input",{className:j(l.firstName),value:s.firstName,onChange:r=>n({firstName:r.target.value})}),l.firstName&&e.jsx("p",{className:_,children:l.firstName})]}),e.jsxs("div",{children:[e.jsx("label",{className:h,children:d("fiber.profile_builder.basic_info.last_name_label")}),e.jsx("input",{className:j(l.lastName),value:s.lastName,onChange:r=>n({lastName:r.target.value})}),l.lastName&&e.jsx("p",{className:_,children:l.lastName})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:h,children:d("fiber.profile_builder.basic_info.email_label")}),e.jsx("input",{type:"email",className:j(l.email),value:s.email,onChange:r=>n({email:r.target.value})}),l.email&&e.jsx("p",{className:_,children:l.email})]}),e.jsxs("div",{children:[e.jsx("label",{className:h,children:d("fiber.profile_builder.basic_info.phone_label")}),e.jsx("input",{type:"tel",className:j(l.phone),value:s.phone,onChange:r=>n({phone:r.target.value})}),l.phone&&e.jsx("p",{className:_,children:l.phone})]}),e.jsxs("div",{children:[e.jsx("label",{className:h,children:d("fiber.profile_builder.basic_info.years_experience_label")}),e.jsx("div",{className:"flex items-center gap-4 mb-2",children:e.jsxs("label",{className:"flex items-center gap-2 text-sm text-charcoal cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:s.entryLevel,onChange:r=>n({entryLevel:r.target.checked,yearsExperience:r.target.checked?0:s.yearsExperience}),className:"accent-accent w-4 h-4"}),d("fiber.profile_builder.basic_info.entry_level")]})}),!s.entryLevel&&e.jsx("input",{type:"number",min:"0",max:"50",step:"1",inputMode:"numeric",className:j(l.yearsExperience),value:s.yearsExperience,onChange:r=>n({yearsExperience:r.target.value}),placeholder:d("fiber.profile_builder.basic_info.years_placeholder")}),l.yearsExperience&&e.jsx("p",{className:_,children:l.yearsExperience})]}),e.jsxs("div",{children:[e.jsxs("label",{className:h,children:[d("fiber.profile_builder.basic_info.school_label")," ",e.jsx("span",{className:"text-muted font-normal",children:d("fiber.profile_builder.basic_info.optional")})]}),e.jsx("input",{className:E,value:s.trainingInstitute,onChange:r=>n({trainingInstitute:r.target.value})})]}),e.jsxs("div",{children:[e.jsx("label",{className:h,children:d("fiber.profile_builder.basic_info.preferred_language_label")}),e.jsx("div",{className:"mt-1",children:e.jsx(se,{value:s.preferredLanguage||"en",onChange:r=>n({preferredLanguage:r})})})]}),e.jsx(je,{certifications:s.certifications||[],onChange:r=>n({certifications:r})})]})}const L=5;function U({skill:s,active:n,onToggle:l,disabled:d}){return e.jsx("button",{type:"button",onClick:()=>l(s),disabled:d,className:`text-left px-4 py-3 rounded-xl border text-sm font-medium transition-all duration-200 ${n?"border-accent bg-accent/10 text-accent":d?"border-gray-100 bg-gray-50 text-gray-300 cursor-not-allowed":"border-gray-200 bg-white text-charcoal hover:border-gray-300"}`,children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`w-4 h-4 rounded border flex items-center justify-center shrink-0 ${n?"bg-accent border-accent":"border-gray-300"}
1`,children:n&&e.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),s]})})}function ve({data:s,onChange:n}){const{t:l}=T("dashboard"),[d,r]=m.useState(""),[x,b]=m.useState(!1),u=s.skills||[],p=u.length>=L;function a(i){u.includes(i)?n({skills:u.filter(o=>o!==i)}):p||n({skills:[...u,i]})}const f=re.filter(i=>i.toLowerCase().includes(d.toLowerCase())&&!u.includes(i));return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("p",{className:"text-sm text-muted",children:l("fiber.profile_builder.skills.pick_strongest",{MAX_SKILLS:L})}),e.jsx("span",{className:`text-xs font-semibold px-2.5 py-1 rounded-full ${p?"bg-accent/10 text-accent":"bg-gray-100 text-muted"}`,children:l("fiber.profile_builder.skills.counter",{selected:u.length,MAX_SKILLS:L})})]}),e.jsxs("div",{className:"relative mb-6",children:[e.jsx("input",{className:E,placeholder:l("fiber.profile_builder.skills.search_placeholder"),value:d,onChange:i=>{r(i.target.value),b(!0)},onFocus:()=>b(!0),disabled:p}),x&&d.length>0&&!p&&e.jsx("div",{className:"absolute z-20 top-full left-0 right-0 mt-1 bg-white border border-gray-200 rounded-lg shadow-card max-h-48 overflow-y-auto",children:f.length>0?f.map(i=>e.jsx("button",{type:"button",onClick:()=>{a(i),r(""),b(!1)},className:"w-full text-left px-4 py-2.5 text-sm text-charcoal hover:bg-accent/5 hover:text-accent transition-colors",children:i},i)):e.jsx("p",{className:"px-4 py-2.5 text-sm text-muted",children:l("fiber.profile_builder.skills.no_matching_skills")})})]}),u.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 mb-6",children:u.map(i=>e.jsxs("span",{className:"inline-flex items-center gap-1 px-3 py-1 bg-accent/10 text-accent text-xs font-medium rounded-full",children:[i,e.jsx("button",{type:"button",onClick:()=>a(i),className:"hover:text-accent-hover",children:e.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M6 18L18 6M6 6l12 12"})})})]},i))}),e.jsx("p",{className:"text-xs font-bold uppercase tracking-widest text-muted mb-3",children:"Core coax skills"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2 sm:gap-3 mb-6",children:te.map(i=>{const o=u.includes(i);return e.jsx(U,{skill:i,active:o,onToggle:a,disabled:p&&!o},i)})}),e.jsx("p",{className:"text-xs font-bold uppercase tracking-widest text-muted mb-3",children:"Specialty & HFC skills"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2 sm:gap-3",children:ae.map(i=>{const o=u.includes(i);return e.jsx(U,{skill:i,active:o,onToggle:a,disabled:p&&!o},i)})})]})}const v=[_e,ce,de,ve,ue,me];function Fe(){const{t:s}=T("dashboard"),n=Q(),[l,d]=Z(),{profile:r,updateProfile:x,syncError:b}=ee(),u=m.useRef(null),p=Math.min(Number(l.get("step"))||0,v.length-1),[a,f]=m.useState(p);m.useEffect(()=>{l.has("step")&&d(c=>(c.delete("step"),c),{replace:!0})},[]);const[i,o]=m.useState({}),[g,W]=m.useState(null),[y,M]=m.useState(!1),[P,R]=m.useState(null),[k,w]=m.useState(0);m.useEffect(()=>{fe().then(w)},[]);async function $(c){W(c),R(null),M(!0);try{const[t,C]=await Promise.allSettled([he(c),xe(c,"coax")]),N=t.status==="fulfilled"?t.value:null;if(C.status==="rejected")throw N&&x({resumePath:N}),C.reason;const{profile:G,uploadsThisMonth:O}=C.value,J=be(r,G);x({...J,...N?{resumePath:N}:{}}),typeof O=="number"&&w(O),f(0)}catch(t){console.error("[CoaxProfileBuilder] parseResume failed:",t),t.code==="MONTHLY_LIMIT"&&typeof t.uploadsThisMonth=="number"&&w(t.uploadsThisMonth),R(t.message||s("fiber.profile_builder.could_not_parse_resume")),ie(t,{source:"CoaxProfileBuilder.handleResumeUpload",error_code:t.code||null,file_size:c?.size??null})}finally{M(!1)}}function Y(c){const t=c.target.files?.[0];t&&($(t),c.target.value="")}function A(c){const t={};return c===0&&(r.firstName?.trim()||(t.firstName=s("fiber.profile_builder.errors.first_name_required")),r.lastName?.trim()||(t.lastName=s("fiber.profile_builder.errors.last_name_required")),r.email?.trim()||(t.email=s("fiber.profile_builder.errors.email_required")),r.ph
1one?.trim()||(t.phone=s("fiber.profile_builder.errors.phone_required")),!r.entryLevel&&(r.yearsExperience===""||r.yearsExperience===null||r.yearsExperience===void 0)&&(t.yearsExperience=s("fiber.profile_builder.errors.years_required"))),c===1&&(r.city?.trim()||(t.city=s("fiber.profile_builder.errors.city_required")),r.state?.trim()||(t.state=s("fiber.profile_builder.errors.state_required")),/^\d{5}$/.test(r.zipCode?.trim()||"")||(t.zipCode=s("fiber.profile_builder.errors.zip_invalid")),r.jobSeekingStatus!=="not_looking"&&!r.availableDate&&(t.availableDate=s("fiber.profile_builder.errors.available_date_required"))),Object.keys(t).length>0?t:null}function H(){const c=A(a);if(c){o(c),window.scrollTo({top:0,behavior:"smooth"});return}o({}),a<v.length-1?(f(a+1),window.scrollTo({top:0,behavior:"smooth"})):n("/dashboard/coax/my-card")}function X(){o({}),a>0?(f(a-1),window.scrollTo({top:0,behavior:"smooth"})):n("/dashboard/coax/my-card")}function K(c){if(c>a){const t=A(a);if(t){console.warn("[CoaxProfileBuilder] validation failed on step",a,t),o(t),window.scrollTo({top:0,behavior:"smooth"});return}}o({}),f(c)}const V=v[a],B=k>=S,I=y||B;return e.jsxs("div",{className:"max-w-2xl mx-auto px-5 py-4 sm:py-8",children:[e.jsxs("div",{className:"mb-4 sm:mb-6",children:[e.jsx("h1",{className:"text-2xl sm:text-3xl font-bold text-charcoal",children:s("fiber.profile_builder.title")}),e.jsx("p",{className:"text-sm sm:text-base text-muted mt-1",children:s("fiber.profile_builder.subtitle")})]}),g&&e.jsx(pe,{fileName:g.name}),P&&e.jsxs("div",{className:"mb-4 flex items-start gap-2 text-xs bg-red-50 border border-red-200 text-red-700 rounded-lg px-3 py-2",children:[e.jsx("svg",{className:"w-4 h-4 shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01M5.07 19h13.86c1.54 0 2.5-1.67 1.73-3L13.73 4a2 2 0 00-3.46 0L3.34 16c-.77 1.33.19 3 1.73 3z"})}),e.jsx("span",{children:s("fiber.profile_builder.parse_error_prefix",{parseError:P})})]}),e.jsxs("div",{className:"sticky top-0 z-10 bg-surface pt-3 pb-3 sm:pb-4 mb-4 sm:mb-6 sm:static sm:z-auto sm:bg-transparent sm:pt-0",children:[e.jsx("div",{className:"flex items-center justify-between mb-2 overflow-x-auto pb-0.5 gap-1 no-scrollbar",children:q.map((c,t)=>e.jsx("button",{type:"button",onClick:()=>K(t),className:`text-xs font-medium whitespace-nowrap shrink-0 transition-colors ${t===a?"text-accent":t<a?"text-charcoal":"text-muted"}`,children:s(c)},c))}),e.jsx("div",{className:"w-full h-2 bg-gray-200 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-accent rounded-full transition-all duration-300",style:{width:`${(a+1)/v.length*100}%`}})})]}),e.jsxs("div",{className:"bg-white rounded-2xl shadow-card p-4 sm:p-8",children:[e.jsxs("div",{className:"flex items-center justify-between mb-5",children:[e.jsx("h2",{className:"text-lg font-bold text-charcoal",children:s("fiber.profile_builder.step_heading",{n:a+1,label:s(q[a])})}),a===0&&e.jsxs(e.Fragment,{children:[e.jsx("input",{ref:u,type:"file",accept:ge,className:"hidden",onChange:Y,disabled:I}),e.jsxs("button",{type:"button",onClick:()=>u.current?.click(),disabled:I,className:"flex items-center gap-1.5 text-xs font-medium text-accent hover:text-accent/80 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:B?s("fiber.profile_builder.monthly_limit_reached"):s("fiber.profile_builder.uploads_used_this_month",{uploadsThisMonth:k,RESUME_MONTHLY_CAP:S}),children:[y?e.jsx("svg",{className:"w-3.5 h-3.5 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("circle",{cx:"12",cy:"12",r:"8",strokeWidth:2,strokeDasharray:"40",strokeDashoffset:"30"})}):e.jsxs("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.9 5 5 0 019.9-1.32A4.5 4.5 0 0116 17H7z"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 12v6m0-6l-2 2m2-2l2 2"})]}),s(y?"fiber.profile_builder.parsing":"fiber.profile_builder.upload_resume"),e.jsx("span",{className:"text-muted font-normal",children:s("fiber.profile_builder.uploads_count",{uploadsThisMonth:k,RESUME_MONTHLY_CAP:S})})]})]})]}),e.jsx(V,{data:r,onChange:x,errors:b==="years_experience_required"&&a===0?{yearsExperience:s("fiber.profile_builder.errors.years_required"),...i}:i,showAvailability:a===1})]}),e.jsxs("div",{className:"flex justify-between mt-4 sm:mt-6",children:[e.jsx("div",{children:a>0&&e.jsxs(F,{variant:"secondary",size:"sm",onClick:X,children:[e.jsx("svg",{className:"w-4 h-4 mr-1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),s("fiber.profile_builder.back")]})}),e.jsx(F,{size:"sm",onClick:H,children:a<v.length-1?e.jsxs(e.Fragment,{children:[s("fiber.profile_builder.next"),e.jsx("svg",{className:"w-4 h-4 ml-1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]}):e.jsxs(e.Fragment,{children:[s("fiber.profile_builder.finish"),e.jsx("svg",{className:"w-4 h-4 ml-1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})]})})]})]})}export{Fe as default};
2
3//# chunkId=01a10856-00ac-72c2-9a51-b210245b0b67

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.