PageSourceSearch

https://performrgo.com/assets/BrowsePage.B-YHI61S.js

js performrgo.com collected 2026-10-05 22:48:12 UTC 6,139 bytes, 1 lines download raw bytes

1import{u as q,b as ee,d as a,j as t,e as u,T as m,h as C,R as b,ah as z,B as $,aF as te,Q as se,t as ae,A as B,v as re}from"./index.BdFycjDt.js";import{s as j}from"./showcaseApi.CXh4owQ4.js";import{C as h}from"./ChipMultiSelect.ZuI2VeXP.js";import{P as ne}from"./PerformerCard.DBwg2VNj.js";import{C as Y}from"./Clear.B8lhMzpS.js";import{S as le}from"./Search.9mo7tfIP.js";import{F as oe}from"./FilterList.B92Wupkg.js";import{P as ie,V as ce,D as ue,U as me,O as he}from"./castingVocabulary.B7xQ_ckh.js";import{G as K}from"./Grid.DiRnEHfS.js";import"./functionError.DKuHce60.js";import"./Card.y4fRYbDG.js";import"./CardContent.BGaAZbjQ.js";import"./Bookmark.Oa95gAv0.js";import"./BookmarkBorder.BKBze8HU.js";import"./LocationOn.Jyy_Ykh4.js";const pe=["AL","AK","AZ","AR","CA","CO","CT","DE","FL","GA","HI","ID","IL","IN","IA","KS","KY","LA","ME","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","OH","OK","OR","PA","RI","SC","SD","TN","TX","UT","VT","VA","WA","WV","WI","WY"];function Oe(){const G=q(),o=ee(e=>e.user),[M,H]=a.useState([]),[P,_]=a.useState(new Set),[J,N]=a.useState(!0),[O,Q]=a.useState(null),[p,A]=a.useState(""),[r,E]=a.useState(""),[n,I]=a.useState(""),[d,L]=a.useState([]),[x,k]=a.useState([]),[g,w]=a.useState([]),[f,F]=a.useState([]),[y,R]=a.useState([]),[v,W]=a.useState([]),[i,V]=a.useState(!1),[D,U]=a.useState(null);a.useEffect(()=>{o&&(async()=>{N(!0);try{const[e,s]=await Promise.all([j.search({}),j.getSaved(o.id)]);H(e),_(new Set(s))}catch(e){Q(e?.message||"Could not load the directory.")}finally{N(!1)}})()},[o]);const c=r!==""&&n!==""&&r>n,S=a.useMemo(()=>{const e={search:p,playableAgeMin:r===""?void 0:r,playableAgeMax:n===""?void 0:n,voiceTypes:d,danceLevels:x,unionStatuses:g,states:f,openTo:y,performerTypes:v,seekingRepOnly:i};return M.filter(s=>{if(c||e.playableAgeMin!=null&&(s.playable_age_max==null||s.playable_age_max<e.playableAgeMin)||e.playableAgeMax!=null&&(s.playable_age_min==null||s.playable_age_min>e.playableAgeMax)||e.voiceTypes?.length&&!e.voiceTypes.includes(s.voice_type||"")||e.danceLevels?.length&&!e.danceLevels.includes(s.dance_level||"")||e.states?.length&&!e.states.includes(s.location_state||"")||e.seekingRepOnly&&!s.seeking_representation||e.unionStatuses?.length&&!e.unionStatuses.some(l=>(s.union_status||[]).includes(l))||e.openTo?.length&&!e.openTo.some(l=>(s.open_to||[]).includes(l))||e.performerTypes?.length&&!e.performerTypes.some(l=>(s.performer_type||[]).includes(l)))return!1;if(e.search?.trim()){const l=e.search.toLowerCase();if(!`${s.stage_name||""} ${s.bio||""} ${s.training||""} ${(s.special_skills||[]).join(" ")}`.toLowerCase().includes(l))return!1}return!0})},[M,p,r,n,c,d,x,g,f,y,v,i]),T=d.length+x.length+g.length+f.length+y.length+v.length+(i?1:0)+(r!==""||n!==""?1:0),X=()=>{L([]),k([]),w([]),F([]),R([]),W([]),V(!1),A(""),E(""),I("")},Z=async e=>{if(!o)return;const s=new Set(P);s.has(e)?(s.delete(e),await j.unsavePerformer(o.id,e)):(s.add(e),await j.savePerformer(o.id,e)),_(s)};return t.jsxs(u,{sx:{maxWidth:1200,mx:"auto",px:{xs:2,md:0},py:{xs:2,md:4}},children:[t.jsx(m,{variant:"h2",sx:{mb:.5},children:"Find Performers"}),t.jsx(m,{color:"text.secondary",sx:{mb:3},children:"Search early-career performers by the criteria that matter for the role."}),t.jsxs(C,{direction:{xs:"column",sm:"row"},spacing:1.5,sx:{mb:2},children:[t.jsx(b,{fullWidth:!0,placeholder:"Search name, bio, training, skills…",value:p,onChange:e=>A(e.target.value),InputProps:{startAdornment:t.jsx(z,{position:"start",children:t.jsx(le,{})}),endAdornment:p?t.jsx(z,{position:"end",children:t.jsx(Y,{sx:{cursor:"pointer"},onClick:()=>A("")})}):null}}),t.jsxs($,{variant:"outlined",startIcon:t.jsx(oe,{}),onClick:e=>U(e.currentTarget),sx:{minWidth:140},children:["Filters",T>0?` (${T})`:""]})]}),T>0&&t.jsx(u,{sx:{mb:2},children:t.jsx($,{size:"small",startIcon:t.jsx(Y,{}),onClick:X,children:"Clear all filters"})}),t.jsx(te,{open:!!D,anchorEl:D,onClose:()=>U(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:t.jsx(u,{sx:{p:2.5,width:{xs:300,sm:380}},children:t.jsxs(C,{spacing:2.5,children:[t.jsx(h,{label:"Performer Type",options:ie,value:v,onCh
1ange:W}),t.jsxs(u,{children:[t.jsx(m,{variant:"subtitle2",sx:{fontWeight:700,mb:.75},children:"Playable Age"}),t.jsxs(C,{direction:"row",spacing:1,children:[t.jsx(b,{fullWidth:!0,type:"number",size:"small",label:"From",value:r,inputProps:{min:1,max:100},error:c,onChange:e=>E(e.target.value===""?"":Math.max(1,Math.min(100,Number(e.target.value))))}),t.jsx(b,{fullWidth:!0,type:"number",size:"small",label:"To",value:n,inputProps:{min:1,max:100},error:c,onChange:e=>I(e.target.value===""?"":Math.max(1,Math.min(100,Number(e.target.value))))})]}),c&&t.jsx(m,{variant:"caption",color:"error",sx:{display:"block",mt:.5},children:"To must be at least From."})]}),t.jsx(h,{label:"Voice Type",options:ce,value:d,onChange:L}),t.jsx(h,{label:"Dance Level",options:ue,value:x,onChange:k}),t.jsx(h,{label:"Union Status",options:me,value:g,onChange:w}),t.jsx(h,{label:"Open To",options:he,value:y,onChange:R}),t.jsx(b,{select:!0,label:"State",SelectProps:{multiple:!0,renderValue:e=>e.join(", ")},value:f,onChange:e=>F(typeof e.target.value=="string"?[e.target.value]:e.target.value),fullWidth:!0,size:"small",children:pe.map(e=>t.jsx(se,{value:e,children:e},e))}),t.jsx(ae,{label:"Seeking representation only",color:i?"primary":"default",variant:i?"filled":"outlined",onClick:()=>V(e=>!e),sx:{alignSelf:"flex-start",cursor:"pointer"}})]})})}),O&&t.jsx(B,{severity:"error",sx:{mb:2},children:O}),J?t.jsx(u,{sx:{display:"flex",justifyContent:"center",py:8},children:t.jsx(re,{})}):t.jsxs(t.Fragment,{children:[t.jsxs(m,{variant:"body2",color:"text.secondary",sx:{mb:2},children:[S.length," performer",S.length===1?"":"s"]}),S.length===0?t.jsx(B,{severity:"info",children:"No performers match these filters yet."}):t.jsx(K,{container:!0,spacing:2,children:S.map(e=>t.jsx(K,{item:!0,xs:12,sm:6,md:4,children:t.jsx(ne,{profile:e,saved:P.has(e.id),onToggleSave:Z,onClick:s=>G(`/showcase/performer/${s}`)})},e.id))})]})]})}export{Oe 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.