1"use strict";(self.webpackChunktrf_frontend=self.webpackChunktrf_frontend||[]).push([[6876],{96297(e,t,a){function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}a.d(t,{A:()=>s})},94656(e,t,a){a.d(t,{A:()=>l});a(96540);var s=a(3433),n=a(74848);const l=({myJobDetail:e,classes:t})=>{const a=(0,s.Zp)(),l=!e.private&&(0,n.jsx)("button",{type:"button",title:"Go To Search",className:null!=t?t:"btn btn-trf-outline-black btn-rounded mr-2",onClick:()=>{(()=>{let t="Any",s="Any",n="Any",l="Any",i="Any",r="Any",o="Any";t=e.profession.name,e.tags&&e.tags.length>0&&(s=e.tags.map(e=>e.name).join(", "));n=e.attributes.filter(e=>"gender"===e.name&&"Any"!==e.value).map(e=>e.value).join(", ");const[c,d]=e.age.split("-").map(Number),m=e.platform_requirements.map(e=>e.platform).join(", "),u=e.platform_requirements.reduce((e,t)=>t.minimum_followers<e?t.minimum_followers:e,1/0);e.open_to_applicants&&(o=e.open_to_applicants.includes("Global")?"Any":e.open_to_applicants.includes("Singapore")?"Singapore":e.open_to_applicants.includes("New Zealand")?"New Zealand":e.open_to_applicants.includes("United States")?"United States":"Australia"),l=e.attributes.filter(e=>"ethnicity"===e.name&&"Any"!==e.value).map(e=>e.value).join(", "),i=e.attributes.filter(e=>"hair_color"===e.name&&"Any"!==e.value).map(e=>e.value).join(", ");const h=e.attributes.filter(e=>"height"===e.name&&null!==e.value).map(e=>null!==e.value?parseInt(e.value):null).filter(e=>null!==e).sort((e,t)=>null!==e&&null!==t?e-t:0),p=h.length>0?h[0]:"Any",_=h.length>0?h[h.length-1]:"Any";r=e.attributes.filter(e=>"build"===e.name&&"Any"!==e.value).map(e=>e.value).join(", "),a(`/search/talent/?professions=${t}&subcategory=${s}&country=${o}&gender=${n}&minimum_age=${c}&maximum_age=${d}&plateform=${m}&minimum_follwowers=${u}&counry=${o}ðnicity=${l}&hair_color=${i}&minimum_height=${p}&maximum_height=${_}&build=${r}`)})()},children:"Go To Search"});return(0,n.jsx)(n.Fragment,{children:l})}},21606(e,t,a){a.d(t,{A:()=>s});const s=()=>null},63972(e,t,a){a.r(t),a.d(t,{default:()=>U});var s=a(3433),n=a(86984),l=a(40364),i=a(96540),r=a(55868),o=a(71468),c=a(74848);const d=()=>{const{page:e}=(0,s.g)(),t=(0,s.Zp)(),a=(0,o.d4)(e=>e.JobStepsDetailsReducer.stepsCompleted),n=a=>{t((0,r.sM)(e,a))};return(0,c.jsx)("div",{className:"cast-talent-form",children:(0,c.jsx)("div",{className:"cast-talent-form__wrapp",children:(0,c.jsxs)("ul",{className:"cast-talent-steps",children:[(0,c.jsxs)("li",{className:`${(0,r.QX)(["details",e])?"active-page":""}\n ${(0,r.cr)(["details",a],e)?"active-step":""}`,children:[(0,c.jsxs)("div",{className:"cast-talent-steps__wrapp",onClick:()=>(0,r.cr)(["details",a],e)?n("details"):"",children:[(0,c.jsx)("span",{className:"cast-talent-steps__circle",children:"1"}),(0,c.jsx)("span",{className:"cast-talent-steps__name",children:"Job details"})]}),(0,c.jsx)("div",{className:"cast-talent-steps__divider"})]}),(0,c.jsxs)("li",{className:`${(0,r.QX)(["who",e])?"active-page":""}\n ${(0,r.cr)(["who",a],e)?"active-step":""}`,children:[(0,c.jsxs)("div",{className:"cast-talent-steps__wrapp",onClick:()=>(0,r.cr)(["who",a],e)?n("who"):"",children:[(0,c.jsx)("span",{className:"cast-talent-steps__circle",children:"2"}),(0,c.jsx)("span",{className:"cast-talent-steps__name",children:"Who"})]}),(0,c.jsx)("div",{className:"cast-talent-steps__divider"})]}),(0,c.jsxs)("li",{className:`${(0,r.QX)(["budget",e])?"active-page":""}\n ${(0,r.cr)(["budget",a],e)?"active-step":""}`,children:[(0,c.jsxs)("div",{className:"cast-talent-steps__wrapp",onClick:()=>(0,r.cr)(["budget",a],e)?n("budget"):"",children:[(0,c.jsx)("span",{className:"cast-talent-steps__circle",children:"3"}),(0,c.jsx)("span",{className:"cast-talent-steps__name",children:"Budget"})]}),(0,c.jsx)("div",{className:"cast-talent-steps__divider"})]}),(0,c.jsx)("li",{className:`${(0,r.QX)(["preview",e])?"active-page":""}\n ${(0,r.cr)(["preview",a],e)?"active-step":""}`,children:(0,c.jsxs)("div",{className:"cast-talent-steps__wrapp",onClick:()=>(0,r.cr)(["preview",a],e)?n("preview"):"",children:[(0,c.jsx)("span",{className:"cast-talent-steps__circle",children:"4"}),(0,c.jsx)("span",{className:"cast-talent-steps__name",children:"Preview & Submit"})]})})]})})})},m=({positionApproved:e,loading:t,saveAndExit:a})=>{const{page:n}=(0,s.g)(),i=new Set(["details","preview","submitted"]),r=l.c.CDN_PATH;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("header",{className:"cast-talent-header",children:[(0,c.jsx)("a",{href:"/",className:"cast-talent-header__logo",children:(0,c.jsx)("img",{src:`${r}/svg/logo-black.svg`,alt:"The Right Fit"})}),(0,c.jsxs)("div",{className:"cast-talent-header__box",children:[(0,c.jsx)("h1",{children:"Find Influencers"}),e&&(0,c.jsx)("button",{className:"cast-talent-header__save "+(i.has(n)?"active":""),type:"button",onClick:a,children:"SAVE AND EXIT"})]})]}),(0,c.jsx)(d,{})]})};
1var u=a(8773),h=a(59186),p=a(64864),_=a(57546),v=a(49785),b=a(71929),x=a(25814),f=a(94829),j=a(49376),g=a(2543),y=a(27043),N=a(12476),w=a(63545);const A=["gender","hair_color","marital_status","pets","sexuality","trans_gender","children","diet","ethnicity","covid_vaccination"],k=[{value:"instagram",label:"Instagram"},{value:"tiktok",label:"TikTok"},{value:"youtube",label:"Youtube"}],$=()=>{var e,t,a;const{handleSubmit:n,register:l,setValue:d,trigger:$,watch:C,control:S,getValues:O,setError:q,formState:{errors:P}}=(0,v.mN)({defaultValues:{requirements:[{platform:"",min_followers:null}]}}),T=(0,o.d4)(e=>e.userDetail.data),E=(0,o.d4)(e=>e.postJobAttributesList.data),F=(0,o.d4)(e=>e.postJobTagsList.data),[D,I]=(0,i.useState)(!1),[M,R]=(0,i.useState)(),[J,L]=(0,i.useState)(!1),{id:Z}=(0,s.g)(),U=(0,s.Zp)(),[B,G]=(0,i.useState)({listCount:1}),[V,z]=(0,i.useState)({positionApproved:!1,loading:!1}),{fetchData:K}=(0,b.A)(),Y=(0,o.wA)(),H=C(),W=async e=>{const{name:t,value:a}=e.target;d(t,a),await $(e.target.name)},Q=(0,i.useRef)(null);(0,i.useEffect)(()=>{(0,N.eG)();(async()=>{L(!0);try{const e=await K((0,f.Pz)(Z));Object.keys(e.data.data).forEach(t=>{if("tags"===t){const t=e.data.data.tags.map(e=>e.id.toString());d("tags",t)}else if("attributes"===t){const t=e.data.data.attributes;A.forEach(e=>{const a=t.filter(t=>t.name===e);if(a.length>0){const t=a.map(e=>e.id.toString());d(`attributes.${e}`,t)}})}else if("platform_requirements"===t){e.data.data[t].length&&G(a=>({listCount:e.data.data[t].length}));for(let a=0;a<e.data.data[t].length;a++){const s=e.data.data[t][a].platform,n=k.find(e=>e.label===s);n&&d(`requirements.${a}.platform`,n.value);const l=e.data.data[t][a].min_followers;d(`requirements.${a}.min_followers`,l)}}else d(t,e.data.data[t],{shouldDirty:!0})});const{data:t}=e.data;if(t){const e=await K((0,f.cf)(Z));z(Object.assign({},V,{loading:J,positionApproved:null!==e.data.data.approved_at})),Y((0,j.Zv)({stepsCompleted:e.data.data[0]})),L(!1)}}catch(e){console.error(e),L(!1)}})()},[]);const{mutate:X,isPending:ee}=(0,_.U)(f.e0,{onSuccess:async e=>{(0,w.s)("client","position.job-who.set",T,Z),U((0,r.sM)("/who","/budget"))},onError(e){R(e)},catch(e){console.error(e)}},Z),{mutate:te,isPending:ae}=(0,_.U)(e=>(0,f.df)(Z,e),{onSuccess:()=>{U("/projects")}}),se=e=>{const t=new Set;for(const a of H.requirements){if(t.has(a.platform))return"Platform should be unique";t.add(a.platform)}return!0},ne=()=>{const e=Object.values(F),t=C("tags")||[];if(Array.isArray(t)&&t.length>0){const a=t.map(e=>e.toString())||[];return e.filter(e=>a.includes(e.id)).map(e=>({label:e.name,value:e.id}))}return[]},le=e=>{const t=Object.values(E).find(t=>t.name===e);if(t&&t.values){const a=C(`attributes.${e}`)||[];if(Array.isArray(a)&&a.length>0){const e=a.map(e=>e.toString())||[];return t.values.filter(t=>e.includes(null==t?void 0:t.value))}if(null!==a){return t.values.filter(e=>a===(null==e?void 0:e.value))}}return[]},ie=(e,t=null,a=!1)=>{const s=Object.values(E).find(t=>t.name===e);if(s&&s.values){var n;t=null!==t?t:s.displayName;const i=Object.keys({}).indexOf(e),r=a?{required:`This ${s.displayName} is required`}:{};return(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{children:t}),(0,c.jsx)(u.Ay,Object.assign({},l(`attributes.${e}`,r),{className:"trf-react-select-container trf-react-select-show-clear-container trf-react-select-rounded",classNamePrefix:"trf-react-select",options:s.values,onChange:(t,a)=>re(t,e),isMulti:!0,placeholder:`Filter By ${s.displayName}`,value:le(e),isOptionDisabled:t=>((e,t)=>{const a=Object.values(E).find(t=>t.name===e),s=["Any","Rather not say"],n=a.values.filter(e=>s.includes(e.label)).map(e=>e.value)||[],l=C(`attributes.${e}`)||[];if(Array.isArray(l)&&l.length>0){const e=l.map(e=>e.toString())||[],a=n[0];if(e.includes(a)&&t.value!==a)return!0}else{const e=n[0];if(l===e&&t.value!==e)return!0}return!1})(e,t),isClearable:!1})),P.attributes&&P.attributes[e]&&(0,c.jsx)("div",{className:"error-message",children:null==(n=P.attributes[e])?void 0:n.message})]},`${e}-${i}`)}return null},re=(e,t)=>{q(`attributes.${t}`,{});const a=e.some(e=>"Any"===e.label),s=e.some(e=>"Rather not say"===e.label);if(a){const a=e.filter(e=>"Any"===e.label).map(e=>e.value);d(`attributes.${t}`,a)}else if(s){const a=e.filter(e=>"Rather not say"===e.label).map(e=>e.value);d(`attributes.${t}`,a)}else d(`attributes.${t}`,(0,g.map)(e,"value"))},oe=(e,t=null)=>{const a=Object.values(E).find(t=>t.name===e);if(a&&a.values){var s;
1t=null!==t?t:a.displayName;const n=Object.keys({}).indexOf(e);return(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{children:t}),(0,c.jsx)(u.Ay,Object.assign({},l(`attributes.${e}`),{className:"trf-react-select-container trf-react-select-single-container trf-react-select-rounded",classNamePrefix:"trf-react-select",options:a.values,onChange:(t,a)=>ce(t,a,e,n),isMulti:!1,placeholder:`Filter By ${a.displayName}`,isClearable:!0,value:le(e)})),P.attributes&&P.attributes[e]&&(0,c.jsx)("div",{className:"error-message",children:null==(s=P.attributes[e])?void 0:s.message})]},`${e}-${n}`)}},ce=(e,t,a,s)=>{d(`attributes.${a}`,e?[e.value]:[])};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(m,Object.assign({},V,{saveAndExit:()=>{te(Object.assign({},O(),{step:2}))}})),(0,c.jsx)("div",{className:"cast-talent-content cast-talent-who",children:(0,c.jsx)("div",{className:"cast-talent-form-content",children:(0,c.jsxs)("form",{onSubmit:n(e=>{X(Object.assign({},e,{step:2}))}),className:"trf-job-post-form",children:[(0,c.jsx)(y.A,{loading:J||ae||ee,children:(0,c.jsxs)("div",{className:"cast-talent-form-content__container",children:[(0,c.jsxs)("div",{className:"cast-talent-form-content__box box_desctiption",children:[(0,c.jsx)("label",{children:"Describe the type of influencers you want to work with"}),(0,c.jsx)("textarea",Object.assign({onFocus:()=>{return e="ideal_candidate",void R(t=>{const a=Object.assign({},t);return delete a[e],a});var e}},l("ideal_candidate",{required:"Please enter a headline for your job",pattern:{value:r.UB,message:"Please avoid entering personal information."}}),{placeholder:"E.g. Foodie influencer with high Australian audience, who is vegan",onChange:W})),P.ideal_candidate&&(0,c.jsx)("div",{className:"error-message ",children:null==(e=P.ideal_candidate)?void 0:e.message}),M&&(0,c.jsx)(x.A,{errorField:"ideal_candidate",errors:M})]}),(0,c.jsxs)("div",{className:"cast-talent-form-content__box",children:[(0,c.jsx)("label",{children:"Areas of expertise"}),(()=>{var e;const t=Object.values(F).map(e=>({value:e.id,label:e.name}));return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(u.Ay,Object.assign({},l("tags",{required:"Areas of expertise is required"}),{className:"trf-react-select-container trf-react-select-rounded",classNamePrefix:"trf-react-select",options:t,isMulti:!0,placeholder:"Areas of expertise",onChange:(e,t)=>
1{q("tags",{}),d("tags",(0,g.map)(e,"value"))},value:ne(),isClearable:!0})),P&&P.tags&&(0,c.jsx)("div",{className:"error-message",children:null==P||null==(e=P.tags)?void 0:e.message})]})})()]}),(0,c.jsx)(h.A,{level:2,children:"Which social media platform?"}),(0,c.jsx)("ul",{className:"cast-talent-form-content__box plateform__container mb-0",children:O("requirements").map((e,t)=>{var a,s,n,i;return(0,c.jsxs)("li",{children:[(0,c.jsxs)("div",{className:"cast-talent-form-content__items-container cast-talent-form-content__box_select",children:[(0,c.jsx)("label",{children:"Platform"}),(0,c.jsx)(u.Ay,Object.assign({},l(`requirements.${t}.platform`,{required:"Platform is required",validate:se}),{className:"trf-react-select-container trf-react-select-single-container trf-react-select-rounded",classNamePrefix:"trf-react-select",options:k,onChange:(e,a)=>{q(`requirements.${t}.platform`,{}),d(`requirements.${t}.platform`,e?e.value:"")},value:k.find(e=>{var a;return e.value===(null==(a=C(`requirements.${t}.platform`))?void 0:a.toString())}),isMulti:!1,isClearable:!0,placeholder:"Select Platform"})),P&&P.requirements&&P.requirements[t]&&(null==P||null==(a=P.requirements[t])?void 0:a.platform)&&(0,c.jsx)("div",{className:"error-message",children:null==P||null==(s=P.requirements[t])||null==(s=s.platform)?void 0:s.message})]}),(0,c.jsxs)("div",{className:"cast-talent-form-content__items-container",children:[(0,c.jsx)("div",{className:"cast-talent-form-content__items",children:(0,c.jsx)("div",{className:"block",children:(0,c.jsx)("label",{children:"Min Followers"})})}),(0,c.jsxs)("div",{className:"cast-talent-form-content__items",children:[(0,c.jsx)("div",{className:"block followers_blocks",children:(0,c.jsxs)("div",{className:"followers_blocks",children:[(0,c.jsx)(v.xI,{render:({field:e})=>(0,c.jsx)(p.p,Object.assign({id:`followers-${t}`,type:"number",className:""},l(`requirements.${t}.min_followers`,{required:"Followers is required",min:{value:1e3,message:"Min followers must be at least 1000."}}))),control:S,name:`requirements.${t}.min_followers`,rules:{required:"Platform is required"}}),P&&P.requirements&&P.requirements[t]&&(null==P||null==(n=P.requirements[t])?void 0:n.min_followers)&&(0,c.jsx)("div",{className:"error-message",children:null==P||null==(i=P.requirements[t])||null==(i=i.min_followers)?void 0:i.message})]})}),0!==t&&(0,c.jsx)("span",{className:"connector",onClick:()=>(e=>{G(e=>({listCount:e.listCount-1}));const t=O("requirements").filter((t,a)=>a!==e);d("requirements",t)}
1)(t),children:(0,c.jsx)("i",{className:"fa fa-trash"})})]})]})]},"requirement"+t)})}),B.listCount<3&&(0,c.jsx)("button",{className:"cast-talent-form-content__add-btn",type:"button",onClick:()=>{d(`requirements.${B.listCount}.platform`,""),d(`requirements.${B.listCount}.min_followers`,null),G(e=>({listCount:e.listCount+1}))},children:"+ Add platform"}),(0,c.jsx)(h.A,{level:2,children:"Add more details"}),(0,c.jsxs)("div",{className:"cast-talent-form-content__box cast-talent-form-content__box_row",children:[(0,c.jsxs)("div",{className:"cast-talent-form-content__items-container",children:[(0,c.jsx)("label",{children:"Age range"}),(0,c.jsxs)("div",{className:"cast-talent-form-content__items",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)(p.p,Object.assign({id:"minimum_age"},l("minimum_age",{required:"Min Age is required.",min:{value:16,message:"Minimum age should be at least 16 years old."}}),{onChange:W,type:"number"})),P.minimum_age&&(0,c.jsx)("div",{className:"error-message ",children:null==(t=P.minimum_age)?void 0:t.message}),M&&(0,c.jsx)(x.A,{errorField:"minimum_age",errors:M})]}),(0,c.jsx)("div",{children:(0,c.jsx)("span",{children:"To"})}),(0,c.jsxs)("div",{children:[(0,c.jsx)(p.p,Object.assign({id:"maximum_age"},l("maximum_age",{required:"Max Age is required.",max:{value:100,message:"Maximum age should be less than or equal to 100."},validate:e=>{const t=parseInt(O("minimum_age"),10);if(null===e)return!0;const a="number"==typeof e?e:parseFloat(e);return!(!isNaN(t)&&!isNaN(a)&&Number.isInteger(a))||(a>=t||"Maximum age should be greater than or equal to the minimum age.")}}),{onChange:W,type:"number"})),P.maximum_age&&(0,c.jsx)("div",{className:"error-message ",children:null==(a=P.maximum_age)?void 0:a.message}),M&&(0,c.jsx)(x.A,{errorField:"maximum_age",errors:M})]})]})]}),(0,c.jsx)("div",{className:"cast-talent-form-content__items-container cast-talent-form-content__box_select",children:ie("gender")})]}),(0,c.jsxs)("div",{className:"cast-talent-form-content__box-selects",children:[D&&(0,c.jsxs)("div",{children:[(0,c.jsxs)("div",{className:" cast-talent-form-content__box cast-talent-form-content__box_row ",children:[(0,c.jsx)("div",{className:" cast-talent-form-content__items-container cast-talent-form-content__box_select ",children:ie("children")}),(0,c.jsx)("div",{className:" cast-talent-form-content__items-container cast-talent-form-content__box_select ",children:ie("marital_status")})]}),(0,c.jsxs)("div",{className:" cast-talent-form-content__box cast-talent-form-content__box_row ",children:[(0,c.jsx)("div",{className:" cast-talent-form-content__items-container cast-talent-form-content__box_select ",children:ie("sexuality")}),(0,c.jsx)("div",{className:" cast-talent-form-content__items-container cast-talent-form-content__box_select ",children:oe("trans_gender")})]}),(0,c.jsxs)("div",{className:" cast-talent-form-content__box cast-talent-form-content__box_row ",children:[(0,c.jsx)("div",{className:" cast-talent-form-content__items-container cast-talent-form-content__box_select ",children:oe("diet")}),(0,c.jsx)("div",{className:" cast-talent-form-content__items-container cast-talent-form-content__box_select ",children:oe("pets")})]}),(0,c.jsx)("div",{className:" cast-talent-form-content__box cast-talent-form-content__box_width cast-talent-form-content__box_row ",children:(0,c.jsx)("div",{className:" cast-talent-form-content__items-container cast-talent-form-content__box_select ",children:oe("covid_vaccination")})})]}),(0,c.jsxs)("button",{className:"cast-talent-form-content__btn-toggle",type:"button",onClick:()=>I(!D),children:[D?"Hide attributes":"Advanced attributes"," "]})]})]})}),(0,c.jsxs)("div",{className:"cast-talent-form-content__box-btn",children:[(0,c.jsx)("button",{className:"cast-talent-form-content__back",type:"button",onClick:()=>U((0,r.sM)("/who","/details")),children:"back"}),(0,c.jsx)("button",{className:"cast-talent-form-content__save",type:"submit",disabled:J||ae||ee,onClick:()=>{Q.current&&Q.current.scrollIntoView({behavior:"smooth",block:"start"})},children:"save & continue"})]})]})})})]})};
1var C=a(85383),S=a(59118),O=a(21606);const q=l.c.CDN_PATH,P=[{label:"Global",value:"1"},{label:"Australia wide",value:"2"},{label:"Singapore",value:"3"},{label:"New South Wales",value:"4"},{label:"South Australia",value:"5"},{label:"Victoria",value:"6"},{label:"Western Australia",value:"7"},{label:"Queensland",value:"8"},{label:"Australian Capital Territory",value:"9"},{label:"Tasmania",value:"10"},{label:"Northern Territory",value:"11"},{label:"New Zealand",value:"12"},{label:"United States",value:"13"}],T=()=>{var e,t,a,n,l;const{handleSubmit:d,register:m,setValue:y,trigger:A,setError:k,formState:{errors:$}}=(0,v.mN)({mode:"onChange"}),T=(0,i.useRef)(null),[E,F]=(0,i.useState)([]),[D,I]=(0,i.useState)([]),[M,R]=(0,i.useState)(),[J,L]=(0,i.useState)({id:"",profession_id:"",is_real_person:0,title:"",brief:"",open_to_applicants:[],is_image_needed:!1,image_requirement:"",payment_type:"",payment_term:"",files:[]}),Z=(0,o.d4)(e=>e.userDetail.data),[U,B]=(0,i.useState)(!1),[G,V]=(0,i.useState)(J.is_image_needed),{fetchData:z}=(0,b.A)(),K=(0,s.Zp)(),{id:Y}=(0,s.g)();let H="";const W=(0,o.d4)(e=>e.postJobSelection.professionid),Q=(0,o.d4)(e=>e.postJobSelection.isrealperson),X=(0,i.useRef)(null),ee=e=>new Promise((t,a)=>{const s=new FileReader;s.onload=e=>{var a;t(null==(a=e.target)?void 0:a.result)},s.onerror=t=>{console.error(`FileReader failed on file ${e.name}.`),a(null)},e||(console.error("No file to read."),a(null)),s.readAsDataURL(e)}),te=async e=>{const{name:t,value:a,type:s}=e.target;"file"===s&&(e=>{if(e.target.files){const t=0,a=e.target.files[t];if(a.size<=1073741824){a.inQueue=!0,ee(a).then(e=>{a.view=e,F(e=>[...e,a])}).catch(e=>{console.error(`FileReader failed on file ${a.name}.`)});const e=E.length-1;ie({index:e,file:a})}}})(e),L(e=>Object.assign({},e,{[t]:a})),y(t,a),await A(e.target.name)}
1,ae=(0,o.wA)(),se=async e=>{R(t=>{const a=Object.assign({},t);return delete a[e],a})};(0,i.useEffect)(()=>{(0,N.eG)();(async()=>{B(!0);try{const e=await z((0,f.uB)(Y)),{data:t}=e.data;if(L(Object.assign({},e.data.data)),I(e.data.data.files),V(0!==e.data.data.image_needed&&null!==e.data.data.image_needed),Object.keys(e.data.data).forEach(t=>{t in J&&y(t,e.data.data[t],{shouldDirty:!0})}),ae((0,j._W)({jobSelected:t.profession,isrealperson:t.is_real_person,professionid:t.profession_id,pageActive:[]})),t){const e=await z((0,f.cf)(Y));ae((0,j.Zv)({stepsCompleted:e.data.data[0]})),B(!1)}}catch(e){console.error(e),B(!1)}})()},[]);const{mutate:ne,isPending:le}=(0,_.U)(f.X6,{onSuccess:async e=>{(0,w.s)("client","position.job-details.set",Z,Y),K((0,r.sM)("/details","/who"))},onError(e){console.error(e),R(e)}},Y),{mutate:ie}=(0,_.U)(f.Kj,{onSuccess:async e=>{(0,w.s)("client","position.job_details.attachment.set",Z,Y),F([]),I(e.data.data)},catch(e){console.error(e)}},Y),{mutate:re}=(0,_.U)(f.eA,{onSuccess:()=>{const e=[...D],t=e.findIndex(e=>e.id===H);-1!==t&&(e.splice(t,1),I(e))}});return(0,c.jsxs)("div",{className:"cast-talent-content cast-talent-details",children:[(0,c.jsx)("div",{className:"cast-talent-form-content",children:(0,c.jsx)("div",{className:"preloader-wrapper",children:(0,c.jsxs)("form",{onSubmit:d(e=>{var t;const a={payment_type:"credit_card",payment_term:null,hours_per_day:"",production_dates:"",profession_id:W,id:Y,is_real_person:Q,open_to_applicants:null!=(t=J.open_to_applicants)?t:[],is_image_needed:!1===G?0:1,image_requirement:G?e.image_requirement:"",files:null!=D?D:[],skipProductionDates:!0,skipHoursPerDay:!0};ne(Object.assign({},e,a))}),className:"trf-job-post-form",children:[(0,c.jsxs)(C.A,{loading:U||le,children:[(0,c.jsxs)("div",{className:"cast-talent-form-content__block-about",children:[(0,c.jsx)(h.A,{level:2,children:"Tell us about the job"}),(0,c.jsx)("p",{className:"description",children:"Describe what the job entails. The more details, the better applicants you'll receive!"}),(0,c.jsxs)("div",{className:"cast-talent-form-content__box box_title",children:[(0,c.jsx)("label",{children:"What's the headline of your job?"}),(0,c.jsx)(p.p,Object.assign({},m("title",{required:"Please enter a headline for your job",pattern:{value:r.UB,message:"Please avoid entering personal information."}}),{name:"title",value:J.title,id:"title",onFocus:()=>se("title"),onChange:te,placeholder:"E.g. Mummy influencer with kids under 5 for Instagram promotion",className:""})),$.title&&(0,c.jsx)("div",{className:"error-message ",children:null==(e=$.title)?void 0:e.message}),M&&(0,c.jsx)(x.A,{errorField:"title",errors:M})]}),(0,c.jsxs)("div",{className:"cast-talent-form-content__box box_desctiption",children:[(0,c.jsx)("label",{children:"Tell us about the campaign, or let the influencer know what you'd like them to do?"}),(0,c.jsx)("textarea",Object.assign({value:J.brief,placeholder:"Tell us a little bit about the brand, the project or shoot, and background information that might help the talent write a good application for the job"},m("brief",{required:"Please enter a description about the job",pattern:{value:r.UB,message:"Please avoid entering personal information."}}),{onFocus:()=>se("brief"),onChange:te})),$.brief&&(0,c.jsx)("div",{className:"error-message ",children:null==(t=$.brief)?void 0:t.message}),M&&(0,c.jsx)(x.A,{errorField:"brief",errors:M})]}),(0,c.jsxs)("div",{className:"cast-talent-form-content__img-add",children:[(0,c.jsx)(h.A,{level:3,children:"Add a photo or reference media to help you get the right applicants!"}),(0,c.jsxs)("div",{className:"cast-talent-form-content__img-box",children:[E.length>0&&E.map((e,t)=>(0,c.jsxs)("div",{className:"cast-talent-form-content__img-add-box",children:[(0,r.wu)(e)&&(0,c.jsx)("img",{src:e.view?String(e.view):"",alt:"img"}),!(0,r.wu)(e)&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"file-block",children:[e.name.substring(0,10),"..."]}),(0,c.jsxs)("div",{className:"file-title",children:[e.name.substring(0,10),"..."]})]})]})),D.length>0&&D.map((e,t)=>(0,c.jsxs)("div",{className:"cast-talent-form-content__img-add-box",children:[(0,c.jsx)("button",{type:"button",onClick:()=>(e=>
1{H=e.id,re({id:Y,file:e})})(e),children:"x"}),(0,r.wu)(e)&&(0,c.jsx)("img",{src:e.url?String(e.url):"",alt:"img"}),!(0,r.wu)(e)&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"file-block",children:[e.name.substring(0,10),"..."]}),(0,c.jsxs)("div",{className:"file-title",children:[e.name.substring(0,10),"..."]})]})]})),D.length<5&&(0,c.jsx)("div",{className:"cast-talent-form-content__label-wrapp",children:(0,c.jsx)("label",{onClick:()=>{T.current&&T.current.click()},children:(0,c.jsx)("i",{className:"fa fa-paperclip"})})}),(0,c.jsx)("input",Object.assign({id:"photoUser"},m("files",{required:!1}),{type:"file",ref:T,accept:".xlsx, .xls, image/x-png,image/jpeg, .doc, .docx, .txt, .pdf, .csv",onChange:te}))]})]}),(0,c.jsx)("p",{className:"max-file-size-msg",children:"Max file size 1GB, for each item, jobs with photos, mood boards or scripts tend to get higher applications"})]}),(0,c.jsxs)("div",{className:"cast-talent-form-content__block-where",children:[(0,c.jsx)(h.A,{level:2,children:"Where would you like to receive applications from?"}),(0,c.jsx)("p",{children:"Choose from what parts of the world candidates can apply from to the job posting"}),(0,c.jsxs)("div",{className:"cast-talent-form-content__box cast-talent-form-content__box_select",children:[(0,c.jsx)("label",{children:"Location(s)"}),(0,c.jsx)(u.Ay,Object.assign({},m("open_to_applicants",{required:"Please select location"}),{options:P,className:"trf-react-select-container trf-react-select-single-container trf-react-select-rounded",classNamePrefix:"trf-react-select",isMulti:!0,placeholder:"Select location",menuPlacement:"auto",value:(()=>{var e;const t=null!=(e=J.open_to_applicants)?e:[];return(0,g.filter)(P,e=>(0,g.includes)(t,e.label))})(),isOptionDisabled:e=>J.open_to_applicants.includes("Global")&&"Global"!==e.label,onChange:e=>{(e=>{k("open_to_applicants",{}),e.some(e=>"Global"===e.label)?(L(e=>Object.assign({},e,{open_to_applicants:["Global"]})),y("open_to_applicants",["Global"])):(L(t=>Object.assign({},t,{open_to_applicants:(0,g.map)(e,"label")})),y("open_to_applicants",(0,g.map)(e,"label")))})(e)}})),(0,c.jsx)("p",{children:"You can select multiple locations if needed"}),(null==(a=$.open_to_applicants)?void 0:a.message)&&(0,c.jsx)("div",{className:"error-message",ref:X,children:null==(n=$.open_to_applicants)?void 0:n.message})]})]}),(0,c.jsxs)("div",{className:"cast-talent-form-content__block-additional",children:[(0,c.jsx)(h.A,{level:2,children:"Should applicants attach additional media?"}),(0,c.jsx)("p",{children:"All talent have a range of photos available on their profile, as well as links to view their instagram images."}),(0,c.jsx)("label",{children:"Should talent provide additional materials on application ?"}),(0,c.jsxs)("div",{className:"cast-talent-form-content__box cast-talent-form-content__box_row",children:[(0,c.jsx)("div",{className:"cast-talent-form-content__checkbox-wrapp",children:(0,c.jsxs)("label",{children:[(0,c.jsx)("input",{type:"radio",onChange:()=>V(!1),value:"0",checked:!G,id:"checkNo",name:"portfolioOption"}),(0,c.jsx)("span",{children:(0,c.jsx)("img",{src:`${q}/images/cast-talent-form/check-1.svg`,alt:"User"})}),"No, their portfolio on theright.fit is enough for now"]})}),(0,c.jsx)("div",{className:"cast-talent-form-content__checkbox-wrapp",children:(0,c.jsxs)("label",{children:[(0,c.jsx)("input",{type:"radio",onChange:()=>V(!0),value:"1",checked:G,id:"checkYes",name:"portfolioOption"}),(0,c.jsx)("span",{children:(0,c.jsx)("img",{src:"assets/images/cast-talent-form/check-1.svg",alt:"User"})}),"Yes"]})})]}),G&&(0,c.jsxs)("div",{className:"cast-talent-form-content__box",children:[(0,c.jsx)("label",{children:"Describe the specific photo or video casting you need from each applicant"}),(0,c.jsx)("textarea",Object.assign({placeholder:"E.g. Please upload a photo of you with your dog, clearly showing the dogs current size"},m("image_requirement",{required:"Please fill this field.",pattern:{value:r.UB,message:"Please avoid entering personal information."}}))),$.image_requirement&&(0,c.jsx)("div",{className:"error-message ",children:null==(l=$.image_requirement)?void 0:l.message}),M&&(0,c.jsx)(x.A,{errorField:"hours_per_day",errors:M})]})]})]}),(0,c.jsx)("div",{className:"cast-talent-form-content__box-btn d-flex justify-content-end",children:(0,c.jsx)("button",{className:"cast-talent-form-content__save",type:"submit",disabled:U||le,onClick:()=>{X.current&&X.current.scrollIntoView({behavior:"smooth",block:"start"})},children:"save & continue"})})]})})}),(0,c.jsxs)("div",{className:"cast-talent-content__wrapper",children:[(0,c.jsx)(S.A,{}),(0,c.jsx)(O.A,{})]})]})};var E=a(28454),F=a(68089);const D=()=>{const e=l.c.CDN_PATH;return(0,c.jsx)("div",{className:"cast-talent-content__wrapper",children:(0,c.jsxs)("div",{className:"cast-talent-tips",children:[(0,c.jsxs)("div",{className:"cast-talent-tips__title",children:[(0,c.jsx)("h3",{children:"Tips"}),(0,c.jsx)("div",{className:"cast-talent-tips__img-wrapp",children:(0,c.jsx)("img",{src:e+"/images/cast-talent-form/lamp.svg",alt:"lamp"})})]}),(0,c.jsxs)("div",{className:"cast-talent-tips__text",children:[(0,c.jsx)("img",{src:e+"/images/cast-talent-form/round.svg",alt:"round"}),(0,c.jsx)("span",{children:"Influencers are paid \u2018per post\u2019 and \u2018per story\u2019, and they can quote you specifically for the deliverables you need."})]}),(0,c.jsxs)("div",{className:"cast-talent-tips__text",children:[(0,c.jsx)("img",{src:e+"/images/cast-talent-form/round.svg",alt:"round"}),(0,c.jsx)("span",{children:"Unsure of costs? Post your job and let the influencers pitch to you with their offering and rates. You can negotiate directly in the live chat here."})]}),(0,c.jsxs)("div",{className:"cast-talent-tips__text",children:[(0,c.jsx)("img",{src:e+"/images/cast-talent-form/round.svg",alt:"round"}),(0,c.jsx)("span",{children:"theright.fit charges a 20% fee on bookings, only when the job is successfully completed. Our safe escrow payment means you only pay when the job is complete."})]})]})})},I=[{label:"Instagram Post",value:"INSTAGRAM_POST"},{label:"Instagram Story",value:"INSTAGRAM_STORY"},{label:"Instagram Reels",value:"IG_REELS"},{label:"YouTube Video",value:"YOUTUBE_VIDEO"},{label:"Facebook Post",value:"FACEBOOK_POST"},{label:"Tiktok Video",value:"TIKTOK_VIDEO"},{label:"Snapchat Story",value:"SNAPCHAT_STORY"},{label:"Blog Post",value:"BLOG_POST"},{label:"LinkedIn Post",value:"LINKEDIN_POST"}],M=[{value:"0",label:"Payable on Receipt"},{value:"7",label:"7 Days"},{value:"14",label:"14 Days"},{value:"30",label:"30 Days"}],R=[{name:"nano",value:"1",label:"Nano",followers:"Under 10K followers",budget:"$95 - $300"},{name:"Micro",value:"2",label:"Micro",followers:"10K - 30K followers",budget:"$3
100 - $600"},{name:"Mid-tier",value:"3",label:"Mid-tier",followers:"30K - 100K followers",budget:"$600 - $800"},{name:"Macro",value:"4",label:"Macro",followers:"100K - 200K followers",budget:"$800 - $1200"},{name:"Celebrity",value:"5",label:"Celebrity",followers:"200K+ followers",budget:"$95 - $300"},{name:"select-all",value:"6",label:"I am open to any influencer",followers:"",budget:""}],J=()=>{var e,t,a,n,d;const p=l.c.CDN_PATH,_=(0,o.d4)(e=>e.userDetail.data),{handleSubmit:g,register:y,watch:A,setValue:k,formState:{errors:$},setError:S,control:O,getValues:q}=(0,v.mN)({mode:"onChange"}),{fetchData:P}=(0,b.A)(),[T,J]=(0,i.useState)(!1),L=(0,s.Zp)(),{id:Z}=(0,s.g)(),U=(0,o.wA)(),[B,G]=(0,i.useState)({positionApproved:!1,loading:!1}),[V,z]=(0,i.useState)();(0,i.useEffect)(()=>{(0,N.eG)();(async()=>{const e=await P((0,f.cf)(Z));U((0,j.Zv)({stepsCompleted:e.data.data[0]}))})(),(async()=>{J(!0);try{const e=await(0,f.NO)(Z);if((e=>{if(Object.keys(e).forEach(t=>{k("rate_type_ids"===t?"rate_type_ids":"additional_info"===t?"additional_info":t,e[t])}),e.deliverables.length>0)e.deliverables.forEach((e,t)=>{k(`deliverables.${t}.deliverable`,e.deliverable),k(`deliverables.${t}.quantity`,e.quantity)});else{const e=0;k(`deliverables.${e}.deliverable`,""),k(`deliverables.${e}.quantity`,"")}})(e.data),e){const e=await P((0,f.cf)(Z));G(Object.assign({},B,{loading:T,positionApproved:null!==e.data.data.approved_at})),U((0,j.Zv)({stepsCompleted:e.data.data[0]})),J(!1)}}catch(e){console.error("Error fetching data:",e)}finally{J(!1)}})()},[]);const{mutate:K,isPending:Y}=(0,E.n)({mutationFn:e=>(0,F.N)(Z,e),onSuccess:()=>{(0,w.s)("client","position.job-budget.set",_,Z);const e=window.location.pathname.replace("/budget","/preview");L(e)},onError(e){z(e)}}),{mutate:H,isPending:W}=(0,E.n)({mutationFn:e=>(0,f.df)(Z,e),onSuccess:()=>{L("/projects")}}),Q=(0,i.useRef)(null),{fields:X,append:ee,remove:te}=(0,v.jz)({control:O,name:"deliverables"}),ae=e=>{const t=new Set;for(const a of ne.deliverables){if(t.has(a.deliverable))return"Plateform should be unique";t.add(a.deliverable)}return!0},se=e=>{z(t=>{const a=Object.assign({},t);return delete a[e],a})},ne=A();return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(m,Object.assign({},B,{saveAndExit:()=>{H(Object.assign({},q(),{step:4}))}})),(0,c.jsxs)("div",{className:"cast-talent-content cast-influencers-budget",children:[(0,c.jsx)("div",{className:"cast-talent-form-content",children:(0,c.jsx)("div",{className:"preloader-wrapper",children:(0,c.jsxs)("form",{onSubmit:g(e=>{0===Object.keys($).length&&K(e)}),className:"trf-job-post-form",children:[(0,c.jsx)(C.A,{loading:T||Y||W,children:(0,c.jsx)("div",{className:"cast-talent-form-content__container",children:(0,c.jsxs)("div",{className:"cast-talent-form-content__block-about",children:[(0,c.jsx)(h.A,{level:2,children:"I\u2019d like to receive quotes from:"}),(0,c.jsx)("p",{className:"description mt-4",children:"Select the type of influencers you would like to receive quotes from. You can select as many options as best suits your budget and job."}),$.rate_type_ids&&!Q.current&&(0,c.jsx)("div",{ref:e=>{$.rate_type_ids&&!Q.current&&(Q.current=e)}}),(0,c.jsxs)("ul",{className:"cast-talent-form-content__budget-list",children:[(0,c.jsxs)("li",{children:[(0,c.jsx)("h4",{children:"Influencer Type"}),(0,c.jsx)("h4",{children:"Followers per account"}),(0,c.jsx)("h4",{children:"Ballpark rate per post"})]}),(()=>{const e=[];for(let t=0;t<R.length;t++)e.push((0,c.jsxs)("li",{children:[(0,c.jsx)("div",{className:"cast-talent-form-content__checkbox-wrapp "+("6"===R[t].value?"width-100":""),children:(0,c.jsxs)("label",{htmlFor:`${R[t].name}`,children:[(0,c.jsx)("input",Object.assign({type:"checkbox",id:R[t].name,value:R[t].value},y("rate_type_ids",{required:"Please choose atleast one option"}),{onChange:e=>{const t=q("rate_type_ids"),a=e.target.value,s=e.target.checked;if("6"===a)k("rate_type_ids",s?[a]:[]);else{const e=t.filter(e=>"6"!==e);if(s)e.push(a);else{const t=e.indexOf(a);-1!==t&&e.splice(t,1)}k("rate_type_ids",e)}},disabled:"6"!==R[t].value&&ne&&ne.rate_type_ids&&ne.rate_type_ids.includes("6")})),(0,c.jsx)("span",{className:"6"!=R[t].value&&ne&&ne.rate_type_ids&&null!=ne&&ne.rate_type_ids.includes("6")?"disabled":"",children:(0,c.jsx)("img",{src:`${p}/images/cast-talent-form/check-1.svg`,alt:"User"})}),R[t].label]})}),"6"!=R[t].value&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("p",{children:R[t].followers}),(0,c.jsx)("p",{children:R[t].budget})]})]},t));return(0,c.jsx)(c.Fragment,{children:e})})()]}),$.rate_type_ids&&(0,c.jsx)("div",{className:"error-message mb-4",children:null==(e=$.rate_type_ids)?void 0:e.message}),(0,c.jsx)(h.A,{level:2,children:"I\u2019d like to receive quotes for:"}),(0,c.jsx)("ul",{className:" cast-talent-form-content__box cast-talent-form-content__box_social ",children:X.map((e,t)=>{var a,s,n,l,i,r;return(0,c.jsxs)("li",{children:[$.deliverables&&$.deliverables[t]&&(null==(a=$.deliverables[t])?void 0:a.deliverable)&&!Q.current&&(0,c.jsx)("div",{ref:e=>{var a;$.deliverables&&$.deliverables[t]&&null!=(a=$.deliverables[t])&&a.deliverable&&!Q.current&&(Q.current=e)}}),(0,c.jsxs)("div",{className:" cast-talent-form-content__items-container cast-talent-form-content__box_select ",children:[(0,c.jsx)("label",{children:"Platform"}),(0,c.jsx)(u.Ay,Object.assign({},y(`deliverables.${t}.deliverable`,{required:"Platform is required",validate:ae}),{className:"trf-react-select-container trf-react-select-single-container trf-react-select-rounded",classNamePrefix:"trf-react-select",options:I,isMulti:!1,onChange:(e,a)=>((e,t,a)=>{S(`deliverables.${a}.deliverable`,{});const s=null!=e&&e.value?e.value:"";k(`deliverables.${a}.deliverable`,s)})(e,0,t),defaultValue:I.filter(function(e){return e.value===ne.deliverables[t].deliverable})})),$.deliverables&&$.deliverables[t]&&(null==(s=$.deliverables[t])?void 0:s.deliverable)&&(0,c.jsx)("div",{className:"error-message",children:null==(n=$.deliverables[t])||null==(n=n.deliverable)?void 0:n.message})]}),(0,c.jsxs)("div",{className:"cast-talent-form-content__items-container",children:[$.deliverables&&$.deliverables[t]&&(null==(l=$.deliverables[t])?void 0:l.quantity)&&!Q.current&&(0,c.jsx)("div",{ref:e=>{var a;$.deliverables&&$.deliverables[t]&&null!=(a=$.deliverables[t])&&a.quantity&&!Q.current&&(Q.current=e)}}),(0,c.jsxs)("div",{className:" cast-talent-form-content__items d-flex justify-content-end align-items-center ",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{children:"Quantity"}),(0,c.jsx)("input",Object.assign({type:"text"},y(`deliverables.${t}.quantity`,{required:"Quantity is required",pattern:{value:/^[0-9]*$/,message:"Please enter a positive number"},min:{value:1,message:"Quantity must be at least 1."}}))),$.deliverables&&$.deliverables[t]&&(null==(i=$.deliverables[t])?void 0:i.quantity)&&(0,c.jsx)("div",{className:"error-message",children:null==(r=$.deliverables[t])||null==(r=r.quantity)?void 0:r.message})]}),t>
10&&(0,c.jsx)("i",{className:"fa fa-trash",onClick:()=>te(t)})]})]})]},e.id)})}),X.length<=9&&(0,c.jsx)("button",{className:"cast-talent-form-content__add-btn",type:"button",onClick:()=>ee({deliverable:"",quantity:""}),children:"+ Add More"}),(0,c.jsxs)("div",{className:"cast-talent-form-content__box box_desctiption",children:[(0,c.jsx)("label",{children:"Mentions & Hash Tags"}),(0,c.jsx)("textarea",Object.assign({onFocus:()=>se("hash_tags")},y("hash_tags",{pattern:{value:r.UB,message:"Please avoid entering personal information."}}),{name:"hash_tags",placeholder:" Any additional info to help the influencers quotes correctly?"})),$.hash_tags&&(0,c.jsx)("div",{className:"error-message mt-2",children:null==(t=$.hash_tags)?void 0:t.message}),V&&(0,c.jsx)(x.A,{errorField:"hash_tags",errors:V})]}),(0,c.jsxs)("div",{className:"cast-talent-form-content__box box_desctiption",children:[(0,c.jsx)("label",{children:"Additional Info"}),(0,c.jsx)("textarea",Object.assign({onFocus:()=>se("additional_info")},y("additional_info",{pattern:{value:r.UB,message:"Please avoid entering personal information."}}),{name:"additional_info",placeholder:"List the brand instagram handle and campaign hashtags"})),(0,c.jsx)("span",{className:"placehoder",children:"This will only be displayed to the talent you book on the job"}),$.additional_info&&(0,c.jsx)("div",{className:"error-message mt-2",children:null==(a=$.additional_info)?void 0:a.message}),V&&(0,c.jsx)(x.A,{errorField:"additional_info",errors:V})]}),_.is_invoice_allowed&&(0,c.jsxs)("div",{children:[$.payment_type&&!Q.current&&(0,c.jsx)("div",{ref:e=>{$.payment_type&&!Q.current&&(Q.current=e)}}),(0,c.jsxs)("div",{className:"cast-talent-form-content__payment",children:[(0,c.jsx)("h3",{children:"Payment Type"}),(0,c.jsxs)("div",{className:"cast-talent-form-content__checkbox mb-0",children:[(0,c.jsxs)("label",{htmlFor:"payment-credit-card",children:[(0,c.jsx)("input",Object.assign({},y("payment_type",{required:"Payment Type is required"}),{name:"payment_type",type:"radio",id:"payment-credit-card",value:"credit_card"})),(0,c.jsx)("span",{children:(0,c.jsx)("i",{className:"fas fa-circle"})}),"Credit card"]}),(0,c.jsxs)("label",{htmlFor:"payment-invoice",children:[(0,c.jsx)("input",Object.assign({},y("payment_type",{required:"Payment Type is required"}),{name:"payment_type",type:"radio",id:"payment-invoice",value:"invoice"})),(0,c.jsx)("span",{children:(0,c.jsx)("i",{className:"fas fa-circle"})})," ","Invoice"]})]}),$.payment_type&&(0,c.jsx)("div",{className:"error-message mt-2",children:null==(n=$.payment_type)?void 0:n.message})]}),ne&&"invoice"===ne.payment_type&&(0,c.jsxs)(c.Fragment,{children:[$.payment_term&&!Q.current&&(0,c.jsx)("div",{ref:e=>{$.payment_term&&!Q.current&&(Q.current=e)}}),(0,c.jsxs)("div",{className:"cast-talent-form-content__payment",children:[(0,c.jsxs)("div",{className:"cast-talent-form-content__items-container cast-talent-form-content__box_select",children:[(0,c.jsx)("label",{children:"Payment Term"}),(0,c.jsxs)("div",{className:"form-group",children:[(0,c.jsx)(u.Ay,Object.assign({},y("payment_term",{required:"Payment Term is required"}),{options:M,isMulti:!1,className:"trf-react-select-container trf-react-select-single-container trf-react-select-rounded",classNamePrefix:"trf-react-select",onChange:(e,t)=>
1{S("payment_term",{});const a=null!=e&&e.value?e.value:"";k("payment_term",a)},value:M.find(e=>{var t;return e.value===(null==(t=ne.payment_term)?void 0:t.toString())})})),(0,c.jsx)("p",{className:"mb-0",children:"Let talent know the payment terms for this job, e.g. 30 days"}),$.payment_term&&(0,c.jsx)("div",{className:"error-message mt-2",children:null==(d=$.payment_term)?void 0:d.message})]})]}),(0,c.jsx)("p",{className:"error-message error"})]})]})]})]})})}),(0,c.jsxs)("div",{className:"cast-talent-form-content__box-btn",children:[(0,c.jsx)("button",{className:"cast-talent-form-content__back",onClick:()=>L((0,r.sM)("/budget","/who")),type:"button",children:"back"}),(0,c.jsx)("button",{className:"cast-talent-form-content__save",type:"submit",onClick:()=>{setTimeout(()=>{Q.current&&Q.current.scrollIntoView({behavior:"smooth",block:"start"})},100),Q.current=null},children:"save & continue"})]})]})})}),(0,c.jsx)("div",{className:"cast-talent-content__wrapper",children:(0,c.jsx)(D,{})})]})]})},L=[{label:"Instagram Post",value:"INSTAGRAM_POST"},{label:"Instagram Story",value:"INSTAGRAM_STORY"},{label:"Instagram Reels",value:"IG_REELS"},{label:"YouTube Video",value:"YOUTUBE_VIDEO"},{label:"Facebook Post",value:"FACEBOOK_POST"},{label:"Tiktok Video",value:"TIKTOK_VIDEO"},{label:"Snapchat Story",value:"SNAPCHAT_STORY"},{label:"Blog Post",value:"BLOG_POST"},{label:"LinkedIn Post",value:"LINKEDIN_POST"}],Z=()=>{const e=(0,o.d4)(e=>e.userDetail.data),[t,a]=(0,i.useState)(!1),[n,l]=(0,i.useState)(),[d,m]=(0,i.useState)(),u=(0,o.wA)(),h=(0,s.Zp)(),{id:p}=(0,s.g)(),{fetchData:_}=(0,b.A)();(0,i.useEffect)(()=>{(async()=>{a(!0);try{const t=await(0,f.YT)(p);(0,w.s)("client","position.job-preview.shown",e,p);const a=t.data;l(a)}catch(t){console.error("Error fetching data:",t)}finally{a(!1)}})(),(async()=>{const e=await _((0,f.cf)(p));u((0,j.Zv)({stepsCompleted:e.data.data[0]}))})()},[]);const{mutate:v,isPending:x}=(0,E.n)({mutationFn:()=>(0,f.Dc)(p),onError:e=>{m(e),console.log(d)},onSuccess:()=>{(0,w.s)("client","position.submitted-for-approval",e,p,null==n?void 0:n.raw_budget);const t=window.location.pathname.replace("/preview","/submitted");h(t)}}),y=()=>{v()},N=()=>{const e=window.location.pathname.replace("/preview","/details");h(e)},A=n&&n.attributes.reduce((e,t)=>(e[t.display_name]||(e[t.display_name]=[]),e[t.display_name].push(t.value),e),{}),k=()=>{h("/projects")};return(0,c.jsx)("div",{className:"cast-talent-content talent-preview-form",children:(0,c.jsx)("div",{className:"cast-talent-form-content",children:(0,c.jsxs)("div",{className:"preloader-wrapper",children:[n&&(0,c.jsxs)("div",{className:"cast-talent-form-content__box-btn top",children:[(0,c.jsx)("button",{className:"cast-talent-form-content__back",onClick:N,type:"button",children:"Edit Job"}),n&&!n.submitted_at||n&&!(0,g.isEmpty)(n.declined_at)&&(0,c.jsx)("button",{className:"cast-talent-form-content__save",type:"submit",disabled:t||x,onClick:y,children:"Submit for approval"}),n&&n.submitted_at&&(0,g.isEmpty)(n.declined_at)&&(0,c.jsx)("button",{className:"cast-talent-form-content__save",type:"submit",onClick:k,children:"Done"})]}),(0,c.jsx)(C.A,{loading:t||x,children:n&&(0,c.jsxs)("div",{className:"cast-talent-form-content__container",children:[(0,c.jsx)("h2",{children:"Preview"}),(0,c.jsx)("p",{children:"You can still go back and fine tune anything you\u2019ve missed. Once you\u2019re happy with everything, hit the \u2018Submit\u2019 button!"}),(0,c.jsx)("h3",{children:null==n?void 0:n.title}),(0,c.jsxs)("div",{className:"cast-talent-form-content__details",children:[(0,c.jsx)("label",{children:"Job Details"}),(()=>{const e=n&&n.brief?n.brief.split("\n"):null;return e?(0,c.jsx)("div",{children:e.map((e,t)=>(0,c.jsxs)(i.Fragment,{children:[e,(0,c.jsx)("br",{})]},t))}):null})(),(0,c.jsx)("label",{children:"Ideal Candidate"}),(0,c.jsx)("p",{children:null==n?void 0:n.ideal_candidate}),n.image_requirement&&(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{children:"Additional Materials"}),(0,c.jsx)("p",{children:n.image_requirement})]}),(0,c.jsxs)("div",{className:"mb-4",children:[(0,c.jsxs)("div",{className:"row",children:[(0,c.jsx)("div",{className:"col-6",children:(0,c.jsx)("label",{children:"Age"})}),(0,c.jsx)("div",{className:"col-6",children:(0,c.jsx)("label",{children:"Gender"})})]}),(0,c.jsxs)("div",{className:"row",children:[(0,c.jsx)("div",{className:"col-6",children:(0,c.jsx)("span",{children:n.age})}),(0,c.jsx)("div",{className:"col-6",children:(0,c.jsx)("span",{children:(0,r.VI)(n,"gender").join(", ")})})]})]}),(0,c.jsxs)("div",{className:"mb-4",children:[(0,c.jsxs)("div",{className:"row",children:[(0,c.jsx)("div",{className:"col-6",children:(0,c.jsx)("label",{children:"Budget"})}),(0,c.jsx)("div",{className:"col-6",children:(0,c.jsx)("label",{children:"Location"})})]}),(0,c.jsxs)("div",{className:"row",children:[(0,c.jsx)("div",{className:"col-6",children:(0,c.jsx)("span",{children:n.rate_types_for_display&&n.rate_types_for_display.length>0&&n.rate_types_for_display.map(e=>null!==e.displayText?`${e.name}: ${e.displayText}`:e.name).join(", ")})}),(0,c.jsx)("div",{className:"col-6",children:(0,c.jsx)("span",{children:n.open_to_applicants&&n.open_to_applicants.join(", ")})})]})]}),(0,c.jsxs)("div",{className:"mb-4",children:[(0,c.jsxs)("div",{className:"row",children:[(0,c.jsx)("div",{className:"col-6",children:(0,c.jsx)("label",{children:"Deliverables"})}),(0,c.jsx)("div",{className:"col-6",children:(0,c.jsx)("label",{children:"Minimum followers"})})]}),(0,c.jsxs)("div",{className:"row",children:[(0,c.jsx)("div",{className:"col-6",children:n.deliverables.map((e,t)=>{const a=L.find(t=>t.value===e.deliverable);return(0,c.jsx)("p",{className:"no-margin m-0",children:(0,c.jsxs)("span",{children:[a?a.label:e.deliverable," -"," ",(0,r.X9)(e.quantity)]})},t)})}),(0,c.jsx)("div",{className:"col-6",children:n.platform_requirements.map((e,t)=>(0,c.jsx)("p",{className:"no-margin m-0",children:(0,c.jsxs)("span",{children:[e.platform," - ",(0,r.X9)(e.min_followers),t+1<n.platform_requirements.length&&", Or"]})},t))})]})]}),(null==n?void 0:n.hash_tags)&&(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{children:"Mentions & Hash Tags"}),(0,c.jsx)("p",{children:null==n?void 0:n.hash_tags})]}),(null==n?void 0:n.additional_info)&&(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{children:"Additional Info"}),(0,c.jsx)("p",{children:null==n?void 0:n.additional_info})]}),"invoice"===(null==n?void 0:n.payment_type)&&(0,c.jsxs)("div",{className:"mb-4",children:[(0,c.jsx)("div",{className:"row",children:(0,c.jsx)("div",{className:"col-6",children:(0,c.jsx)("label",{children:"Payment Type"})})}),(0,c.jsx)("div",{className:"row",children:(0,c.jsx)("div",{className:"col-6",children:(0,c.jsx)("span",{children:0===(null==n?void 0:n.payment_term)?(0,c.jsx)("span",{children:"Invoiced - Payable on Receipt"}):(0,c.jsxs)("span",{children:["Invoiced - Payment in ",null==n?void 0:n.payment_term," days"]})})})})]}),n.attributes.length>0&&(0,c.jsxs)("div",{className:"mb-4",children:[(0,c.jsx)("div",{className:"row",children:(0,c.jsx)("div",{className:"col-12",children:(0,c.jsx)("label",{children:"Attributes"})})}),Object.entries(A).map(([e,t])=>(0,c.jsxs)("div",{className:"row",children:[(0,c.jsxs)("div",{className:"col-6",children:[(0,c.jsx)("span",{children:e})," "]}),(0,c.jsxs)("div",{className:"col-6",children:[(0,c.jsx)("span",{children:t.join(", ")})," "]})]},e))]}),n.usage.usage.length>0&&(0,c.jsx)("label",{children:"Usage Type"}),(0,c.jsx)("ul",{className:"cast-talent-form-content__tags",children:n.usage.usage.map(e=>(0,c.jsx)("li",{children:e},e))}),(0,c.jsxs)("div",{className:"cast-talent-form-content__answers",children:[n.usage.usage_timeframe&&(0,c.jsxs)("div",{className:"cast-talent-form-content__answers-box",children:[(0,c.jsx)("label",{children:"How long will the content be used for?"}),(0,c.jsx)("p",{children:n.usage.usage_timeframe})]}),n.usage.usage_location&&(0,c.jsxs)("div",{className:"cast-talent-form-content__answers-box cast-talent-form-content__answers-box_right",children:[(0,c.jsx)("label",{children:"Which countries will content be used in?"}),(0,c.jsx)("p",{children:n.usage.usage_location})]})]}),(0,c.jsx)("div",{className:"cast-talent-form-content__img-box row",children:n.files.map(e=>(0,c.jsxs)("div",{className:"file-container",children:[(0,c.jsxs)("a",{href:e.url,target:"_blank",rel:"noreferrer",children:[(0,r.wu)(e)&&(0,c.jsx)("img",{src:e.url,alt:""}),!(0,r.wu)(e)&&(0,c.jsxs)("div",{className:"file-block",children:[e.name.substring(0,10),"..."]})]}),(0,c.jsx)("div",{className:"file-title",children:e.name})]},e.url))}),n.image_requirement&&(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{children:"Describe the specific photo or video casting you need from each applicant"}),(0,c.jsx)("p",{children:n.image_requirement})]})]})]})}),n&&(0,c.jsxs)("div",{className:"cast-talent-form-content__box-btn",children:[(0,c.jsx)("button",{className:"cast-talent-form-content__back",onClick:N,type:"button",children:"Edit Job"}),n&&!n.submitted_at&&(0,c.jsx)("button",{className:"cast-talent-form-content__save",type:"submit",disabled:t||x,onClick:y,children:"Submit for approval"}),n&&n.submitted_at&&(0,c.jsx)("button",{className:"cast-talent-form-content__save",type:"submit",onClick:k,children:"Done"})]})]})})})},U=()=>{const e={positionApproved:!0,loading:!1},{page:t}=(0,s.g)();return(0,c.jsxs)("div",{className:"cast-talent-form_container",children:["details"===t&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(m,Object.assign({},e)),(0,c.jsx)(T,{})]}),"who"===t&&(0,c.jsx)($,{}),"budget"===t&&(0,c.jsx)(J,{}),"preview"===t&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(m,Object.assign({},e)),(0,c.jsx)(Z,{})]}),"submitted"===t&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(m,Object.assign({},e)),(0,c.jsx)(n.A,{})]})]})}},86984(e,t,a){a.d(t,{A:()=>y});var s=a(96540),n=a(3433),l=a(71468),i=a(2543),r=a(40364),o=a(4589),
1c=a(35241),d=a(74848);const m=({talents:e,position_id:t})=>{const a=(0,s.useRef)(null),n={position_id:t,details:"",invite_from:"talent-recommendations"},l=()=>{a.current&&a.current.slickNext()},i=()=>{a.current&&a.current.slickPrev()},r=({onClick:e})=>(0,d.jsx)("div",{className:"prev-arrow slick-arrow ",onClick:i,children:(0,d.jsx)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M31.469 10.6434C32.2182 11.4551 32.1676 12.7204 31.356 13.4696L19.9481 24L31.356 34.5304C32.1676 35.2796 32.2182 36.5449 31.469 37.3566C30.7198 38.1682 29.4545 38.2188 28.6429 37.4696L14.0508 24L28.6429 10.5304C29.4545 9.7812 30.7198 9.83181 31.469 10.6434Z",fill:"#222222"})})}),m=({onClick:e})=>(0,d.jsx)("div",{className:"next-arrow slick-arrow ",onClick:l,children:(0,d.jsx)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.5304 10.6434C16.2796 9.83181 17.5449 9.7812 18.3566 10.5304L32.9486 24L18.3566 37.4696C17.5449 38.2188 16.2796 38.1682 15.5304 37.3566C14.7812 36.5449 14.8318 35.2796 15.6434 34.5304L27.0514 24L15.6435 13.4696C14.8318 12.7204 14.7812 11.4551 15.5304 10.6434Z",fill:"#222222"})})}),u={mobileFirst:!0,slidesToShow:3,slidesToScroll:1,infinite:!1,dots:!0,adaptiveHeight:!0,arrows:!0,accessibility:!0,centerMode:!0,variableWidth:!1,initialSlide:1,appendDots:e=>(0,d.jsxs)("div",{className:"cast-talent-slider__control",children:[(0,d.jsx)(r,{}),(0,d.jsx)(m,{}),(0,d.jsx)("ul",{className:"dots",children:e})]}),responsive:[{breakpoint:576,settings:{centerMode:!0,centerPadding:"70px",slidesToShow:3,slidesToScroll:1,initialSlide:1}},{breakpoint:320,settings:{slidesToShow:1,slidesToScroll:1,initialSlide:1}}]};return(0,d.jsxs)("div",{className:"cast-talent-slider",children:[(0,d.jsxs)("h2",{className:"cast-talent-slider__heading my-4 text-center",children:["Top ",e.length," talent that match your parameters"]}),(0,d.jsx)(o.A,Object.assign({ref:a},u,{children:e.map((e,t)=>(0,d.jsx)("div",{className:"cast-talent-slider__list-wrapper",children:(0,d.jsx)(c.A,{talent:e,inviteData:n,isJobRecommendation:!0})},t))}))]})};var u=a(71929),h=a(34174),p=a(85383);const _=({id:e,classPrefix:t,description:a})=>{const l=t||"trf-dashboard",i=a||"Collaborate together on new projects",[r,o]=(0,s.use
1State)([]),c=(0,n.Zp)(),{isLoading:m,fetchData:_}=(0,u.A)();(0,s.useEffect)(()=>{(async()=>{const e=await _((0,h.e6)());e&&e.data&&o(e.data.data)})()},[]);const v=()=>{c("/manage-team")};return(0,d.jsxs)("div",{className:`trf-actions__item ${l}__item`,children:[(0,d.jsxs)("div",{className:`trf-actions__head ${l}__head`,children:[(0,d.jsx)("h3",{onClick:v,className:"trf-actions__title",children:"Invite your team"}),(0,d.jsx)("span",{className:`trf-dashboard__badge trf-dashboard__badge--blue ${l}__badge `,children:r&&r.length>0?r.length+" member":"unlimited members"})]}),(0,d.jsx)(p.A,{loading:m,children:(0,d.jsxs)("div",{className:`trf-actions__body ${l}__body`,children:[(0,d.jsx)("p",{className:`trf-actions__desc ${l}__desc`,children:i}),(0,d.jsxs)("div",{className:`trf-actions__person ${l}__person`,children:[r.length>0&&r.map(e=>(0,d.jsx)("div",{className:`trf-actions__person-item trf-actions__person-item--team ${l}__person-item ${l}__person-item--team`,children:(0,d.jsx)("div",{className:"trf-actions__person-img ${getclassPrefix}__person-img",children:e.initials})})),(0,d.jsx)("button",{onClick:v,className:`trf-actions__person-add ${l}__person-add`,children:(0,d.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)("path",{d:"M9 1C9 0.447715 8.55228 0 8 0C7.44771 0 7 0.447715 7 1V6.99991L1 6.99991C0.447715 6.99991 0 7.44762 0 7.99991C0 8.55219 0.447715 8.99991 1 8.99991L7 8.99991V15C7 15.5523 7.44771 16 8 16C8.55228 16 9 15.5523 9 15V8.99991L15 8.99991C15.5523 8.99991 16 8.55219 16 7.99991C16 7.44762 15.5523 6.99991 15 6.99991L9 6.99991V1Z",fill:"#0C0C0C"})})})]}),(0,d.jsx)("div",{className:`trf-actions__bot ${l}__bot`,children:(0,d.jsxs)("button",{onClick:v,className:`trf-dashboard__main-cta trf-dashboard__main-cta--filled trf-dashboard__main-cta--chevron-r ${l}__main-cta ${l}__main-cta--filled ${l}__main-cta--chevron-r`,children:["manage team",(0,d.jsx)("svg",{width:"7",height:"12",viewBox:"0 0 7 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.528596 0.195262C0.788945 -0.0650874 1.21106 -0.0650874 1.4714 0.195262L6.80474 5.5286C7.06509 5.78895 7.06509 6.21106 6.80474 6.4714L1.4714 11.8047C1.21106 12.0651 0.788945 12.0651 0.528596 11.8047C0.268246 11.5444 0.268246 11.1223 0.528596 10.8619L5.39052 6L0.528596 1.13807C0.268246 0.877722 0.268246 0.455612 0.528596 0.195262Z",fill:"white"})})]})})]})})]})};var v=a(94829),b=a(49376),x=a(12476),f=a(10431),j=a(94656);const g=[{img:"/images/cast-talent-form/1-logo.svg",text:"Your job will be approved shortly once our team reviews it."},{img:"/images/cast-talent-form/2-logo.svg",text:"Talent matching your job brief will get notified. With over 15,000 talent, we're sure we've got what you need!"},{img:"/images/cast-talent-form/3-logo.svg",text:"Once you have applicants, view your options, shortlist, chat and book the talent you want"},{img:"/images/cast-talent-form/4-logo.svg",text:"Only pay when the job is done! Funds are held in escrow 72 hours before the job starts"}],y=()=>{const[e,t]=(0,s.useState)(!0),a=(0,s.useRef)(null),o=r.c.CDN_PATH,[c,h]=(0,s.use
1State)(),p=(0,n.Zp)(),y=(0,l.d4)(e=>e.userDetail.data),{id:N}=(0,n.g)(),{fetchData:w}=(0,u.A)(),A=(0,l.wA)(),[k,$]=(0,s.useState)();(0,s.useEffect)(()=>{(async()=>{t(!0);try{const e=await(0,f.f7)(N);$(e.data),t(!1)}catch(e){t(!1),console.error("Error fetching data:",e)}})()},[]),(0,s.useEffect)(()=>{(0,x.eG)();(async()=>{const e=await w((0,v.cf)(N));A((0,b.Zv)({stepsCompleted:e.data.data[0]}))})(),(async()=>{try{const e=await(0,v.h3)(N);h(e.talentList)}catch(e){console.error("Error fetching data:",e)}})()},[]);return(0,d.jsx)("div",{className:"cast-talent-content talent-submitted-form",ref:a,children:(0,d.jsxs)("div",{className:"cast-talent-form-content",children:[(0,d.jsxs)("div",{className:"job-submitted",children:[(0,d.jsx)("h2",{children:"Job submitted! What happens next?"}),(0,d.jsx)("ul",{children:g.map(e=>(0,d.jsxs)("li",{children:[(0,d.jsx)("div",{className:"job-submitted__img-wrap",children:(0,d.jsx)("img",{src:o+e.img})}),(0,d.jsx)("span",{children:e.text})]},e.img))})]}),c&&c.length>0&&(0,d.jsx)(m,{talents:c,position_id:N}),!(0,i.isEmpty)(y)&&(0,d.jsx)(_,{id:y.id,classPrefix:"trf-job-team-invite",description:"Collaborate with other team members to help you find the right candidate, allowing them to review applicants, communicate and shortlist talent."}),(0,d.jsxs)("div",{className:"cast-talent-form-content__box-btn",children:[!e&&k&&(0,d.jsx)(j.A,{myJobDetail:k,classes:"cast-talent-form-content__back"}),(0,d.jsx)("button",{className:"cast-talent-form-content__save",type:"submit",onClick:()=>{p("/projects")},children:"go to my jobs"})]})]})})}},59118(e,t,a){a.d(t,{A:()=>l});var s=a(40364),n=a(74848);const l=()=>{const e=s.c.CDN_PATH;return(0,n.jsxs)("div",{className:"cast-talent-tips",children:[(0,n.jsxs)("div",{className:"cast-talent-tips__title",children:[(0,n.jsx)("h3",{children:"Tips"}),(0,n.jsx)("div",{className:"cast-talent-tips__img-wrapp",children:(0,n.jsx)("img",{src:`${e}/images/cast-talent-form/lamp.svg`,alt:"lamp"})})]}),(0,n.jsx)("h4",{children:"What works?"}),(0,n.jsxs)("ul",{children:[(0,n.jsxs)("li",{children:[(0,n.jsx)("i",{className:"fa fa-check"}),(0,n.jsx)("span",{children:"Clear wording, your headline will be the job title, the very first thing a talent sees!"})]}),(0,n.jsxs)("li",{children:[(0,n.jsx)("i",{className:"fa fa-check"}),(0,n.jsx)("span",{children:"Being specific about what talent will do in your job"})]})]}),(0,n.jsx)("h4",{children:"What doesn't work?"}),(0,n.jsx)("ul",{children:(0,n.jsxs)("li",{children:[(0,n.jsx)("i",{className:"fas fa-times"}),(0,n.jsx)("span",{children:"Generic wording leaves talent unsure what they\u2019re applying for"})]})}),(0,n.jsx)("h4",{children:"Example"}),(0,n.jsx)("span",{children:"\u201cMummy influencer with kids under 5 for Instagram promotion\u201d"})]})}},35241(e,t,a){a.d(t,{A:()=>o});var s=a(96540),n=a(40364),l=a(10431),i=a(95352),r=a(74848);const o=({talent:e,inviteData:t,isJobRecommendation:a})=>{var o;const[c,d]=(0,s.useState)(!1),[m,u]=(0,s.useState)(!1),h=n.c.CDN_PATH;return(0,r.jsx)("div",{className:"talent-recommendation__talent "+(a?"talent-recommendation__isJobRecommendation":""),children:(0,r.jsxs)("div",{className:"talent-recommendation__talent__inner w-100",children:[(0,r.jsxs)("div",{className:"talent-recommendation__talent__image d-flex justify-content-center align-items-start",children:[(0,r.jsx)("a",{href:`/talent/${null==e?void 0:e.slug}`,target:"_blank",children:(0,r.jsx)("img",{src:null==e||null==(o=e.avatar_image)?void 0:o.replace("-local",""),alt:null==e?void 0:e.display_name,title:null==e?void 0:e.display_name})}),(0,r.jsx)(i.A,{talent_id:e.id})]}),(0,r.jsxs)("div",{className:"talent-recommendation__talent__details__space",children:[(0,r.jsx)("div",{className:"talent-recommendation__talent__name",children:(0,r.jsx)("a",{href:`/talent/${null==e?void 0:e.slug}`,target:"_blank",children:null!=e&&e.display_name?null==e?void 0:e.display_name:"Talent"})}),null!=e&&e.avg_rating||null!=e&&e.no_of_job_booked?(0,r.jsxs)("div",{className:"talent-recommendation__talent__rating",children:[(0,r.jsx)("img",{src:`${h}/images/icons/talent-profile/star.svg`,width:"16",height:"16",className:"talent-recommendation__talent__icon"}),(0,r.jsxs)("span",{children:[e.avg_rating.toFixed(1)," (",null==e?void 0:e.no_of_job_booked," jobs completed)"]})]}):null,(0,r.jsxs)("div",{className:"talent-recommendation__talent__location",children:[(0,r.jsx)("img",{src:`${h}/images/icons/talent-profile/location.svg`,width:"16",height:"16",className:"talent-recommendation__talent__icon"}),e.state&&e.country?(0,r.jsx)("span",{children:e.state+", "+e.country}):(0,r.jsx)("span",{children:"None Selected"})]}),e&&e.professions&&e.professions.length?(0,r.jsxs)("div",{className:"talent-recommendation__talent__profession",children:[(0,r.jsx)("img",{src:`${h}/images/icons/talent-profile/profile.svg`,width:"16",height:"16",className:"talent-recommendation__talent__icon"}),(0,r.jsx)("span",{children:e.professions.join(", ")})]}):null,null!=e&&e.total_followers?(0,r.jsxs)("div",{className:"talent-recommendation__talent__followers",children:[(0,r.jsx)("img",{src:`${h}/images/icons/talent-profile/instagram.svg`,width:"16",height:"16",className:"talent-recommendation__talent__icon"}),(0,r.jsxs)("span",{children:[null==e?void 0:e.total_followers," Followers"]})]}):null]}),!e.is_applied&&(0,r.jsxs)("div",{className:"talent-recommendation__talent__cta d-flex justify-content-center align-items-center "+(null!=e&&e.is_invited||m?"invited":""),onClick:()=>
1{if(!e.is_invited&&!m){d(!0);(async()=>{try{await(0,l.Ug)(e.id,t),u(!0)}catch(a){console.error("Error fetching data:",a)}finally{d(!1)}})()}},children:[(0,r.jsx)("span",{className:"tick mr-1 d-inline-block",children:c?(0,r.jsx)("i",{className:"fa fa-spinner fa-pulse"}):(0,r.jsx)("img",{src:`${h}/images/icons/icon-tick1.png`,alt:"tick"})}),(0,r.jsx)("span",{className:"text ml-1 d-inline-block font-weight-bold mr-0",children:"Invite"}),null!=e&&e.is_invited||m?(0,r.jsx)("span",{className:"text d-inline-block font-weight-bold m-0",children:"d"}):null]})]})})}},95352(e,t,a){a.d(t,{A:()=>c});var s=a(71468),n=a(61409),l=a(96093),i=a(49376),r=a(13838),o=a(74848);const c=({talent_id:e,onToggle:t,variant:a,btnClass:c})=>{const d=(0,s.d4)(e=>e.userDetail.data),m=(0,s.wA)(),u=()=>!(!d.favourites||!d.favourites.includes(e)),h=()=>{try{const t=u();(0,l.Mb)(e);let a=[...d.favourites];t?a=a.filter(t=>t!==e):a.push(e),m((0,i.yS)({data:Object.assign({},d,{favourites:a})})),localStorage.removeItem("authMe"),n.oR.success(t?"Removed from favourites":"Added to favourites")}catch(t){console.error(t)}};return"button"===a?(0,o.jsx)(r.$n,{className:c,onClick:h,children:(u()?"Remove from":"Add to")+" Favourites"}):(0,o.jsx)("div",{className:"add-favourite",children:(0,o.jsx)("span",{className:"add-favourite__icon d-block "+(u()?"active":""),onClick:h,title:(u()?"Remove from":"Add to")+" Favourites"})})}},80888(e,t,a){a.d(t,{A:()=>i});var s=a(40644),n=(a(96540),a(74848));const l=["level","children"],i=e=>{let{level:t,children:a}=e,i=(0,s.A)(e,l);const r=`h${t}`;return(0,n.jsx)(r,Object.assign({},i,{children:a}))}},59186(e,t,a){a.d(t,{A:()=>s.A});var s=a(80888)},64864(e,t,a){a.d(t,{p:()=>c});var s=a(40644),n=a(96540),l=a(32485),i=a.n(l),r=a(74848);const o=["id","name","label","type","size","className","placeholder"],c=(0,n.forwardRef)((e,t)=>{let{id:a,name:n,label:l,type:c="text",size:d="medium",className:m="",placeholder:u}=e,h=(0,s.A)(e,o);return(0,r.jsx)("input",Object.assign({id:a,ref:t,name:n,type:c,"aria-label":l,placeholder:u,autoComplete:"off",className:i()(m)},h))})},25814(e,t,a){a.d(t,{A:()=>n});a(96540);var s=a(74848);const n=({errorField:e,errors:t})=>{const a=t[e];return a&&a&&Array.isArray(a)?(0,s.jsx)("div",{className:"error-message mt-2",children:a.map((e,t)=>(0,s.jsx)("p",{className:"m-0",children:e},t))}):null}},10431(e,t,a){a.d(t,{Ao:()=>c,Do:()=>E,E9:()=>v,GS:()=>$,Kb:()=>T,NT:()=>p,OH:()=>A,On:()=>d,P0:()=>w,PJ:()=>m,Px:()=>f,SF:()=>q,TE:()=>b,Ug:()=>g,ZK:()=>x,Zu:()=>P,f7:()=>i,fJ:()=>l,fn:()=>h,gj:()=>_,hR:()=>j,kN:()=>u,kY:()=>N,mh:()=>o,oD:()=>r,qP:()=>O,tk:()=>y,uo:()=>C,x4:()=>S,xo:()=>k});var s=a(55029),n=a(55278);const l=(e,t,a,n=5)=>(0,s.Jt)("/position/list?page="+a+"&filter="+e+"&keyword="+t+"&limit="+n),i=e=>(0,s.Jt)(`/position/${e}/job-detail`),r=(e,t)=>e?(0,s.Jt)(`/position-details/user/${e}/${t}`):(0,s.Jt)(`/job/${t}`),o=(e,t,a)=>(0,s.bE)(`/position/${e}/cancel-job`,{reason:t,feedback:a}),c=e=>(0,s.bE)(`/position/${e}/close-job`,{}),d=e=>(0,s.bE)(`/position/${e}/unlock-applications`,{}),m=e=>(0,s.bE)(`/position/${e}/lock-applications`,{}),u=e=>(0,s.bE)(`/position/${e}/notify-pending-applicants`,{}),h=e=>{const t=(new Date).getTime();return(0,s.yJ)(`/positions/${e}/purchase-order/?${t}`,{},{responseType:"blob"})},p=(e,t)=>(0,s.Wv)(`/positions/${e}/attachments/${t}`),_=(e,t,a,n,l=12)=>(0,s.Jt)(`position/${e}/application?page=`+n+"&type="+t+"&keyword="+a+"&limit="+l),v=(e,t,a,n,l=12)=>(0,s.Jt)(`position/${e}/invitations?page=`+n+"&type="+t+"&keyword="+a+"&limit="+l),b=(e,t)=>(0,s.Jt)(`position/${e}/application-count?type=count&keyword=`+t),x=(e,t)=>(0,s.bE)(`/position/${e}/application/${t}/shortlist`,{}),f=(e,t)=>(0,s.bE)(`/position/${e}/application/${t}/decline`,{}),j=(e,t,a,n=12)=>(0,s.bE)(`position/${e}/application/export?type=`+t+"&keyword="+a+"&limit="+n,{},{responseType:"blob"}),g=(e,t)=>(0,s.bE)(`/talent/${e}/invite`,t),y=e=>(0,s.bE)("/position/"+e+"/repost",{}),N=e=>(0,s.bE)("/position/search",e),w=e=>(0,s.bE)("/campaign/search",e),A=()=>(0,s.Jt)("positions/available"),k=()=>(0,s.Jt)("campaign-invitation/list-campaign"),$=(e,t)=>(0,s.bE)(`/positions/${e}/bulk-invite`,t),C=(e,t)=>(0,s.bE)(`/campaign-invitation/campaign/${e}/bulk-invite`,t),S=(e,t,a)=>(0,s.Jt)(`/position/${e}/applicant-images?type=${t}&includeAll=${a}`),O=(e,t)=>(0,s.bE)("/talent/"+e+"/payment",t),q=(e,t)=>
1n.A.post("/campaign/"+e+"/favourite",t),P=(e,t)=>n.A.post("/campaign/"+e+"/unfavourite",t),T=(e,t)=>n.A.post("/campaign/"+e+"/hide",t),E=e=>{const t=new FormData;return Object.keys(e).forEach(a=>{t.append(a,e[a])}),n.A.post("/pitches/send",t,{headers:{"Content-Type":"multipart/form-data"}})}},68089(e,t,a){a.d(t,{N:()=>n});var s=a(55029);const n=(e,t)=>(0,s.yJ)(`/positions/${e}/influencer/budget\n `,t)},94829(e,t,a){a.d(t,{Dc:()=>d,Dt:()=>u,EA:()=>f,Fi:()=>h,Kj:()=>b,NO:()=>r,NT:()=>o,Pz:()=>g,X6:()=>v,YT:()=>c,cf:()=>_,dE:()=>y,df:()=>A,e0:()=>N,eA:()=>x,h3:()=>m,ku:()=>i,u9:()=>w,uB:()=>p,z$:()=>j,zC:()=>l});var s=a(55029),n=a(58755);const l=e=>(0,s.Jt)(`/positions/${e}/usage`),i=(e,t)=>(0,s.yJ)(`/positions/${e}/usage`,Object.assign({},t,{usage_skipped:0})),r=e=>(0,s.Jt)(`/positions/${e}/budget`),o=(e,t)=>(0,s.yJ)(`/positions/${e}/budget`,t),c=e=>(0,s.Jt)(`/positions/${e}/preview`),d=e=>(0,s.bE)(`/positions/${e}/submit-for-approval`,{}),m=e=>(0,s.Jt)(`/positions/${e}/talent-recommendations`),u=e=>(0,n.T3)("/positions",e),h=e=>e?`/profession?profession_name=${e}`:"/profession",p=e=>`/positions/details/${e}`,_=e=>`/positions/${e}/steps`,v=(e,t)=>(0,n.cL)(`/positions/details/${t}`,e),b=(e,t)=>{const a=new FormData;return a.append("images[]",e.file,e.file.name),(0,n.T3)(`/positions/${t}/attachments`,a)},x=e=>(0,n.Wv)(`/positions/${e.id}/attachments/${e.file.id}`),f=e=>`/positions/${e}/who`,j=e=>`/positions/${e}/content-creator/who`,g=e=>`/positions/${e}/influencer/who`,y=(e,t)=>(0,n.cL)(`/positions/${t}/who`,e),N=(e,t)=>(0,n.cL)(`/positions/${t}/influencer/who`,e),w=(e,t)=>(0,n.cL)(`/positions/${t}/content-creator/who`,e),A=(e,t)=>(0,s.yJ)(`/positions/${e}/save-as-draft`,t)},96093(e,t,a){a.d(t,{$P:()=>i,Fq:()=>r,Mb:()=>l,NO:()=>n,eI:()=>c,s6:()=>o});var s=a(55029);const n=(e,t,a=12)=>(0,s.Jt)("user/favourites?page="+t+"&keyword="+e+"&limit="+a),l=e=>(0,s.bE)("/user/toggle-favourite",{profile_id:e}),i=(e,t)=>(0,s.jT)("/search",{filters:e,page:t}),r=()=>(0,s.Jt)("facets"),o=e=>(0,s.Jt)("/country/state/list?country_name="+e),c=e=>(0,s.Jt)("/creator/"+e)},12476(e,t,a){a.d(t,{Yq:()=>l,eG:()=>n,x3:()=>s});const s=e=>!(!e||!e.id),n=()=>{window.scrollTo({top:0,behavior:"smooth"})},l=e=>{if(!e)return;return new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}},55868(e,t,a){a.d(t,{QX:()=>r,UB:()=>s,VI:()=>u,X9:()=>m,aU:()=>l,cr:()=>o,sM:()=>i,t$:()=>n,vQ:()=>d,wu:()=>c});const s=/^(?!.*\b(?:[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b|[A-Za-z0-9+-]{1,}\.[A-Za-z]{1,}\b|instagram\.com\/[A-Za-z0-9_]+\b|skype:[A-Za-z0-9.?&=+-]+\b|[A-Za-z0-9.-]+\.[A-Za-z]{2,}\/[A-Za-z0-9_-]+\b|\+?[0-9\s-]{6,}\b))[\s\S]+$/,n=[{value:"0",label:"Payable on Receipt"},{value:"7",label:"7 Days"},{value:"14",label:"14 Days"},{value:"30",label:"30 Days"}],l=(e,t,a=!1)=>{let s=0,n=.2;switch(n=a&&(a.isPostAnalyzerEnabled||a.isFreeAccessEnabled||a.isAdminDiscount)?.15:.2,e){case"trf":s=t*n;break;case"gst":s=t*(n/10);break;case"total":s=t+t*n+t*(n/10)}return s.toFixed(2)},i=(e,t)=>window.location.pathname.replace(e,t),r=e=>e[0]===e[1],o=(e,t)=>!r([e[0],t])&&-1!==e[1].indexOf(e[0]),c=e=>{const t=e&&e.mime?e.mime:e&&e.type?e.type:null;return!(!t||!t.includes("image"))},d=e=>{const t=e.profession;return"model"===t||"actor"===t||"presenter"===t?"/cast-talent/"+e.id+"/details":"influencer"===t?"/work-with-influencer/"+e.id+"/details":"content-creator"===t?"/work-with-content-creator/"+e.id+"/details":"/creative-production/"+e.id+"/details"},m=e=>(e=Number(e))>=1e3?e>=1e6?(e/1e6).toFixed(0)+"M":(e/1e3).toFixed(0)+"K":e,u=(e,t)=>e.attributes.filter(e=>e.name===t).map(e=>e.value)}}]);
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.