PageSourceSearch

https://www.mercontrol.com/_next/static/chunks/6841.261d3a7a28f0519d.js

js mercontrol.com collected 2026-10-02 21:04:29 UTC 10,239 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6841],{16841:(e,s,a)=>{a.r(s),a.d(s,{SportsResultAutoWithAds:()=>u});var l=a(95155),t=a(12115),o=a(9446),d=a(20003),i=a(26223),r=a(92716),c=a(46279),n=a(23959),m=a(64123),x=a(76951),p=a(3879);let h=e=>{if(null==e||""===e)return null;let s="string"==typeof e?parseInt(e,10):e;return isNaN(s)?null:s};function u(e){let{data:s,blockIsFirst:a,globalData:u}=e,[f,j]=(0,t.useState)([]),[g,N]=(0,t.useState)(!0),[b,v]=(0,t.useState)(null),y=(0,p.A)(),I=(0,c.o)(s.blockStyle?.color),k=u?.externalServices?.googleAdSenseId,M=s.leftSidebarAd,S=s.rightSidebarAd,w=(0,t.useCallback)(e=>e?"multiple"===e.displayMode&&e.adsDesktop?e.adsDesktop.map(e=>e?.slotId||null):e.slotIdDesktop?[e.slotIdDesktop]:[]:[],[]),T=(0,t.useCallback)(e=>e?"multiple"===e.displayMode&&e.adsMobile?e.adsMobile.map(e=>e?.slotId||null):e.slotIdMobile?[e.slotIdMobile]:[]:[],[]),_=(0,t.useMemo)(()=>w(M),[M,w]),$=(0,t.useMemo)(()=>T(M),[M,T]),q=(0,t.useMemo)(()=>w(S),[S,w]),A=(0,t.useMemo)(()=>T(S),[S,T]);(0,t.useEffect)(()=>{s.seasonId&&s.gameTypeId&&s.competitionId&&s.groupId?(async()=>{N(!0),v(null);try{let e=new URLSearchParams({temporada:s.seasonId,tipojuego:s.gameTypeId,competicion:s.competitionId,grupo:s.groupId}),a=await fetch(`/api/rfef/calendar?${e.toString()}`);if(!a.ok)throw Error("No se pudo obtener los datos. Es posible que los datos introducidos no sean correctos. Por favor, rev\xedselos o int\xe9ntelo m\xe1s tarde.");let l=await a.json();if(!l.success||!l.jornadas)throw Error("No matchday data found");let t=[];l.jornadas.forEach(e=>{let s=[];e.equipos&&Array.isArray(e.equipos)&&e.equipos.forEach(e=>{let a=e.campo?.replace(/\(ha\)\s*\(ha\)$/i,"").trim();s.push({localTeam:{name:e.equipo_local||"Equipo Local",score:h(e.goles_casa),shieldUrl:e.escudo_equipo_local?`https://appweb.rffm.es${e.escudo_equipo_local}`:void 0},visitorTeam:{name:e.equipo_visitante||"Equipo Visitante",score:h(e.goles_visitante),shieldUrl:e.escudo_equipo_visitante?`https://appweb.rffm.es${e.escudo_equipo_visitante}`:void 0},date:e.fecha,time:e.hora,place:a})}),t.push({matchdayNumber:e.codjornada,matchdayName:`Jornada ${e.jornada}`,matches:s})}),j(t)}catch(e){v(e.message||"Error al cargar los resultados. Verifica que los IDs sean correctos.")}finally{N(!1)}})():(N(!1),v("Por favor, completa todos los campos de ID requeridos (*)."),j([]))},[s.seasonId,s.gameTypeId,s.competitionId,s.groupId]);let L=M?.displayMode==="fixed"?!!M?.slotIdDesktop||!!M?.slotIdMobile:_.length>0||$.length>0,C=S?.displayMode==="fixed"?!!S?.slotIdDesktop||!!S?.slotIdMobile:q.length>0||A.length>0,D=M?.enabled&&(y||L),E=S?.enabled&&(y||C);return(0,l.jsx)(d.w,{blockStyle:s.blockStyle,textForAnchor:s.title||void 0,blockIsFirst:a,imagesHavePriority:!1,"data-tina-field":(0,r.HH)(s),children:(0,l.jsxs)(o.m,{blockStyle:s.blockStyle,verticalSpacing:(0,n.g)(s.blockStyle?.verticalSpacing),children:[(0,l.jsx)(i.T,{data:s,blockColor:I,blockIsFirst:a}),D&&(0,l.jsx)("div",{className:"md:hidden mb-4 flex justify-center",children:(0,l.jsx)(x.w,{googleAdSenseId:k||void 0,slotId:M?.displayMode==="fixed"&&M?.slotIdMobile||void 0,slotIds:M?.displayMode==="multiple"?$:void 0,displayMode:M?.displayMode,isMobile:!0})}),(0,l.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 md:gap-6 -mt-2",children:[D&&(0,l.jsx)("div",{className:`hidden md:flex md:flex-shrink-0 ${M?.displayMode==="multiple"?"items-center":""}`,children:(0,l.jsx)(x.w,{googleAdSenseId:k||void 0,slotId:M?.displayMode==="fixed"&&M?.slotIdDesktop||void 0,slotIds:M?.displayMode==="multiple"?_:void 0,displayMode:M?.displayMode,isMobile:!1})}),(0,l.jsx)("div",{className:"flex-1 min-w-0",children:(0,l.jsxs)("div",{className:"mt-8",children:[g&&(0,l.jsx)("p",{className:"text-center text-gray-500 animate-pulse",children:"Cargando resultados..."}),b&&(0,l.jsx)("p",{className:"text-center text-red-600 font-semibold p-4 bg-red-50 border border-red-200 rounded-md",children:b}),!g&&!b&&f.length>0&&(0,l.jsx)("div",{className:"space-y-8",children:f.map((e,a)=>(0,l.jsx)(m.j,{tournament:{tournamentName:e.matchdayName,results:e.matches.map(e=>({team1Name:e.localTeam.name,team1Score:null!==e.localTeam.score?String(e.localTeam.score):"",team1Logo:e.localTeam.shieldUrl,team2Name:e.visitorTeam.name,team2Score:null!==e.visitorTeam.score?String(e.visitorTeam.score):"",team2Logo:e.visitorTeam.shieldUrl,date:e.date,time:e.time,place:e.place}))},blockAlign:s.blockStyle?.align||"center",blockColor:I},e.matchdayNumber||a))})]})}),E&&(0,l.jsx)("div",{className:`hidden md:flex md:flex-shrink-0 ${S?.displayMode==="multiple"?"items-center":""}`,children:(0,l.jsx)(x.w,{googleAdSenseId:k||void 0,slotId:S?.displayMode==="fixed"&&S?.slotIdDesktop||void 0,slotIds:S?.displayMode==="multiple"?q:void 0,displayMode:S?.displayMode,isMobile:!1})})]}),E&&(0,l.jsx)("div",{className:"md:hidden mt-4 flex justify-center",children:(0,l.jsx)(x.w,{googleAdSenseId:k||void 0,slotId:S?.displayMode==="fixed"&&S?.slotIdMobile||void 0,slotIds:S?.displayMode==="multiple"?A:void 0,displayMode:S?.displayMode,isMobile:!0})})]})})}},64123:(e,s,a)=>{a.d(s,{j:()=>r});var l=a(95155);a(12115);var t=a(82712),o=a(66766);let d=e=>{let{result:s}=e,a=e=>e?"string"==typeof e?e:e?.url||"/uploads/default-team-logo.png":"/uploads/default-team-logo.png";return(0,l.jsxs)("div",{className:"bg-white rounded-lg p-2 sm:p-4 shadow-sm border border-gray-200",children:[(0,l.jsxs)("div",{className:"sm:hidden",children:[(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 flex-1 min-w-0",children:[s.team1Logo&&(0,l.jsx)("div",{className:"w-10 h-8 relative flex-shrink-0",children:(0,l.jsx)(o.default,{src:a(s.team1Logo),alt:`${s.team1Name||"Team 1"} logo`,fill:!0,className:"object-contain rounded"})}),(0,l.jsx)("span",{className:"font-semibold text-gray-900 truncate text-sm",children:s.team1Name||"Team 1"})]}),(0,l.jsx)("span",{className:"text-xl font-bold text-gray-900 ml-2",children:""!==s.team1Score?s.team1Score:" "})]}),(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 flex-1 min-w-0",children:[s.team2Logo&&(0,l.jsx)("div",{className:"w-10 h-8 relative flex-shrink-0",children:(0,l.jsx)(o.default,{src:a(s.team2Logo),alt:`${s.team2Name||"Team 2"} logo`,fill:!0,className:"object-contain rounded"})}),(0,l.jsx)("span",{className:"font-semibold text-gray-900 truncate text-sm",children:s.team2Name||"Team 2"})]}),(0,l.jsx)("span",{className:"text-xl font-bold text-gray-900 ml-2",children:""!==s.team2Score?s.team2Score:" "})]})]}),(s.date||s.time||s.place)&&(0,l.jsxs)("div",{className:"mt-2 flex flex-col gap-1 text-xs text-gray-500 px-2",children:[(s.date||s.time)&&(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[s.date&&(0,l.jsx)("span",{className:"flex-shrink-0",children:s.date}),s.date&&s.time&&(0,l.jsx)("span",{children:"•"}),s.time&&(0,l.jsx)("span",{className:"flex-shrink-0",children:s.time})]}),s.place&&(0,l.jsx)("span",{className:"truncate",children:s.place})]})]}),(0,l.jsxs)("div",{className:"hidden sm:flex flex-col",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-3 flex-1 min-w-0",children:[s.team1Logo&&(0,l.jsx)("div",{className:"w-10 h-10 relative flex-shrink-0",children:(0,l.jsx)(o.default,{src:a(s.team1Logo),alt:`${s.team1Name||"Team 1"} logo`,fill:!0,className:"object-contain rounded"})}),(0,l.jsx)("span",{className:"font-semibold text-gray-900 truncate",children:s.team1Name||"Team 1"})]}),(0,l.jsxs)("div",{className:"flex items-center space-x-2 sm:space-x-4 px-2 sm:px-4 flex-shrink-0",children:[(0,l.jsx)("div",{className:"text-center",children:(0,l.jsx)("span",{className:"text-xl sm:text-2xl font-bold text-gray-900",children:""!==s.team1Score?s.team1Score:" "})}),(0,l.jsx)("div",{className:"text-gray-400 font-bold text-lg sm:text-xl",children:"-"}),(0,l.jsx)("div",{className:"text-center",children:(0,l.jsx)("span",{className:"text-xl sm:text-2xl font-bold text-gray-900",children:""!==s.team2Score?s.team2Score:" "})})]}),(0,l.jsxs)("div",{className:"flex items-center space-x-3 flex-1 min-w-0 justify-end",children:[(0,l.jsx)("span",{className:"font-semibold text-gray-900 truncate text-right",children:s.team2Name||"Team 2"}),s.team2Logo&&(0,l.jsx)("div",{className:"w-10 h-10 relative flex-shrink-0",children:(0,l.jsx)(o.default,{src:a(s.team2Logo),alt:`${s.team2Name||"Team 2"} logo`,fill:!0,className:"object-contain rounded"})})]})]}),(s.date||s.time||s.place)&&(0,l.jsxs)("div",{className:"mt-2 flex items-center justify-center gap-3 text-xs text-gray-500 min-w-0",children:[s.date&&(0,l.jsx)("span",{className:"flex-shrink-0",children:s.date}),s.date&&s.time&&(0,l.jsx)("span",{className:"flex-shrink-0",children:"•"}),s.time&&(0,l.jsx)("span",{className:"flex-shrink-0",children:s.time}),(s.date||s.time)&&s.place&&(0,l.jsx)("span",{className:"flex-shrink-0",children:"•"}),s.place&&(0,l.jsx)("span",{className:"truncate",children:s.place})]})]})]})};var i=a(71328);let r=e=>{let{tournament:s,blockAlign:a="center",blockColor:o}=e,r=(0,t.D)(),c=(0,i.VH)(a,{fallback:"center"}),n=(0,i.Ju)(a,{fallback:"center"}
1),m=o?r.colorClasses.title[o]:r.colorClasses.title.default,x=o?r.colorClasses.sectionText[o]:r.colorClasses.sectionText.default;return(0,l.jsxs)("div",{className:"mb-6 sm:mb-8",children:[(0,l.jsx)("div",{className:`flex flex-col sm:flex-row sm:items-center mb-4 sm:mb-6 ${n} ${c}`,children:(0,l.jsxs)("div",{className:"w-full",children:[(0,l.jsx)("h3",{className:`text-xl sm:text-2xl font-bold mb-1 sm:mb-2 ${m}`,children:s.tournamentName||"Tournament"}),s.description&&(0,l.jsx)("p",{className:`text-xs sm:text-sm ${x} opacity-80`,children:s.description})]})}),(0,l.jsx)("div",{className:"space-y-3 sm:space-y-4",children:s.results&&s.results.length>0?s.results.map((e,s)=>e?(0,l.jsx)(d,{result:e},s):null):(0,l.jsx)("div",{className:"rounded-lg p-6 text-center border border-gray-200",children:(0,l.jsx)("p",{className:"text-gray-600",children:"No hay resultados disponibles para este torneo."})})})]})}}}]);

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.