PageSourceSearch

https://dashboard.growreach.app/assets/index-DhMB5V73.js

js growreach.app collected 2026-09-24 14:32:37 UTC 8,892 bytes, 1 lines download raw bytes

1import{dG as U,du as V,dt as H,dq as q,dH as Q,cQ as N,cx as e,P as a,b8 as x,be as z,Y,bb as W,m as X,T as K,aU as Z}from"./index-CN-zKtDG.js";import{f as c}from"./formValidation-faArd7SI.js";import{b as $,a as J,c as ee,u as re}from"./useSeniorityLevels-BZCENgZt.js";import{u as oe,O as se,s}from"./index-RRGg4MAF.js";import{I as d}from"./index-B1GEvRgv.js";import"./appHelper-BI_bW-AM.js";import"./useRawTargetCreator-DuHejWGN.js";import"./creatorsQueryKeys-m_2oPrks.js";import"./useLinkedinSearch-CDz0lJEp.js";import"./useDebounce-DpsYD5zd.js";import"./trash-2-Dhg0px2h.js";import"./Input-DNaKT_bq.js";const{useWatch:h,useForm:ne}=a,{useBreakpoint:ae}=K,fe=()=>{const{t:r}=U(),[t]=ne(),y=ae()?.md??!1,{data:F,isLoading:B}=$(),{data:P,isLoading:T}=J(),{data:p,isLoading:j}=ee(),{data:O}=V(),{data:m}=H(),{handleStepComplete:G}=q(),M=Q(!1),A=re(!1),R=oe();N.useEffect(()=>{const o=R.data,i=o?.data?.professional_summary||o?.professional_summary;i&&t.setFieldValue("background",i)},[R.data,t]);const b=N.useRef(!1),[g,D]=N.useState(!0);N.useEffect(()=>{O?.linkedin_profile_link&&!b.current&&D(!1)},[O?.linkedin_profile_link]);const u=h("currentRole",t)==="other",E=h("currentIndustry",t)==="other";N.useEffect(()=>{if(O||m){const o={};O?.full_name&&(o.full_name=O.full_name);const i=Array.isArray(m)?m:m?.data??[];if(i.length>0){const n=i[0],_=t.getFieldValue("background");n.background?o.background=n.background:_&&(o.background=_),n.company&&(o.company=n.company),n.industry&&(P?.some(f=>f.industry===n.industry)?o.currentIndustry=n.industry:(o.currentIndustry="other",o.defineIndustry=n.industry)),n.domain_expertise&&(o.domain_expertise=n.domain_expertise);const l=n.seniority_level||n.seniorityLevel||n.seniority;if(l){const I=p?.find(f=>f.level.toLowerCase()===String(l).toLowerCase());o.seniority_level=I?.level||l}n.role&&(F?.some(f=>f.role===n.role)?o.currentRole=n.role:(o.currentRole="other",o.defineRole=n.role)),n.year_of_experience!==void 0&&(o.year_of_experience=n.year_of_experience)}t.setFieldsValue(o)}},[O,m,F,P,p,t]);const L=h([],t)??{},v=(()=>{const i=["full_name","currentRole","company","currentIndustry","year_of_experience","domain_expertise","seniority_level"].every(l=>{const I=L[l];return I!==""&&I!==null&&I!==void 0});let n=!0;if(L.currentRole==="other"){const l=L.defineRole;n=l!==""&&l!==null&&l!==void 0}let _=!0;if(L.currentIndustry==="other"){const l=L.defineIndustry;_=l!==""&&l!==null&&l!==void 0}return i&&n&&_})(),C=[...F?.map(o=>({label:o.role,value:o.role}))||[],{label:r("ONBOARDING.PROFILE.FORM.OTHER_ROLE_OPTION")||"Can't find your Role ? Add your own",value:"other"}],k=[...P?.map(o=>({label:o.industry,value:o.industry}))||[],{label:r("ONBOARDING.PROFILE.FORM.OTHER_INDUSTRY_OPTION")||"Can't find your Industry ? Add your own",value:"other"}],S=p?.map(o=>({label:o.level,value:o.level}))||[],w=async o=>{try{const i={phone:O?.phone||"",full_name:o.full_name,is_auto_comment:!0,is_commenting_enabled:!0,linkedin_profile_link:O?.linkedin_profile_link||""};i?.full_name&&await M.mutateAsync(i);const n={name:"Default",background:o.background||"",industry:o.currentIndustry==="other"?o.defineIndustry:o.currentIndustry,company:o.company||"",domain_expertise:o.domain_expertise||"",seniority_level:o.seniority_level||"",role:o.currentRole==="other"?o.defineRole:o.currentRole,year_of_experience:parseInt(o.year_of_experience)};await A.mutateAsync(n),await G(Z.ONBOARDING.PROFILE,i)}catch(i){console.error("Error submitting form:",i)}};return g?e.jsx(se,{onSuccess:()=>{b.current=!0,D(!1)},updateLinkedinProfileUrlMutation:R}):e.jsxs("div",{className:s.onboardProfile,children:[e.jsxs("div",{className:s.onboardProfileHeader,children:[e.jsx("h1",{className:s.onboardProfileTitle,children:r("ONBOARDING.PROFILE.PAGE_TITLE")}),e.jsx("p",{className:s.onboardProfileSubtitle,children:r("ONBOARDING.PROFILE.PAGE_SUBTITLE")})]}),e.jsxs(a,{form:t,layout:"vertical",onFinish:w,children:[e.jsxs("div",{className:s.onboardProfileForm,children:[e.jsx("div",{className:s.onboardProfileFormRow,children:e.jsx(a.Item,{label:r("ONBOARDING.PROFILE.FORM.ITEM_5_LABEL"),name:"full_name",className:s.onboardProfileFormItem,rules:c.requiredValidation(r("COMMON.FORM_IS_REQUIRED",{field:r("ONBOARDING.PROFILE.FORM.ITEM_5_LABEL")})),children:e.jsx(d,{placeholder:r("ONBOARDING.PROFILE.FORM.ITEM_5_PLACEHOLDER")})})}),e.jsxs("div",{className:s.onboardProfileFormRow,children:[e.jsx(a.Item,{required:!0,className:s.onboardProfileFormItem,label:e.jsxs(e.Fragment,{children:[e.jsx(z,{title:r("ONBOARDING.PROFILE.FORM.ITEM_4_EXTRA"),children:e.jsx(Y,{className:s.onboardProfileInfoIcon,size:18})}),r("ONBOARDING.PROFILE.FORM.ITEM_4_LABEL")]}),children:e.jsx(a.Item,{name:"currentRole",rules:c.requiredValidation(r("COMMON.FORM_IS_REQUIRED",{field:r("ONBOARDING.PROFILE.FORM.ITEM_4_LABEL")})),children:e.jsx(x,{showSearch:!0,loading:B,options:C,placeholder:r("ONBOARDING.PROFILE.FORM.ITEM_4_PLACEHOLDER")})})}),y?e.jsx(a.Item,{label:u?r("ONBOARDING.PROFILE.FORM.ITEM_9_LABEL"):"",name:"defineRole",className:s.onboardProfileFormItem,children:u&&e.jsx(d,{placeholder:r("ONBOARDING.PROFILE.FORM.ITEM_9_PLACEHOLDER")})}):u?e.jsx(a.Item,{label:u?r("ONBOARDING.PROFILE.FORM.ITEM_9_LABEL"):"",name:"defineRole",className:s.onboardProfileFormItem,children:u&&e.jsx(d,{placeholder:r("ONBOARDING.PROFILE.FORM.ITEM_9_PLACEHOLDER")})}):null]}),e.jsxs("div",{className:s.onboardProfileFormRow,children:[e.jsx(a.Item,{required:!0,className:s.onboardProfileFormItem,label:r("ONBOARDING.PROFILE.FORM.ITEM_3_LABEL"),children:e.jsx(a.Item,{name:"currentIndustry",rules:c.requiredValidation(r("COMMON.FORM_IS_REQUIRED",{field:r("ONBOARDING.PROFILE.FORM.ITEM_3_LABEL")})),children:e.jsx(x,{showSearch:!0,loading:T,options:k,placeholder:r("ONBOARDING.PROFILE.FORM.ITEM_3_PLACEHOLDER")})})}),y?e.jsx(a.Item,{label:E?r("ONBOARDING.PROFILE.FORM.ITEM_10_LABEL"):"",name:"defineIndustry",className:s.onboardProfileFormItem,children:E&&e.jsx(d,{placeholder:r("ONBOARDING.PROFILE.FORM.ITEM_10_PLACEHOLDER")})}):E?e.jsx(a.Item,{label:E?r("ONBOARDING.PROFILE.FORM.ITEM_10_LABEL"):"",name:"defineIndustry",className:s.onboardProfileFormItem,children:E&&e.jsx(d,{placeholder:r("ONBOARDING.PROFILE.FORM.ITEM_10_PLACEHOLDER")})}):null]}),e.jsxs("div",{className:s.onboardProfileFormRow,children:[e.jsx(a.Item,{label:r("ONBOARDING.PROFILE.FORM.ITEM_6_LABEL"),name:"company",className:s.onboardProfileFormItem,rules:c.requiredValidation(r("COMMON.FORM_IS_REQUIRED",{field:r("ONBOARDING.PROFILE.FORM.ITEM_6_LABEL")})),children:e.jsx(d,{placeholder:r("ONBOARDING.PROFILE.FORM.ITEM_6_PLACEHOLDER")})}),e.jsx(a.Item,{label:r("ONBOARDING.PROFILE.FORM.ITEM_8_LABEL"),name:"year_of_experience",className:s.onboardProfileFormItem,rules:c.yearsOfExperienceValidation(),children:e.jsx(d,{min:0,placeholder:r("ONBOARDING.PROFILE.FORM.ITEM_8_PLACEHOLDER"),type:"number"})})]}),e.jsxs("div",{className:s.onboardProfileFormRow,children:[e.jsx(a.Item,{required:!0,className:s.onboardProfileFormItem,label:r("ONBOARDING.PROFILE.FORM.ITEM_11_LABEL"),children:e.jsx(a.Item,{name:"seniority_level",rules:c.requiredValidation(r("COMMON.FORM_IS_REQUIRED",{field:r("ONBOARDING.PROFILE.FORM.ITEM_11_LABEL")})),children:e.jsx(x,{showSearch:!0,loading:j,options:S,placeholder:r("ONBOARDING.PROFILE.FORM.ITEM_11_PLACEHOLDER")})})}),e.jsx(a.Item,{label:r("ONBOARDING.PROFILE.FORM.ITEM_2_LABEL"),className:s.onboardProfileFormItem,required:!0,rules:c.requiredValidation(r("COMMON.FORM_IS_REQUIRED",{field:r("ONBOARDING.PROFILE.FORM.ITEM_2_LABEL")})),children:e.jsx(a.Item,{name:"domain_expertise",rules:c.requiredValidation(r("COMMON.FORM_IS_REQUIRED",{field:r("ONBOARDING.PROFILE.FORM.ITEM_2_LABEL")})),children:e.jsx(d,{placeholder:r("ONBOARDING.PROFILE.FORM.ITEM_2_PLACEHOLDER")})})})]}),e.jsx("div",{className:s.onboardProfileFormRow,children:e.jsxs(a.Item,{label:e.jsxs(e.Fragment,{children:[r("ONBOARDING.PROFILE.FORM.ITEM_1_LABEL"),e.jsx("p",{className:s.onboardProfileLabelOptional,children:`(${r("COMMON.OPTIONAL")})`})]}),className:s.onboardProfileFormItem,children:[e.jsx("p",{className:s.onboardProfileLabelExtra,children:r("ONBOARDING.PROFILE.FORM.ITEM_1_EXTRA")}),e.jsxs("div",{className:s.backgroundTextareaWrapper,children:[e.jsx(a.Item,{name:"background",children:e.jsx(d.TextArea,{rows:4,disabled:R.isLoading,placeholder:r("ONBOARDING.PROFILE.FORM.ITEM_1_PLACEHOLDER")})}),R.isLoading&&e.jsxs("div",{className:s.textareaLoaderOverlay,children:[e.jsx(W,{size:"default"}),e.jsx("span",{className:s.textareaLoaderText,children:r("ONBOARDING.PROFILE.FORM.ANALYZING_BACKGROUND")||"Analyzing your profile & generating AI background..."})]})]})]})})]}),e.jsx("div",{className:s.onboardProfileFooter,children:e.jsx(X,{type:"primary",htmlType:"submit",disabled:!v||M.isLoading||A.isLoading||R.isLoading,loading:M.isLoading||A.isLoading,className:s.onboardProfileButton,children:r("BUTTON.CONTINUE")})})]})]})};export{fe as default};

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.