PageSourceSearch

https://www.fairfootball.ai/assets/SelectLeagueScout-d35d0959.js

js fairfootball.ai collected 2026-10-05 15:19:30 UTC 6,566 bytes, 1 lines download raw bytes

1import{j as e,F as a,a as r}from"./vendor-animation-428022f4.js";import{r as t,u as s,e as c}from"./vendor-react-60b2ddf1.js";import{c as o,a as l}from"./check_box_selected-46d5ff38.js";import{L as n}from"./LeagueCard-e3bbaae0.js";import{Q as i}from"./vendor-ui-722eb924.js";import{u,z as d,S as p,N as m,K as g,C as h,F as f,aj as L,j as S}from"./index-bebc22d9.js";import{u as _}from"./useSEOAccess-aad0a7c6.js";import{S as y}from"./ScoutLeaguesModal-f3681731.js";import"./imageFallbacks-ffd2b4c7.js";import"./vendor-forms-28fcec82.js";import"./vendor-query-7477f658.js";import"./BetaSquarePattern-5fe48540.js";import"./select-81350702.js";import"./unCheckedBox-42dc816d.js";const v="_mainContainer_1dsx3_1",x="_chooseLeagueContainer_1dsx3_87",b="_otherLeagues_1dsx3_104",C="_subscribedLeagues_1dsx3_112",N="_inboxHeader_1dsx3_121",j="_inboxTitle_1dsx3_128",k="_selectAllSection_1dsx3_139",A="_unSelectAllSection_1dsx3_150",P="_leagueCardsContainer_1dsx3_161",T="_mainTitle_1dsx3_179",w="_disabledButton_1dsx3_194",O="_activeButton_1dsx3_211",E="_bgGradient_1dsx3_229";function R(){var R;const{t:B}=u(),[F,M]=t.useState(!1),I=s(),q=c(),{checkActionAccess:U,userType:z}=_(),G=(null==(R=I.state)?void 0:R.tool)||(()=>{const e=I.pathname;return e.includes("select-scout-league-reports")?"search-player":e.includes("select-compare-league")?"compare-player":e.includes("select-player-performance-league")?"player-performance-report":e.includes("select-match-performance-league")?"match-performance-report":e.includes("select-league-performance-league")?"league-performance-report":null})()||new URLSearchParams(I.search).get("tool"),[H,K]=t.useState([]),[V,$]=t.useState([]),[D,J]=t.useState(!1),[Q,W]=t.useState(!1),{userPlan:X,scoutLeagues:Y,subscribedScoutLeagues:Z,subscribedScoutLeaguesObjArr:ee,filterLeaguesForScout:ae}=d(),re={"compare-player":B("selectLeagueScout.headerTextComparePlayer"),"search-player":B("selectLeagueScout.headerTextSearchPlayer"),"league-performance-report":B("selectLeagueScout.headerTextLeaguePerformanceReport"),"player-performance-report":B("selectLeagueScout.headerTextPlayerPerformanceReport"),"match-performance-report":B("selectLeagueScout.headerTextMatchPerformanceReport"),"league-performance-video-report":B("selectLeagueScout.headerTextLeaguePerformanceVideoReport")},[te,se]=t.useState([]),[ce,oe]=t.useState([]),le=e=>L(e);function ne(){q("search-player"===G?"/dashboard/advanced-search":"compare-player"===G?"/dashboard/player-select-compare":"league-performance-report"===G?"/dashboard/league-scout-report-match-days":"player-performance-report"===G?"/dashboard/player-performance-search-player":"match-performance-report"===G?"/dashboard/match-scout-report-match-days":"league-performance-video-report"===G?"/dashboard/league-scout-report-video-match-days":"/dashboard/scout-tools",{state:{leagues:H}})}t.useEffect(()=>{if(("non-user"===z||"free"===z||"basic"===z)&&Y&&Y.length>0){const e=le([...Y]);oe(e),se([])}else if(ee&&Y&&Z){oe(le([...ee]));const e=Y.filter(e=>!Z.includes(e._id));se(le([...e]))}},[ee,Y,Z,z,H.length]),t.useEffect(()=>{Z&&Array.isArray(Z)&&le([...Z])},[Z]),t.useEffect(()=>{"search-player"===G&&sessionStorage.removeItem("advancedSearchCriteria")},[G]),t.useEffect(()=>{const e=e=>{"Enter"===e.key&&("player-performance-report"===G?H.length>0&&H.length<2?ne():i.warning(B("selectLeagueScout.mustChooseOneLeague")):H.length>0?ne():i.warning(B("selectLeagueScout.mustChooseAtLeastOneLeague")))};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[H,G]);const ie=S("search-player"===G?"selectScoutLeagueReports":"compare-player"===G?"selectCompareLeague":"player-performance-report"===G?"selectPlayerPerformanceLeague":"match-performance-report"===G?"selectMatchPerformanceLeague":"league-performance-report"===G?"selectLeaguePerformanceLeague":"selectScoutLeague");return e(a,{children:[r(y,{isOpen:Q,onClose:()=>W(!1),onConfirm:function(){W(!1),q("/dashboard/custom-plan-leagues",{state:{leagues:V}})},isLoading:!1}),e("div",{className:v,children:[r(p,{title:ie.title,description:ie.description,keywords:ie.keywords,canonical:ie.canonical}),r(m,{setIsSidebarOpen:M}),r(g,{isSidebarOpen:F,setIsSidebarOpen:M}),r("div",{className:E}),e("div",{className:x,children:[e("h1",{className:T,children:[" ",re[G]," "]}),e("div",{className:C,children:[e("div",{className:N,children:[r("span",{className:j,children:B("selectLeagueScout.selectLeaguesFromSubscription")}),"player-performance-report"!=G&&ce.length>0&&e("div",{className:D?A:k,onClick:()=>{K(D?[]:ce),J(!D)},children:[e("div",{children:[" ",B(D?"selectLeagueScout.unselectAll":"selectLeagueScout.selectAll")," "]}),r("img",{src:D?o:l,alt:B("selectLeagueScout.checkBoxAlt")})]})]}),ce.length>0?r("div",{className:P,children:ce.map(e=>r(n,{type:"subscribed",handleLeagueSelection:()=>(e=>{const a=H.some(a=>a._id===e._id);K(r=>a?r.filter(a=>a._id!==e._id):[...r,e])})(e),isSelected:H.some(a=>a._id===e._id),tool:G,league:e},e._id))}):r("p",{children:B("selectLeagueScout.noSubscribedLeagues")}
1),r("div","player-performance-report"===G?{style:{marginTop:"50px"},children:H.length>0&&H.length<2?r("div",{style:{display:"flex",placeContent:"center"},children:r("span",{className:`${O} pointer`,onClick:ne,children:B("selectLeagueScout.continue")})}):r("div",{style:{display:"flex",placeContent:"center"},children:r("span",{className:w,onClick:()=>{i.warning(B("selectLeagueScout.mustChooseOneLeague"))},children:B("selectLeagueScout.continue")})})}:{style:{marginTop:"50px"},children:H.length>0?r("div",{style:{display:"flex",placeContent:"center"},children:r("span",{className:O,onClick:ne,children:B("selectLeagueScout.continue")})}):r("div",{style:{display:"flex",placeContent:"center"},children:r("span",{className:w,onClick:()=>{i.warning(B("selectLeagueScout.mustChooseAtLeastOneLeague"))},children:B("selectLeagueScout.continue")})})})]}),X===h.PLANS.CUSTOM&&e("div",{className:b,children:[r("span",{className:j,children:B("selectLeagueScout.subscribeToMoreLeagues")}),te.length>0?r("div",{className:P,children:te.map(e=>r(n,{handleLeagueSelection:()=>(e=>{const a=V.some(a=>a._id===e._id);$(r=>a?r.filter(a=>a._id!==e._id):[...r,e])})(e),isSelected:V.some(a=>a._id===e._id),tool:G,league:e},e._id))}):r("p",{children:B("selectLeagueScout.noOtherLeagues")}),V.length>0&&r("div",{style:{display:"flex",placeContent:"center",marginTop:"36px"},children:r("span",{className:O,onClick:function(){W(!0)},children:B("selectLeagueScout.proceedToCheckout")})})]}),r("div",{})]}),r(f,{})]})]})}export{R 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.