PageSourceSearch

https://assets.fieldlevel.com/839b8534d3/assets/AthleteSearchPage-fQT_oXAK.js

js fieldlevel.com collected 2026-10-01 12:23:18 UTC 6,671 bytes, 2 lines download raw bytes

1import{r as d,j as c}from"./playbook-DzR_ry6Q.js";import{P as U}from"./PageTitle-DSuujEOz.js";import{a as k,D as K,b as O}from"./ListWithFilters-CnnmWmsB.js";import{u as V}from"./useURLParams-CIlhPcPz.js";import{A as q}from"./AthleteSearchPageDisplay-B5T5zwTy.js";import{g as S}from"./natsAnalyticsUtils-B3DIQD8S.js";import{D as y,v as f,k as v,C as B}from"./app-public-BF3VXhlA.js";import{u as D}from"./urlBuilder-BDOOCRBm.js";import{u as x}from"./urlBuilder-BROSAaNt.js";import{u as R}from"./useCanonical-Cd4wv_wu.js";import{s as j}from"./queryUtils-BMPR3ius.js";import{h as L,a as N}from"./AppUpdateMonitor-Bn2pSfA6.js";import{u as T}from"./useQuery-yAE_5L0B.js";import{u as z}from"./useParamTools-D_61eG9W.js";import"./SearchFilters-F6EEsGCk.js";import"./DropdownMenu-ExsHO29w.js";import"./dateUtils-DoT-fxLW.js";import"./use_UNSTABLE_horizontalScrollTracking-fivdJVrO.js";import"./grammar-dP6wXds3.js";import"./AthleteHeadshot-CCVkz9AN.js";import"./imageSrcManager-B_vswghy.js";import"./Chip-DY76-230.js";import"./Responsive-BFVHKv7y.js";import"./TeamLogo-BcNhaL61.js";import"./PrimeBadgeIcon-o8Ye35qf.js";import"./VideoFilledMajor-BUjyKOpp.js";import"./VideoMajor-BzGbQGeJ.js";import"./athleticAssociationUtils-8LDySNgt.js";import"./dataTypes-DjeN0w5k.js";import"./masquerading-CBSqNbPk.js";import"./TwitterMajor-Df5iUS11.js";import"./LinkedinMajor-jXmX5JLG.js";import"./useBaseQuery-CV-kdyom.js";import"./utils-C3Uzq3hM.js";const C="/api/athletesearchapi",_=({query:e,sportEnum:l,country:n,state:m,schoolType:s,highSchoolGraduationYear:u,page:p,pageSize:a,positions:t,sort:i})=>L.get(`${C}/search`,{query:e,sportEnum:l,country:n,state:m,schoolType:s,highSchoolGraduationYear:u,page:p,positions:t,pageSize:a||25,sort:i}),F=()=>L.get(`${C}/options`),G=({query:e,sportEnum:l,schoolType:n,highSchoolGraduationYear:m,country:s,state:u,positions:p,page:a,pageSize:t,sort:i})=>[y.athleteSearch,j({params:{query:e,sportEnum:l,schoolType:n,highSchoolGraduationYear:m,country:s,state:u,positions:p,page:a,pageSize:t,sort:i}})],$=({params:e={query,sportEnum,schoolType,highSchoolGraduationYear,country,state,positions,page,pageSize,sort},options:l}={})=>T(G(e),()=>_({query:e.query,sportEnum:e.sportEnum,schoolType:e.schoolType,highSchoolGraduationYear:e.highSchoolGraduationYear,page:e.page,country:e.country,state:e.state,positions:e.positions,pageSize:e.pageSize,sort:e.sort}),l),Y=({searchOptions:e,defaultParams:l})=>{const n=f(),m=e&&{sort:{searchParamKey:"sort",requestParamKey:"sort",defaultValue:"distance",options:[{label:"Distance",value:"distance"},{label:"Newest",value:"newest"}]},primary:{label:"Sport",selectionType:"singleSelect",defaultValue:l?.sportEnum,options:[...e.SportOptions.map(t=>({label:t.Label,value:t.Value}))],searchParamKey:"sportEnum",requestParamKey:"sportEnum"},secondary:[{label:"Current level",selectionType:"singleSelect",options:e.SchoolTypeOptions.map(t=>({label:t.Label,value:`${t.Value}`})),UNSTABLE_alwaysShowFilterWhileOthersHidden:!0,searchParamKey:"schoolType",requestParamKey:"schoolType"},{label:"HS grad year",selectionType:"unstable_nestedText",placeholder:N("CURRENT_ACADEMIC_YEAR").toString(),UNSTABLE_alwaysShowFilterWhileOthersHidden:!0,UNSTABLE_hideSearchIcon:!0,searchParamKey:"highSchoolGraduationYear",requestParamKey:"highSchoolGraduationYear"},{label:"Position",selectionType:"singleSelect",options:e.PositionOptions.map(t=>({label:t.Label,value:`${t.Value}`})),searchParamKey:"positions",requestParamKey:"positions"},{label:"State",selectionType:"singleSelect",options:e.StateOptions.map(t=>({label:t.Label,value:`${t.Value}`})),searchParamKey:"state",requestParamKey:"state"},{label:"Country",selectionType:"singleSelect",options:e.CountryOptions.map(t=>({label:t.Label,value:`${t.Value}`})),searchParamKey:"country",requestParamKey:"country"}],text:{placeholder:"Search by athlete name",searchParamKey:"query",requestParamKey:"query"}},s=z({filterDef:m});if(!s)return{};const{deriveSearchParamsOnValuesChange:u,values:p,requestParams:a}=s;return{filterProps:{filterDef:m,onChange:({key:t,value:i})=>{n.athleteSearch({searchParams:{...u({values:{[t]:i}})}}).go()},onChangeMany:({values:t})=>{n.athleteSearch({searchParams:{...u({values:t})}}).go()},values:p}
1,requestParams:a}},W=({options:e}={})=>T([`${y.athleteSearch}_getSearchOptions`],()=>F(),e),{logImpression:P}=S("AthleteSearch","AthleteSearchCardImpression"),{logClick:g}=S("AthleteSearch","AthleteSearchCardClick"),Ue=({})=>{const[e,l]=d.useState(null),n=f(),m=D(),s=x(),u=v(),{search:{sportEnum:p}}=V();R();const{data:a,isLoading:t}=W({options:{useErrorBoundary:!0}}),i=Y({searchOptions:!t&&{...a,StateOptions:a.StateOptions.us.concat(a.StateOptions.ca),PositionOptions:p&&a.PositionOptions[p]?a.PositionOptions[p]:Object.values(a.PositionOptions).flat().filter((r,h,A)=>A.findIndex(w=>w.Value===r.Value)===h)},defaultParams:{sportEnum:"all"}}),{data:o,isLoading:b}=$({params:i&&{...i.requestParams},options:{enabled:!t,useErrorBoundary:!0}});d.useEffect(()=>{o?.PageTitle&&l(o.PageTitle)},[o?.PageTitle]);const E=(r,h)=>{o.LogId&&g&&g({profileId:r.ProfileId,logId:o.LogId,location:"public-athlete-search",label:h})},I=r=>{o.LogId&&P&&P({profileId:r.ProfileId,logId:o.LogId,location:"public-athlete-search"})};return c.jsxs(c.Fragment,{children:[c.jsx(U,{title:e}),c.jsx(B,{children:c.jsx(k,{heading:"Athletes",filterPropsIsLoading:t,filterProps:i?.filterProps,listSkeletonRendering:K,listIsLoading:b,listRendering:c.jsx(q,{publicPage:!0,data:o,generateAthleteSearchClearedWiredLinkProps:()=>n.athleteSearch({searchParams:{}}).wiredLinkProps,generateCommitmentStoryLinkProps:r=>u.commitmentsDetail({pathParams:{username:r.Username,sport:r.SportEnum.Value.toLowerCase(),id:r.LastCommitmentId}}).wiredLinkProps,generateCommitmentTeamOrganizationTeamPageLinkProps:r=>m.organizationTeamOverviewPage({pathParams:{shortName:r.ShortName||"",sportEnum:r.SportEnum.Value.toLowerCase()}}).wiredLinkProps,generateProfileDetailProps:r=>s.profileDetail({pathParams:{id:r.Username,sportEnum:r.SportEnum.Value.toLowerCase()},searchParams:{tab:"performance"}}).wiredLinkProps,generateProfileVideoProps:r=>s.profileVideosList({pathParams:{id:r.Username,sportEnum:r.SportEnum.Value.toLowerCase()}}).wiredLinkProps,generateProfileLinkProps:r=>s.profileDetail({pathParams:{id:r.Username,sportEnum:r.SportEnum.Value.toLowerCase()}}).wiredLinkProps,onItemClicked:E,onItemImpression:I}),pagingControlsRendering:o&&c.jsx(O,{buildLinkProps:({page:r})=>n.athleteSearch({searchParams:{...i.requestParams,page:r}}).wiredLinkProps,currentPage:o.Results.Page,totalPages:o.Results.TotalPageCount})})})]})};export{Ue as default};
2//# sourceMappingURL=AthleteSearchPage-fQT_oXAK.js.map

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.