1"use strict";(self.webpackChunktrf_frontend=self.webpackChunktrf_frontend||[]).push([[1211],{98018(e,t,n){n.d(t,{A:()=>d});var o=n(96540),s=n(95352),r=n(71468),l=n(12476),a=n(78678),i=n(3433),c=n(74848);const d=({talent:e,onToggleInviteTalent:t,selectedTalents:n,showInviteBlock:d,isCreator:h})=>{var u;const[p,m]=(0,o.useState)(!1),f=(0,r.d4)(e=>e.userDetail.data),v=(0,i.zy)(),g=v.pathname.includes("creator")||v.search.toLowerCase().includes("professions=influencer"),b=[],_=(null==e||null==(u=e.avatar_image)?void 0:u.replace("-local",""))||"",w=(null==e?void 0:e.display_name)||"";for(let o=0;o<e.avg_rating;o++)b.push((0,c.jsx)("i",{className:"fa fa-star mr-1"},o));const x=()=>{if((0,l.x3)(f)){const t=new URL(window.location.href),n=h?"/creator/":"/talent/";window.open(t.origin+n+e.slug,"_blank")}else m(!0)};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:"talent-card",children:(0,c.jsxs)("div",{className:"talent-card__inner",children:[d&&(0,c.jsx)("div",{className:"trf-talent-card__select",children:(0,c.jsx)("button",{className:"btn btn-block "+(n&&n.some(t=>t.id===e.id)?"btn-trf-blue":"btn-trf-secondary"),onClick:()=>{t&&t(e)},children:n&&n.some(t=>t.id===e.id)?"Unselect":"Select"})}),(0,c.jsxs)("div",{className:"talent-card__image d-flex justify-content-center align-items-start",children:[(0,c.jsx)("span",{children:(0,c.jsx)("img",{src:_,alt:w,title:w,onClick:x},_)}),(0,l.x3)(f)&&(0,c.jsx)(s.A,{talent_id:e.id})]}),(0,c.jsxs)("div",{className:"talent-card__details",children:[(0,c.jsx)("div",{className:"talent-card__name mt-1 mb-2",children:(0,c.jsx)("p",{className:"talent-card__name-link m-0",onClick:x,children:w})}),e.count_jobs_booked>0?(0,c.jsxs)("div",{className:"talent-card__rating align-items-center d-flex justify-content-start mb-1 py-1",children:[(0,c.jsx)("span",{children:b}),(null==e?void 0:e.count_jobs_booked)&&(0,c.jsxs)("span",{className:`talent-card__booked text-center d-inline-block ${e.count_jobs_booked>99?"big":""} ${e.average_rating?"ml-1":""}`,children:[(0,c.jsx)("span",{className:"text-center "+(e.count_jobs_booked<10&&e.count_jobs_booked>4?"medium":"big"),children:null==e?void 0:e.count_jobs_booked}),"Jobs booked"]})]}):null,(0,c.jsx)("div",{className:"talent-card__location mb-1",children:null!=e&&e.state&&null!=e&&e.country?(0,c.jsxs)("span",{children:[e.state,", ",e.country]}):(0,c.jsx)("span",{children:"None Selected"})}),e.professions&&!g&&(0,c.jsx)("div",{className:"talent-card__profession mb-1",children:e.professions.join(", ")}),e.followers&&(0,c.jsxs)("div",{className:"talent-card__followers mb-1",children:[e.followers," Followers"]})]})]})}),p&&(0,c.jsx)(a.A,{onClose:()=>{m(!1)}})]})}},95352(e,t,n){n.d(t,{A:()=>c});var o=n(71468),s=n(61409),r=n(96093),l=n(49376),a=n(13838),i=n(74848);const c=({talent_id:e,onToggle:t,variant:n,btnClass:c})=>{const d=(0,o.d4)(e=>e.userDetail.data),h=(0,o.wA)(),u=()=>!(!d.favourites||!d.favourites.includes(e)),p=()=>{try{const t=u();(0,r.Mb)(e);let n=[...d.favourites];t?n=n.filter(t=>t!==e):n.push(e),h((0,l.yS)({data:Object.assign({},d,{favourites:n})})),localStorage.removeItem("authMe"),s.oR.success(t?"Removed from favourites":"Added to favourites")}catch(t){console.error(t)}};return"button"===n?(0,i.jsx)(a.$n,{className:c,onClick:p,children:(u()?"Remove from":"Add to")+" Favourites"}):(0,i.jsx)("div",{className:"add-favourite",children:(0,i.jsx)("span",{className:"add-favourite__icon d-block "+(u()?"active":""),onClick:p,title:(u()?"Remove from":"Add to")+" Favourites"})})}},10355(e,t,n){n.d(t,{A:()=>a});var o=n(40644),s=(n(96540),n(3433)),r=n(74848);const l=["url","target","children"],a=e=>{let{url:t,target:n="",children:a}=e,i=(0,o.A)(e,l);return(0,r.jsx)(s.N_,Object.assign({to:t,target:n},i,{children:a}))}},78678(e,t,n){n.d(t,{A:()=>a});n(96540);var o=n(61784),s=n(3433),r=n(10355),l=n(74848);const a=({onClose:e})=>{const t=(0,s.Zp)(),n=()=>{e()};return(0,l.jsx)(o.A,{show:!0,className:"nonloggedin-warning-modal text-center",onHide:()=>n(),children:(0,l.jsx)(o.A.Body,{children:(0,l.jsxs)("div",{className:"nonloggedin-warning-modal__container",children:[(0,l.jsx)("button",{type:"button",className:"close",onClick:()=>n()}),(0,l.jsx)("h5",{className:"modal-heading",children:"Love our pool of creators?"}),(0,l.jsx)("p",{className:"modal-sub-heading",children:"Sign up to browse more, it\u2019s free!"}),(0,l.jsx)("button",{className:"btn btn-trf-yellow btn-rounded my-2 w-100 sign-up-button",onClick:()=>{t("/register")},children:"SIGN UP FOR FREE"}),(0,l.jsxs)("p",{className:"modal-register-link",children:["Already registered?",(0,l.jsx)(r.A,{url:"/login",children:" LOG IN"})]})]})})})}},96093(e,t,n){n.d(t,{$P:()=>l,Fq:()=>a,Mb:()=>r,NO:()=>s,eI:()=>c,s6:()=>i});var o=n(55029);const s=(e,t,n=12)=>(0,o.Jt)("user/favourites?page="+t+"&keyword="+e+"&limit="+n),r=e=>(0,o.bE)("/user/toggle-favourite",{profile_id:e}),l=(e,t)=>
1(0,o.jT)("/search",{filters:e,page:t}),a=()=>(0,o.Jt)("facets"),i=e=>(0,o.Jt)("/country/state/list?country_name="+e),c=e=>(0,o.Jt)("/creator/"+e)},12476(e,t,n){n.d(t,{Yq:()=>r,eG:()=>s,x3:()=>o});const o=e=>!(!e||!e.id),s=()=>{window.scrollTo({top:0,behavior:"smooth"})},r=e=>{if(!e)return;return new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}},1211(e,t,n){n.r(t),n.d(t,{default:()=>m});var o=n(96540),s=n(67310),r=n(3433),l=n(10355),a=n(40364),i=n(13838),c=n(74848);const d=({filter:e,onFilterChange:t,setFilter:n})=>{const s=(0,r.Zp)(),d=a.c.CDN_PATH,[h,u]=(0,o.useState)(!1),[p,m]=(0,o.useState)(e.keyword?e.keyword:""),f=()=>{""===e.keyword&&""===p||n(e=>Object.assign({},e,{keyword:p,page:"1"}))};(0,o.useEffect)(()=>{t(e)},[e.keyword]);return(0,c.jsx)("div",{className:"favourite-talents__header mb-3 mb-sm-4",children:(0,c.jsxs)("div",{className:"d-flex justify-content-between align-items-center flex-wrap flex-xl-nowrap",children:[(0,c.jsxs)("div",{className:"d-flex justify-content-start align-items-start",children:[(0,c.jsx)("div",{className:"pr-2",children:(0,c.jsx)(i.$n,{theme:"text",onClick:()=>{s("/dashboard")},children:(0,c.jsx)("i",{className:"fa fa-angle-left"})})}),(0,c.jsxs)("div",{children:[(0,c.jsxs)("div",{className:"favourite-talents__header__breadcrumbs mb-2",children:[(0,c.jsx)(l.A,{url:"/dashboard",children:"Dashboard"}),(0,c.jsx)("i",{className:"fa fa-angle-right px-2"}),(0,c.jsx)("span",{children:"Favourites"})]}),(0,c.jsx)("h1",{className:"mb-2",children:"Following"}),(0,c.jsx)("p",{className:"mb-0",children:"Manage and book the talent you follow on theright.fit."})]})]}),(0,c.jsx)("div",{className:"favourite-talents__search__outer",children:(0,c.jsxs)("div",{className:"favourite-talents__search d-flex align-items-center mb-3 mb-md-0 justify-content-end",children:[(0,c.jsx)("div",{className:"favourite-talents__search__inner",children:(0,c.jsx)("input",{type:"search",className:"form-control "+(h?"show":""),placeholder:"Search",value:p,onChange:e=>{m(e.target.value)},onKeyUp:e=>{"Enter"===e.key&&f()}})}),(0,c.jsx)("button",{type:"button",className:"btn btn-link",onClick:()=>{!h&&u(!0),p!==e.keyword&&f()},children:(0,c.jsx)("img",{src:`${d}/images/icons/talent-profile/icon-search.png`,width:"19",alt:"Search"})})]})})]})})};var h=n(96093),u=n(98018),p=n(85383);const m=()=>{const e=(0,o.useRef)(null),t=a.c.CDN_PATH,[n,r]=(0,o.useState)(!1),[l,i]=(0,o.useState)(),m=new URLSearchParams(window.location.search).get("keyword"),f={keyword:m||"",page:l?l.current_page.toString():"1"},[v,g]=(0,o.useState)(f),[b,_]=(0,o.useState)([]);(0,o.useEffect)(()=>{v&&(async()=>{const e=new URLSearchParams(window.location.search).get("keyword");r(!0);try{const t=await(0,h.NO)(e||"",v.page);i(t.meta),_(e=>[...e||[],...t.data||[]])}catch(t){console.error("Error fetching data:",t)}finally{r(!1)}})()},[v]);return(0,c.jsx)("div",{className:"favourite-talents px-4 py-3",ref:e,children:(0,c.jsxs)("div",{className:"favourite-talents__inner mx-auto",children:[v&&(0,c.jsx)(d,{filter:v,onFilterChange:e=>{_([]),i(void 0),(e=>{const t=`${window.location.pathname}?keyword=${e.keyword}`;window.history.pushState({},"",t)})(e)},setFilter:g}),(0,c.jsx)("div",{className:"favourite-talents__body w-100",children:(0,c.jsxs)("div",{className:"favourite-talents__talent",children:[(0,c.jsx)(s.A,{dataLength:b?b.length:0,next:()=>{!n&&l&&g(e=>Object.assign({},null!=e?e:f,{page:(l.current_page+1).toString()}))},style:{overflow:"hidden"},hasMore:!((!l||l.current_page==l.last_page)&&l),loader:(0,c.jsx)(p.A,{loading:n}),children:b&&b&&b.length>0?b&&b.map((e,t)=>(0,c.jsx)(u.A,{talent:e},t)):(0,c.jsx)(c.Fragment,{children:" "})}),!n&&b&&0===b.length&&(0,c.jsxs)("div",{className:"py-3 text-center favourite-talents__noResults",children:[(0,c.jsx)("img",{src:`${t}/images/icons/favourites/icon-favourites-empty.png`,className:"d-inline-block mb-2",width:"33",alt:"Favourites"}),(0,c.jsx)("h5",{className:"mb-2",children:"You're not following any talent"}),(0,c.jsxs)("p",{children:["Click the"," ",(0,c.jsx)("img",{src:`${t}/images/icons/favourites/icon-favourites-active2.svg`,alt:"No Favourites"}),"icon on a talent's profile ",(0,c.jsx)("br",{className:"d-none d-md-block"}),"to save them to favourites."]})]})]})})]})})}},67310(e,t,n){n.d(t,{A:()=>h});
1var o=n(96540),s=function(e,t){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},s(e,t)};var r=function(){return r=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},r.apply(this,arguments)};var l="Pixel",a="Percent",i={unit:a,value:.8};function c(e){return"number"==typeof e?{unit:a,value:100*e}:"string"==typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:l,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:a,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),i):(console.warn("scrollThreshold should be string or number"),i)}var d=function(e){function t(t){var n=e.call(this,t)||this;return n.lastScrollTop=0,n.actionTriggered=!1,n.startY=0,n.currentY=0,n.dragging=!1,n.maxPullDownDistance=0,n.getScrollableTarget=function(){return n.props.scrollableTarget instanceof HTMLElement?n.props.scrollableTarget:"string"==typeof n.props.scrollableTarget?document.getElementById(n.props.scrollableTarget):(null===n.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n happen because the element may not have been added to DOM yet.\n See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n "),null)},n.onStart=function(e){n.lastScrollTop||(n.dragging=!0,e instanceof MouseEvent?n.startY=e.pageY:e instanceof TouchEvent&&(n.startY=e.touches[0].pageY),n.currentY=n.startY,n._infScroll&&(n._infScroll.style.willChange="transform",n._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},n.onMove=function(e){n.dragging&&(e instanceof MouseEvent?n.currentY=e.pageY:e instanceof TouchEvent&&(n.currentY=e.touches[0].pageY),n.currentY<n.startY||(n.currentY-n.startY>=Number(n.props.pullDownToRefreshThreshold)&&n.setState({pullToRefreshThresholdBreached:!0}),n.currentY-n.startY>1.5*n.maxPullDownDistance||n._infScroll&&(n._infScroll.style.overflow="visible",n._infScroll.style.transform="translate3d(0px, "+(n.currentY-n.startY)+"px, 0px)")))},n.onEnd=function(){n.startY=0,n.currentY=0,n.dragging=!1,n.state.pullToRefreshThresholdBreached&&(n.props.refreshFunction&&n.props.refreshFunction(),n.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame(function(){n._infScroll&&(n._infScroll.style.overflow="auto",n._infScroll.style.transform="none",n._infScroll.style.willChange="unset")})},n.onScrollListener=function(e){"function"==typeof n.props.onScroll&&setTimeout(function(){return n.props.onScroll&&n.props.onScroll(e)},0);var t=n.props.height||n._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;n.actionTriggered||((n.props.inverse?n.isElementAtTop(t,n.props.scrollThreshold):n.isElementAtBottom(t,n.props.scrollThreshold))&&n.props.hasMore&&(n.actionTriggered=!0,n.setState({showLoader:!0}),n.props.next&&n.props.next()),n.lastScrollTop=t.scrollTop)},n.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},n.throttledOnScrollListener=function(e,t,n,o){var s,r=!1,l=0;function a(){s&&clearTimeout(s)}function i(){var i=this,c=Date.now()-l,d=arguments;function h(){l=Date.now(),n.apply(i,d)}r||(o&&!s&&h(),a(),void 0===o&&c>e?h():!0!==t&&(s=setTimeout(o?function(){s=void 0}:h,void 0===o?e-c:e)))}return"boolean"!=typeof t&&(o=n,n=t,t=void 0),i.cancel=function(){a(),r=!0},i}(150,n.onScrollListener).bind(n),n.onStart=n.onStart.bind(n),n.onMove=n.onMove.bind(n),n.onEnd=n.onEnd.bind(n),n}return function(e,t){function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.componentDidMount=function(){if(void 0===this.props.dataLength)throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw new Error('Mandatory prop "refreshFunction" missing.\n Pull Down To Refresh functionality will not work\n as expected. Check README.md for usage\'')},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)
1))},t.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(e,t){return e.dataLength!==t.prevDataLength?r(r({},t),{prevDataLength:e.dataLength}):null},t.prototype.isElementAtTop=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,o=c(t);return o.unit===l?e.scrollTop<=o.value+n-e.scrollHeight+1:e.scrollTop<=o.value/100+n-e.scrollHeight+1},t.prototype.isElementAtBottom=function(e,t){void 0===t&&(t=.8);var n=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,o=c(t);return o.unit===l?e.scrollTop+n>=e.scrollHeight-o.value:e.scrollTop+n>=o.value/100*e.scrollHeight},t.prototype.render=function(){var e=this,t=r({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),n=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),s=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return o.createElement("div",{style:s,className:"infinite-scroll-component__outerdiv"},o.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&o.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},o.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!n&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},t}(o.Component);const h=d}}]);
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.