PageSourceSearch

https://www.wrexhamafc.co.uk/_nuxt/CH-08hMu.js

js wrexhamafc.co.uk collected 2026-10-02 02:47:58 UTC 4,549 bytes, 1 lines download raw bytes

1import{PageElementBase as c}from"./CTfzp0o-.js";import{C as l,z as p,k as r}from"./s0RbKMZK.js";import{d}from"./ghde6Rcn.js";import"./CATxlt2j.js";import"./CXTOca8g.js";import"./0xmjySIm.js";class m extends c{constructor(e="root",t={}){var n,i,s,o,u;super(e,t),this.widgetType="CardFixtureUpcoming",this.widgetName="Upcoming Fixture",this.component="CardFixtureUpcoming",this.cmsComponent="CardFixtureUpcoming",this.icon={icon:"upcoming",pack:"cms"},this.pseudoWidgetType="card",this.contentFill="auto-fill",this.teamOptions=[],this.competitionOptions=[],this.seasonOptions=[],this.buttons=[],this.buttonLinkInputs=[],this.loading=!1,this.buildStyleFields=()=>[{heading:"Theme",options:[{type:"radio",subType:"list",attributeKey:"theme",options:[{label:"Light",id:"light"},{label:"Dark",id:"dark"},{label:"Accent",id:"club"}]}]}],this.getSidebarTabs=a=>[{name:"Layout",fields:this.buildLayoutFields(),disabled:!0},{name:"Content",fields:this.buildContentFields(a),default:!0},{name:"Style",fields:this.buildStyleFields()}],this.query=l({method:((n=t.query)==null?void 0:n.method)||"getById",seasonID:((i=t.query)==null?void 0:i.seasonID)||null,competitionID:((s=t.query)==null?void 0:s.competitionID)||null,teamID:((o=t.query)==null?void 0:o.teamID)||null,offset:((u=t.query)==null?void 0:u.offset)??0}),this.contentFill=t.contentFill??"auto-fill",this.theme=t.theme??"light",this.background=t.background??{image:void 0,color:void 0},this.buttons=l(t.buttons??[{title:"",display:!1,action:"",type:"secondary",icon:{icon:"",pack:"fan"}},{title:"",display:!1,action:"",type:"secondary",icon:{icon:"",pack:"fan"}}]),t.buttons?t.buttons.forEach((a,h)=>
1{this.buttonLinkInputs[h]={url:a.action,type:a.linkType||"internal"}}):this.buttonLinkInputs=l([{url:"",type:"internal"},{url:"",type:"internal"}])}serializeElement(){return{...super.serializeBaseElement(),contentFill:this.contentFill,query:this.query,theme:this.theme,background:this.background,buttons:this.buttons.map((e,t)=>{var n,i;return{...e,action:((n=this.buttonLinkInputs[t])==null?void 0:n.url)||"",linkType:((i=this.buttonLinkInputs[t])==null?void 0:i.type)||"internal"}})}}buildContentFields(e){return[{type:"tabs",tabsOptions:{variant:"fill"},tabs:[{title:"Auto-Fill",value:"auto-fill",index:0,options:[{heading:"Team",type:"select",attributeKey:["query","teamID"],placeholder:"Select team",items:this.fetchTeamOptions()},{heading:"Competition",type:"select",attributeKey:["query","competitionID"],placeholder:"Select competition",disabled:!(e!=null&&e.query.teamID),items:this.fetchCompetitionOptions(),callback:()=>{e.query.seasonID=null,this.seasonOptions=[]}},{heading:"Season",type:"select",attributeKey:["query","seasonID"],placeholder:"Select season",disabled:!(e!=null&&e.query.competitionID),items:this.fetchSeasonOptions(e)},{heading:"Listing Offset",subHeading:"Determines which position in the listing to populate from. e.g. ‘5’ will populate from the 5th item in the listing.",type:"number",min:0,max:50,attributeKey:["query","offset"]}]},{title:"Manual Fill",value:"manual-fill",disabled:!0,index:1,options:[]}],options:[]}]}fetchTeamOptions(){const{$gc:e}=p();return this.teamOptions.length?this.teamOptions:e().clientTeamDefaultsWeb.fetchClientTeamDefaults().then(t=>(this.teamOptions=t.data.map(n=>{var i;return{name:((i=n.attributes)==null?void 0:i.teamName)||"",id:n.id}}),this.query.teamID||(this.query.teamID=this.teamOptions[0].id),this.teamOptions))}fetchSeasonOptions(e){const{$gc:t}=p(),n=r().public.club.sport;return n==="football"?[]:n==="rugbyleague"&&e.query.competitionID?this.seasonOptions.length?this.seasonOptions:t().competitionsWeb.fetchCompetitionSeasons(e.query.competitionID).then(i=>(this.seasonOptions=i.data.map(s=>{var o;return{name:((o=s.attributes)==null?void 0:o.seasonName)||"",id:s.id}}),this.query.seasonID||(this.query.seasonID=this.seasonOptions[0].id),this.seasonOptions)):[]}fetchCompetitionOptions(){const{$gc:e}=p(),t=r().public.club.sport;return t==="football"?[]:t==="rugbyleague"?this.competitionOptions.length?this.competitionOptions:e().competitionsWeb.fetchAllCompetitions().then(n=>(this.competitionOptions=[{name:"All Competitions",id:null,code:null},...n.data.map(i=>{var s,o;return{name:((s=i.attributes)==null?void 0:s.competitionName)||"",id:i.id,code:((o=i.attributes)==null?void 0:o.competitionCode)||""}})],this.query.competitionID||(this.query.competitionID=this.competitionOptions[0].id),this.competitionOptions)):[]}duplicateElement(){return new m(this.parentID,d({...this,uuid:void 0}))}}export{m 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.