1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9557],{1181:(e,a,l)=>{"use strict";l.d(a,{default:()=>h});var t=l(95155),n=l(12115),s=l(13149),i=l(94899),r=l(61764),o=l(42090);let c="#E32636",d=(e,a)=>{let[l,t,n]=e.split("-");return n?new Intl.DateTimeFormat(a,{day:"numeric",month:"short",year:"numeric"}).format(new Date(+l,t-1,+n)):""},u=e=>(0,o.SJ)(e),p=["triple","mate","bandeja","canasta","asistencia","robo","tapon","rebote"];function h(e){let{clips:a,espnId:l,name:o,t:h,locale:m,aviso:g,reproducible:x=!0}=e,[b,f]=(0,n.useState)("todo"),[v,j]=(0,n.useState)(null),y=(0,n.useRef)(null),[_,N]=(0,n.useState)(new Set),[w,k]=(0,n.useState)(0),S=["es","en","de","fr"].includes(m)?m:"es",C=()=>{j(null),requestAnimationFrame(()=>{var e;return null==(e=y.current)?void 0:e.focus()})},T=(0,n.useMemo)(()=>{let e=new Set(a.map(u));return["todo",...p.filter(a=>e.has(a))]},[a]),A=a.filter(e=>"todo"===b||u(e)===b);return a.length?(0,t.jsxs)("div",{className:"mt-5 rounded-2xl p-5",style:{border:"1px solid var(--line)",background:"linear-gradient(180deg,#111722,#0D1219)"},children:[(0,t.jsxs)("div",{className:"flex items-baseline gap-2 mb-1",children:[(0,t.jsx)("span",{className:"text-[11px] font-extrabold uppercase",style:{color:c,letterSpacing:"2.4px"},children:h.title}),(0,t.jsx)("span",{className:"text-[11px] font-bold",style:{color:"#646D7A"},children:h.kicker})]}),(0,t.jsx)("p",{className:"text-[12.5px] mb-4",style:{color:"#8B93A1"},children:h.lead}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mb-4",children:T.map(e=>(0,t.jsx)("button",{onClick:()=>f(e),className:"text-[12px] rounded-full px-3.5 py-1.5 uppercase transition-colors",style:{fontFamily:"'Barlow Condensed',sans-serif",letterSpacing:".1em",border:"1px solid ".concat(b===e?c:"rgba(255,255,255,.14)"),color:b===e?"#fff":"#8592A6",background:b===e?"rgba(227,38,54,.12)":"transparent"},children:"todo"===e?h.all:h.kindsPlural[e]},e))}),g&&(0,t.jsx)("p",{className:"text-[11.5px] rounded-lg px-3 py-2 mb-3",style:{color:"#DDE2EA",background:"rgba(227,38,54,.10)",border:"1px solid rgba(227,38,54,.28)"},children:g}),(0,t.jsx)("div",{className:"grid gap-3",style:{gridTemplateColumns:"repeat(auto-fill,minmax(230px,1fr))"},children:A.map((e,a)=>{let l=u(e);return(0,t.jsxs)("button",{onClick:a=>{y.current=a.currentTarget,j(e)},className:"group text-left rounded-xl overflow-hidden flex flex-col transition-transform hover:-translate-y-[3px]",style:{border:"1px solid rgba(240,241,243,.08)",background:"linear-gradient(160deg,#141b26,#0B0E15)"},children:[(0,t.jsxs)("div",{className:"relative aspect-video",style:{background:"linear-gradient(160deg,#1b2534,#0B0E15)"},children:[e.thumb&&(0,t.jsx)("img",{src:e.thumb,alt:"",loading:"lazy",referrerPolicy:"no-referrer",className:"absolute inset-0 w-full h-full object-cover",style:{filter:"saturate(.92)"}}),(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute inset-0",style:{background:"linear-gradient(180deg, rgba(6,9,14,.12), rgba(6,9,14,.6))"}}),(0,t.jsx)("span",{className:"absolute inset-0 flex items-center justify-center",children:(0,t.jsx)("span",{className:"flex items-center justify-center rounded-full transition-transform group-hover:scale-110",style:{width:44,height:44,background:"rgba(227,38,54,.94)",boxShadow:"0 0 22px rgba(227,38,54,.5)"},children:(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"#fff",children:(0,t.jsx)("path",{d:"M8 5v14l11-7z"})})})}),(0,t.jsx)("span",{className:"absolute left-2 bottom-2 text-[10px] uppercase px-1.5 py-0.5 rounded",style:{fontFamily:"'Barlow Condensed',sans-serif",letterSpacing:".12em",color:"triple"===l||"mate"===l?"#ffd7da":"#DDE2EA",background:"rgba(6,9,14,.66)"},children:h.kinds[l]}),e.ms>0&&(0,t.jsxs)("span",{className:"absolute right-2 bottom-2 text-[10px] tabular-nums px-1.5 py-0.5 rounded",style:{color:"#DDE2EA",background:"rgba(6,9,14,.66)"},children:[Math.round(e.ms/1e3),"s"]})]}),(0,t.jsxs)("div",{className:"p-3.5 flex flex-col gap-1",children:[(0,t.jsx)("p",{className:"text-[12.5px] leading-snug",style:{color:"#E9EDF4"},children:(0,i.Dv)(e.desc,m,e.ctx)}),(0,t.jsx)("p",{className:"text-[10.5px]",style:{color:"#5A626E"},children:d(e.date,m)})]})]},a)})}),(0,t.jsx)("p",{className:"text-[10.5px] mt-4",style:{color:"#5A626E"},children:h.note}),v&&(0,t.jsx)("div",{onClick:C,className:"fixed inset-0 z-50 flex items-center justify-center p-4",style:{background:"rgba(3,5,9,.88)",backdropFilter:"blur(4px)"},children:(0,t.jsxs)("div",{onClick:e=>e.stopPropagation(),className:"w-full max-w-3xl rounded-2xl overflow-hidden",style:{border:"1px solid rgba(227,38,54,.3)",background:"#0B0E15"},children:[(0,t.jsx)(r.A,{url:v.url,idioma:S,error:_.has(v.url),intento:w,onError:()=>{let e;return e=v.url,N(a=>a.has(e)?a:new Set([...a,e]))},onReintentar:()=>{var e;return e=v.url,void(N(a=>
1{let l=new Set(a);return l.delete(e),l}),k(e=>e+1))},onVolver:C},"".concat(v.url,"#").concat(w)),(0,t.jsxs)("div",{className:"flex items-center gap-3 p-3.5",children:[(0,t.jsx)("img",{src:(0,s.P6)((0,s.Qg)(l),32),alt:"",loading:"lazy",referrerPolicy:"no-referrer",className:"w-8 h-8 rounded-full object-cover shrink-0",style:{background:"#141a24"}}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"text-[13px] font-bold text-white truncate",children:(0,i.Dv)(v.desc,m,v.ctx)}),(0,t.jsxs)("p",{className:"text-[10.5px]",style:{color:"#8FB3CC"},children:[o," \xb7 ",d(v.date,m)]})]}),(0,t.jsx)("button",{onClick:C,className:"ml-auto shrink-0 text-[12px] font-bold rounded-full px-3.5 py-1.5",style:{border:"1px solid rgba(255,255,255,.2)",color:"#DDE2EA"},children:h.close})]})]})})]}):null}},8908:(e,a,l)=>{"use strict";l.d(a,{Dr:()=>u,Oi:()=>h,Vt:()=>c,ec:()=>p,yx:()=>d});var t=l(75532),n=l(44830);let s={jugador:[{clave:"jugador.estilo",ligas:["nba","wnba","euroleague","eurocup","acb","feb"]},{clave:"jugador.evolucion",ligas:["nba","euroleague","acb"]},{clave:"jugador.evolucion",ligas:["eurocup"],idiomas:["es","en","de"]},{clave:"jugador.carrera",ligas:["nba","euroleague"]}],tracking:[{clave:"jugador.corre",ligas:["nba"]},{clave:"jugador.toques",ligas:["nba"]},{clave:"jugador.estilo",ligas:["nba"]}],equipo:[{clave:"equipo.rotacion",ligas:["nba","acb"]},{clave:"equipo.movimientos",ligas:["nba","euroleague"],idiomas:["es","en","fr"]},{clave:"equipo.entrenador",ligas:["nba"]},{clave:"liga.clasificacion",ligas:["euroleague","acb"]}],partido:[{clave:"partido.parciales",ligas:["nba"]},{clave:"partido.final",ligas:["nba"]}],liga:[{clave:"liga.clasificacion",ligas:["euroleague","acb"]},{clave:"liga.anotador",ligas:["euroleague","acb"]},{clave:"liga.record",ligas:["euroleague","acb"]}],pareja:[{clave:"pareja.temporada",ligas:["nba"]},{clave:"pareja.carrera",ligas:["nba"]}]},i={"euroleague:monaco":["equipo.movimientos"],"acb:casademont zaragoza":["equipo.rotacion"],"acb:kosner baskonia":["equipo.rotacion"]},r=(e,a)=>"".concat(e,":").concat(a.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").trim()),o=e=>{var a;return e&&(null==(a=/^(\d{4})/.exec(e))?void 0:a[1])||void 0};function c(e){var a;let l=e.split("?")[0].split("/").filter(Boolean);["en","de","fr"].includes(l[0])&&l.shift();let t=null!=(a=l[0])?a:"";return"euroliga"===t?"euroleague":"eurocup"===t?"eurocup":"acb"===t?"acb":"feb"===t?"feb":"wnba"===t?"wnba":["club","ncaa","gleague"].includes(t)?"otra":"nba"}function d(e){var a,l,t,s;let i="otra"===e.liga?void 0:e.liga;switch(e.tipo){case"jugador":return{source:e.tracking?"tracking":"jugador",entityType:"jugador",entityId:null!=(a=e.id)?a:void 0,entityName:e.nombre,competition:i,route:e.ruta,volver:e.ruta};case"equipo":return{source:"equipo",entityType:"equipo",entityId:null!=(l=e.id)?l:void 0,entityName:e.nombre,competition:i,season:o(e.temporada),route:e.ruta,volver:e.ruta};case"partido":return{source:"partido",entityType:"partido",entityId:null!=(t=e.id)?t:void 0,entityName:"".concat(e.local," - ").concat(e.visitante),competition:i,route:e.ruta,volver:e.ruta};case"liga":return{source:"liga",entityType:"liga",entityName:null==(s=n.MM[e.liga])?void 0:s.es,competition:i,season:o(e.temporada),route:e.ruta,volver:e.ruta};case"pareja":return{source:"comparar",entityType:"pareja",entityName:"".concat(e.a," \xb7 ").concat(e.b),competition:i,season:o(e.temporada),route:e.ruta,volver:e.ruta}}}let u=(e,a)=>{var l,t;return"jugador"===e.tipo||"equipo"===e.tipo?e.nombre:"partido"===e.tipo?"".concat(e.local," - ").concat(e.visitante):"pareja"===e.tipo?"".concat(e.a," \xb7 ").concat(e.b):null!=(t=null==(l=n.MM[e.liga])?void 0:l[a])?t:""};function p(e,a){var l,o,c;if("otra"===e.liga)return[];let u="jugador"===e.tipo&&e.tracking?"tracking":e.tipo;if("partido"===e.tipo&&!e.ultimo)return[];let p="equipo"===e.tipo||"liga"===e.tipo||"pareja"===e.tipo?e.temporada||function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,a=e.getUTCMonth()>=6?e.getUTCFullYear()-1:e.getUTCFullYear()-2;return"".concat(a,"-").concat(String((a+1)%100).padStart(2,"0"))}():null,h="jugador"===e.tipo||"equipo"===e.tipo?{n:e.nombre,t:p,liga:null==(l=n.MM[e.liga])?void 0:l[a]}:"partido"===e.tipo?{a:e.local,b:e.visitante}:"pareja"===e.tipo?{a:e.a,b:e.b,t:p}:{liga:null==(o=n.MM[e.liga])?void 0:o[a],t:p},m=d(e),g=[],x=new Set;for(let l of s[u]){if(!l.ligas.includes(e.liga)||l.idiomas&&!l.idiomas.includes(a)||"pareja"===e.tipo&&"pareja.temporada"===l.clave&&(e.soloCarrera||!e.temporada)||("jugador"===e.tipo||"equipo"===e.tipo)&&(null==(c=i[r(e.liga,e.nombre)])?void 0:c.includes(l.clave)))continue;let s=(0,n.ww)(n.Mc[l.clave][a],h);if(!(!s||x.has(s))&&(x.add(s),g.push({clave:l.clave,pregunta:s,href:(0,t.be)({locale:a,pregunta:s,contexto:m})}),g.length>=3))break}return g}function h(e){var a,l,t,n,s;if(!(null==e?void 0:e.entityName))return null;let i=null!=(a=["nba","wnba","euroleague","eurocup","acb","feb"].find(a=>a===e.competition))?a:null;if(!i)return null;let r=null!=(t=null!=(l=e.volver)?l:e.route)?t:"/analista";return"jugador"===e.entityType?{tipo:"jugador",nombre:e.entityName,id:null!=(n=e.entityId)?n:null,liga:i,ruta:r,tracking:"tracking"===e.source}:"equipo"===e.entityType?{tipo:"equipo",nombre:e.entityName,id:null!=(s=e.entityId)?s:null,liga:i,ruta:r,temporada:e.season?"".concat(e.season,"-").concat(String((Number(e.season)+1)%100).padStart(2,"0")):null}:null}},9557:(e,a,l)=>{"use strict";l.r(a),l.d(a,{CuerpoDelMensaje:()=>Y,EscucharAnswer:()=>L,MiniMarkdown:()=>U,ResourcesStrip:()=>V,SeguimientosDelMensaje:()=>Z,ShareAnswer:()=>W,default:()=>X,llevaAStudio:()=>
1G,mensajeDeRespuesta:()=>Q});var t=l(95155),n=l(12115),s=l(67685),i=l(20063);let r={es:{si:"Confirmar",no:"Cancelar",undo:"Deshacer",hecho:"Hecho.",yaEstaba:"Ya lo ten\xedas.",deshecho:"Deshecho.",caduca:"caduca en",caducada:"Esta petici\xf3n ha caducado.",trabajando:"Un momentoâ¦",falloTitulo:"No he podido completarlo.",cancelado:"Vale, lo dejo. No he tocado nada."},en:{si:"Confirm",no:"Cancel",undo:"Undo",hecho:"Done.",yaEstaba:"You already had it.",deshecho:"Undone.",caduca:"expires in",caducada:"This request has expired.",trabajando:"One momentâ¦",falloTitulo:"I couldn't complete it.",cancelado:"Fine, I'll leave it. I haven't touched anything."},de:{si:"Best\xe4tigen",no:"Abbrechen",undo:"R\xfcckg\xe4ngig",hecho:"Erledigt.",yaEstaba:"Hattest du schon.",deshecho:"R\xfcckg\xe4ngig gemacht.",caduca:"l\xe4uft ab in",caducada:"Diese Anfrage ist abgelaufen.",trabajando:"Einen Momentâ¦",falloTitulo:"Ich konnte es nicht abschlie\xdfen.",cancelado:"Gut, ich lasse es. Ich habe nichts anger\xfchrt."},fr:{si:"Confirmer",no:"Annuler",undo:"Annuler l'action",hecho:"C'est fait.",yaEstaba:"Tu l'avais d\xe9j\xe0.",deshecho:"Annul\xe9.",caduca:"expire dans",caducada:"Cette demande a expir\xe9.",trabajando:"Un instantâ¦",falloTitulo:"Je n'ai pas pu le terminer.",cancelado:"D'accord, je laisse. Je n'ai rien touch\xe9."}};function o(e){let a=new Date(e).getTime()-Date.now();return!Number.isFinite(a)||a<=0?null:{m:Math.floor(a/6e4),s:Math.floor(a%6e4/1e3)}}function c(e){let{propuesta:a,locale:s="es",onResuelta:i}=e,c=r[["es","en","de","fr"].includes(null!=s?s:"")?s:"es"],[u,p]=(0,n.useState)("abierta"),[h,m]=(0,n.use
1State)(null),[g,x]=(0,n.useState)(""),[b,f]=(0,n.useState)(()=>o(a.expira_en));(0,n.useEffect)(()=>{let e=!0;return(async()=>{try{var t,n;let{getBrowserSupabase:s}=await Promise.all([l.e(25730),l.e(70445),l.e(60450)]).then(l.bind(l,60450)),i=null!=(n=null==(t=(await s().auth.getSession()).data.session)?void 0:t.access_token)?n:"";if(!i)return;let r=await fetch("/api/acciones?propuesta=".concat(encodeURIComponent(a.id)),{headers:{Authorization:"Bearer ".concat(i)}});if(!r.ok||!e)return;let o=await r.json();if(!e||!(null==o?void 0:o.estado))return;"ejecutada"===o.estado?(m({herramienta:a.herramienta,resultado:{},ya_estaba:!1,repetida:!1,deshacer:o.deshacible?{herramienta:"?"}:null}),p("hecha")):"deshecha"===o.estado?p("deshecha"):"superada"===o.estado?(m({herramienta:a.herramienta,resultado:{},ya_estaba:!1,repetida:!1,deshacer:null}),p("hecha")):"cancelada"===o.estado?p("cancelada"):("caducada"===o.estado||"fallida"===o.estado)&&p("caducada"===o.estado?"caducada":"fallo")}catch(e){}})(),()=>{e=!1}},[a.id,a.herramienta]),(0,n.useEffect)(()=>{if("abierta"!==u)return;let e=setInterval(()=>{let e=o(a.expira_en);f(e),e||p("caducada")},1e3);return()=>clearInterval(e)},[u,a.expira_en]);let v=(0,n.useCallback)(async e=>{p("trabajando");try{let n="";try{var a,t;let{getBrowserSupabase:e}=await Promise.all([l.e(25730),l.e(70445),l.e(60450)]).then(l.bind(l,60450));n=null!=(t=null==(a=(await e().auth.getSession()).data.session)?void 0:a.access_token)?t:""}catch(e){}let i=await fetch("/api/ask",{method:"POST",headers:{"Content-Type":"application/json",...n?{Authorization:"Bearer ".concat(n)}:{}},body:JSON.stringify({tz:-new Date().getTimezoneOffset(),tz_name:Intl.DateTimeFormat().resolvedOptions().timeZone,locale:s,...e})});return await i.json()}catch(e){return{error:"red"}}},[s]),j=(0,n.useCallback)(async()=>{var e,l,t,n,s;let r=await v({confirmar:a.id});if(r.error||!r.answer){p("fallo"),x("red"===r.error?"":null!=(t=r.error)?t:"");return}let o=null!=(n=null==(e=r.accion)?void 0:e.ejecutado)?n:null;m(o),p("hecha"),x(r.answer),null==i||i({answer:r.answer,ejecutado:null!=o?o:void 0,siguiente:null!=(s=null==(l=r.accion)?void 0:l.propuesta)?s:void 0})},[a.id,v,i]),y=(0,n.useCallback)(async()=>{var e,l,t,n;let s=await v({cancelar:a.id});p("cancelada"),x(null!=(l=s.answer)?l:c.cancelado),null==i||i({answer:null!=(t=s.answer)?t:c.cancelado,siguiente:null!=(n=null==(e=s.accion)?void 0:e.propuesta)?n:void 0})},[a.id,v,i,c.cancelado]),_=(0,n.useCallback)(async()=>
1{let e=await v({deshacer_accion:a.id});e.answer?(x(e.answer),null==i||i({answer:e.answer})):(x(c.deshecho),null==i||i({answer:c.deshecho}))},[v,i,c.deshecho,a.id]),N=(0,n.useMemo)(()=>!!(null==h?void 0:h.deshacer),[h]),w={border:"1px solid var(--line, rgba(255,255,255,.12))",background:"var(--surface-1, rgba(255,255,255,.04))",borderRadius:14,padding:"14px 16px",display:"flex",flexDirection:"column",gap:10,maxWidth:520},k=e=>({fontWeight:700,fontSize:14,padding:"9px 18px",borderRadius:999,cursor:"pointer",border:e?"none":"1px solid rgba(255,255,255,.22)",background:e?"var(--accent, #E0242B)":"transparent",color:e?"#fff":"rgba(255,255,255,.78)"});return"hecha"===u||"cancelada"===u||"deshecha"===u?(0,t.jsxs)("div",{style:w,"data-accion":a.herramienta,"data-estado":u,children:[(0,t.jsx)("div",{style:{fontSize:14,color:"rgba(255,255,255,.9)"},children:g||("hecha"===u?(null==h?void 0:h.ya_estaba)?c.yaEstaba:c.hecho:"deshecha"===u?c.deshecho:c.cancelado)}),"hecha"===u&&N&&(0,t.jsx)("div",{children:(0,t.jsx)("button",{type:"button",onClick:_,style:k(!1),children:c.undo})})]}):"caducada"===u?(0,t.jsx)("div",{style:{...w,opacity:.6},"data-accion":a.herramienta,"data-estado":"caducada",children:(0,t.jsx)("div",{style:{fontSize:14},children:c.caducada})}):"fallo"===u?(0,t.jsx)("div",{style:w,"data-accion":a.herramienta,"data-estado":"fallo",children:(0,t.jsxs)("div",{style:{fontSize:14},children:[c.falloTitulo,g?" (".concat(g,")"):""]})}):(0,t.jsxs)("div",{style:w,"data-accion":a.herramienta,"data-estado":"propuesta",children:[(0,t.jsx)("div",{style:{fontSize:14.5,lineHeight:1.5,color:"rgba(255,255,255,.92)"},children:(0,t.jsx)(d,{texto:a.efecto})}),(0,t.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[(0,t.jsx)("button",{type:"button",onClick:j,disabled:"trabajando"===u,style:k(!0),children:"trabajando"===u?c.trabajando:c.si}),(0,t.jsx)("button",{type:"button",onClick:y,disabled:"trabajando"===u,style:k(!1),children:c.no}),b&&(0,t.jsxs)("span",{style:{fontSize:12,color:"rgba(255,255,255,.42)",fontVariantNumeric:"tabular-nums",marginLeft:"auto"},children:[c.caduca," ",b.m,":",String(b.s).padStart(2,"0")]})]})]})}function d(e){let{texto:a}=e,l=a.split(/(\*\*[^*]+\*\*)/g);return(0,t.jsx)(t.Fragment,{children:l.map((e,a)=>e.startsWith("**")&&e.endsWith("**")?(0,t.jsx)("strong",{style:{color:"#fff"},children:e.slice(2,-2)},a):(0,t.jsx)("span",{children:e},a))})}var u=l(52619),p=l.n(u),h=l(8908),m=l(75337),g=l(25446);let x=/^insight:([a-z0-9_]+:[a-z0-9_-]+:[A-Za-z0-9._:-]{3,160})@([0-9a-f]{16})$/;function b(e){var a;let l=null==e?void 0:e.insight,t=x.exec(String(null!=(a=null==e?void 0:e.sql)?a:""));return t&&l&&l.key===t[1]&&l.revision===t[2]?l:null}var f=l(97761);let v={titulo:"",partidos:"",filas:"",limites:"",fuente:""},j={fontSize:11,padding:"3px 9px",borderRadius:99,background:"rgba(255,255,255,.05)",border:"1px solid rgba(255,255,255,.12)",color:"rgba(255,255,255,.8)"},y={acta:{es:"en acta",en:"in the box score",de:"im Spielbericht",fr:"\xe0 la feuille de match"},localizados:{es:"localizados",en:"located",de:"lokalisiert",fr:"localis\xe9es"},clips:{es:"clips",en:"clips",de:"Clips",fr:"extraits"}};function _(e){var a;let{a:l}=e,n=l.sujeto,s=null!=(a=l.fechas)?a:[],i=[];return(null==n?void 0:n.nombre)&&i.push((0,t.jsx)("b",{style:{color:"#fff"},children:n.nombre},"s")),l.rotulo&&i.push((0,t.jsxs)("span",{children:[" \xb7 ",String(l.rotulo)]},"r")),(0,t.jsxs)("div",{style:{display:"grid",gap:3,fontSize:12,color:"rgba(255,255,255,.75)"},children:[i.length>0&&(0,t.jsx)("span",{children:i}),!!(l.nba_game_id||l.game_canonical_id)&&(0,t.jsxs)("span",{style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:11.5},children:[l.nba_game_id?"NBA ".concat(String(l.nba_game_id)):"",l.nba_game_id&&l.game_canonical_id?" â ":"",l.game_canonical_id?"ESPN ".concat(String(l.game_canonical_id)):""]}),s.map((e,a)=>(0,t.jsxs)("span",{children:[e.valor," ",(0,t.jsxs)("span",{style:{color:"rgba(255,255,255,.45)"},children:["\xb7 ",e.fuente]})]},a)),"number"==typeof l.partidos&&l.partidos>1&&(0,t.jsxs)("span",{children:[String(l.partidos)," partidos"]}),!!(l.desde&&l.hasta)&&(0,t.jsxs)("span",{children:[String(l.desde)," â ",String(l.hasta)]})]})}function N(e){var a,l,n,s,i,r,o,c,d,u,p;let{respuesta:h,comparacion:m,presentacion:g,rowCount:x,locale:b,ambitoDeclarado:f,cobertura:N}=e,w=["es","en","de","fr"].includes(null!=b?b:"")?b:"es",k=null==h?void 0:h.fuente,S=!!(f&&Object.keys(f).length),C=null!=(i=(null!=N?N:[])[0])?i:null;if((!k||!(null==(a=k.refs)?void 0:a.length))&&!S&&!C)return null;let T={...v,...null!=(r=null==k?void 0:k.rotulos)?r:{}},A=(null==k?void 0:k.ambito)==="comparacion.entidades"||(null==k?void 0:k.muestra)==="comparacion.entidades"?(null!=(o=null==m?void 0:m.entidades)?o:[]).map(e=>{var a;return{nombre:String(null!=(a=null==e?void 0:e.nombre)?a:""),linea:function(e,a,l){var t,n,s;let i=e.ambito;if(!i)return null;let r=[null!=(t=i.competicion)?t:null,null!=(n=i.temporada)?n:null,null!=(s=i.unidad)?s:null,"number"==typeof i.muestra&&l.partidos?"".concat(i.muestra.toLocaleStr
1ing("en"===a?"en-US":"de"===a?"de-DE":"fr"===a?"fr-FR":"es-ES")," ").concat(l.partidos):null].filter(Boolean);return r.length?r.join(" \xb7 "):null}(e,w,T)}}).filter(e=>e.linea):[],D=(null==k||null==(l=k.refs)?void 0:l.includes("presentacion.scope"))&&null!=(c=null==g||null==(n=g.scope)?void 0:n.text)?c:null,P=(null==k?void 0:k.muestra)==="rows"&&"number"==typeof x&&x>0&&T.filas?"".concat(x," ").concat(T.filas):null,z=(null==k||null==(s=k.refs)?void 0:s.includes("comparacion.avisos"))&&null!=(d=null==m?void 0:m.avisos)?d:[],E=[...new Set((null!=(u=null==m?void 0:m.entidades)?u:[]).map(e=>{var a;return null==e||null==(a=e.ambito)?void 0:a.fuente}).filter(Boolean))];return A.length||D||P||z.length||E.length||S||C?(0,t.jsxs)("div",{style:{margin:"8px 0",display:"grid",gap:6},children:[T.titulo&&(0,t.jsx)("span",{style:{fontSize:11,letterSpacing:".08em",textTransform:"uppercase",color:"rgba(255,255,255,.45)"},children:T.titulo}),S&&(0,t.jsx)(_,{a:f}),C&&(null!=C.acta||C.localizados>0)&&(0,t.jsxs)("span",{style:{fontSize:12,color:"rgba(255,255,255,.75)"},children:[null!=C.acta?"".concat(C.acta," ").concat(y.acta[w]," \xb7 "):"",C.localizados," ",y.localizados[w]," \xb7 ",null!=(p=C.clips)?p:0," ",y.clips[w]]}),A.map((e,a)=>(0,t.jsxs)("span",{style:{fontSize:12,color:"rgba(255,255,255,.75)"},children:[(0,t.jsx)("b",{style:{color:"#fff"},children:e.nombre})," \xb7 ",e.linea]},a)),D&&(0,t.jsx)("span",{style:{fontSize:12,color:"rgba(255,255,255,.75)"},children:D}),P&&(0,t.jsx)("span",{style:{fontSize:12,color:"rgba(255,255,255,.75)"},children:P}),E.length>0&&(0,t.jsx)("span",{style:{display:"flex",flexWrap:"wrap",gap:6},children:E.map((e,a)=>(0,t.jsxs)("span",{style:j,children:[(0,t.jsx)("b",{style:{color:"#fff"},children:T.fuente})," \xb7 ",e]},a))}),z.length>0&&(0,t.jsxs)("div",{style:{fontSize:12,color:"rgba(255,255,255,.6)"},children:[(0,t.jsxs)("b",{style:{color:"rgba(255,255,255,.8)"},children:[T.limites,":"]}),(0,t.jsx)("ul",{style:{margin:"4px 0 0",paddingLeft:16},children:z.map((e,a)=>(0,t.jsx)("li",{children:e},a))})]})]}):null}let w={fontSize:12,color:"rgba(255,255,255,.78)",lineHeight:1.45},k={display:"block",fontSize:11,color:"rgba(255,255,255,.5)",lineHeight:1.4};function S(e){let{hechos:a,rotulo:l}=e,n=Array.isArray(a)?a.filter(e=>e&&"object"==typeof e):[];if(!n.length)return null;let s=[];for(let e of n){var i,r,o,c,d,u,p,h,m,g;let a="".concat(null!=(c=null==(i=e.sujeto)?void 0:i.kind)?c:"",":").concat(null!=(u=null!=(d=null==(r=e.sujeto)?void 0:r.id)?d:null==(o=e.sujeto)?void 0:o.nombre)?u:""),l=s.find(e=>e.clave===a);l||(l={clave:a,nombre:String(null!=(m=null==(p=e.sujeto)?void 0:p.nombre)?m:""),equipo:null!=(g=null==(h=e.sujeto)?void 0:h.equipo)?g:null,hechos:[]},s.push(l)),l.hechos.push(e)}let x=s.length>1;return(0,t.jsxs)("div",{"data-hechos-evidencia":!0,style:{margin:"8px 0",display:"grid",gap:6},children:[l&&(0,t.jsx)("span",{style:{fontSize:11,letterSpacing:".08em",textTransform:"uppercase",color:"rgba(255,255,255,.45)"},children:l}),s.map(e=>(0,t.jsxs)("div",{style:{display:"grid",gap:4},children:[x&&e.nombre&&(0,t.jsxs)("span",{style:{...w,color:"#fff",fontWeight:700},children:[e.nombre,e.equipo?" (".concat(e.equipo,")"):""]}),(0,t.jsx)("ul",{style:{margin:0,paddingLeft:16,display:"grid",gap:4},children:e.hechos.map((e,a)=>{var l,n,s,i,r,o,c,d,u,p,h,m,g;let x=null!=(d=null!=(c=e.display)?c:e.missing_reason_text)?d:"â",b=[null==(l=e.sample)?void 0:l.text,null==(n=e.source)?void 0:n.text,null==(s=e.scope)?void 0:s.text,null==(i=e.stability)?void 0:i.text].filter(e=>"string"==typeof e&&e.length>0);return(0,t.jsxs)("li",{"data-hecho":null!=(u=e.metric)?u:void 0,"data-familia":null!=(p=null==(r=e.source)?void 0:r.familia)?p:void 0,style:w,children:[(0,t.jsx)("b",{style:{color:"#fff"},children:null!=(m=null!=(h=e.label)?h:e.metric)?m:""}),": ",x,(null==(o=e.ranking)?void 0:o.text)?(0,t.jsxs)("span",{style:{color:"rgba(255,255,255,.6)"},children:[" \xb7 ",e.ranking.text]}):null,null==e.value&&e.missing_reason?(0,t.jsxs)("span",{style:{color:"rgba(255,255,255,.45)"},children:[" \xb7 ",e.missing_reason]}):null,b.length>0&&(0,t.jsx)("span",{style:k,children:b.join(" \xb7 ")})]},"".concat(null!=(g=e.metric)?g:"m","-").concat(a))})})]},e.clave))]})}var C=l(27988),T=l(53672),A=l(88852),D=l(71316),P=l(36208),z=l(1181);let E={es:{title:"V\xeddeos",kicker:"jugada a jugada \xb7 clips oficiales de la NBA",lead:"M\xedralo hacerlo: sus mejores acciones recientes, del play-by-play real.",all:"Todo",note:"Clips oficiales de la NBA (videos.nba.com), reproducidos desde su CDN en tu navegador al pulsar play. El listado sale de nuestra base de datos.",close:"Cerrar",unavailable:"No disponible",kinds:{triple:"Triple",mate:"Mate",bandeja:"Bandeja",canasta:"Canasta",asistencia:"Asistencia",robo:"Robo",tapon:"Tap\xf3n",rebote:"Rebote"},kindsPlural:{triple:"Triples",mate:"Mates",bandeja:"Bandejas",canasta:"Canastas",asistencia:"Asistencias",robo:"Robos",tapon:"Tapones",rebote:"Rebotes"}},en:{title:"Videos",kicker:"play by play \xb7 official NBA clips",lead:"Watch him do it: his best recent plays, straight from the real play-by-play.",all:"All",note:"Official NBA clips (videos.nba.com), played from their CDN in your browser when you hit play. The list comes from our database.",close:"Close",unavailable:"Not available",kinds:{triple:"Three",mate:"Dunk",bandeja:"Layup",canasta:"Basket",asistencia:"Assist",robo:"Steal",tapon:"Block",rebote:"Rebound"},kindsPlural:{triple:"Threes",mate:"Dunks",bandeja:"Layups",canasta:"Baskets",asistencia:"Assists",robo:"Steals",tapon:"Blocks",rebote:"Rebounds"}},de:{title:"Videos",kicker:"Spielzug f\xfcr Spielzug \xb7 offizielle NBA-Clips",lead:"Sieh es dir an: seine besten Aktionen der letzten Zeit, aus dem echten Play-by-Play.",all:"Alle",note:"Offizielle NBA-Clips (videos.nba.com), beim Klick aus deren CDN in deinem Browser abgespielt. Die Liste stammt aus unserer Datenbank.",close:"Schlie\xdfen",unavailable:"Nicht verf\xfcgbar",kinds:{triple:"Dreier",mate:"Dunk",bandeja:"Korbleger",canasta:"Korb",asistencia:"Assist",robo:"Ballgewinn",tapon:"Block",rebote:"Rebound"},kindsPlural:{triple:"Dreier",mate:"Dunks",bandeja:"Korbleger",canasta:"K\xf6rbe",asistencia:"Assists",robo:"Ballgewinne",tapon:"Blocks",rebote:"Rebounds"}},fr:{title:"Vid\xe9os",kicker:"action par action \xb7 clips officiels NBA",lead:"Regarde-le faire : ses meilleures actions r\xe9centes, tir\xe9es du play-by-play r\xe9el.",all:"Tout",note:"Clips officiels NBA (videos.nba.com), lus depuis leur CDN dans ton navigateur au clic. La liste provient de notre base de donn\xe9es.",close:"Fermer",unavailable:"Indisponible",kinds:{triple:"Trois points",mate:"Dunk",bandeja:"Layup",canasta:"Panier",asistencia:"Passe",robo:"Interception",ta
1pon:"Contre",rebote:"Rebond"},kindsPlural:{triple:"Trois points",mate:"Dunks",bandeja:"Layups",canasta:"Paniers",asistencia:"Passes d\xe9c.",robo:"Interceptions",tapon:"Contres",rebote:"Rebonds"}}};var R=l(53896),q=l(98171),M=l(30413),F=l(38773),B=l(55982),I=l.n(B);let O="/assets/analista-avatar.webp",H="#E32636";function L(e){let{text:a,color:l,locale:s}=e,[i,r]=(0,n.useState)("idle"),o=(0,n.useRef)(null),c="en"===s?{oir:"Listen",parar:"Stop",cargando:"Loadingâ¦",error:"Couldn't play it"}:"de"===s?{oir:"Anh\xf6ren",parar:"Stopp",cargando:"L\xe4dtâ¦",error:"Konnte nicht abspielen"}:"fr"===s?{oir:"\xc9couter",parar:"Stop",cargando:"Chargementâ¦",error:"Impossible de lire"}:{oir:"Escuchar",parar:"Parar",cargando:"Cargandoâ¦",error:"No he podido reproducirlo"},d=async()=>{if("sonando"===i){var e;null==(e=o.current)||e.pause(),r("idle");return}if("cargando"!==i){r("cargando");try{let e=await fetch("/api/tts",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:a.replace(/\*\*/g,"").slice(0,4e3)})});if(!e.ok)throw Error(String(e.status));let l=await e.blob(),t=new Audio(URL.createObjectURL(l));o.current=t,t.onended=()=>r("idle"),await t.play(),r("sonando")}catch(e){r("error"),setTimeout(()=>r("idle"),2500)}}};return(0,t.jsx)("button",{type:"button",onClick:d,className:"mt-2 mr-3 inline-flex items-center gap-1.5 text-[12px] font-bold",style:{color:l,background:"none",border:"none",cursor:"pointer",padding:0},children:"sonando"===i?"â ".concat(c.parar):"cargando"===i?c.cargando:"error"===i?c.error:"â¶ ".concat(c.oir)})}function W(e){let{m:a,color:l,t:s}=e,[i,r]=(0,n.useState)("idle"),[o,c]=(0,n.useState)(""),d=async e=>{if("cargando"!==i){r("cargando");try{var l,t,n;let s=await fetch("/api/compartir",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({question:null!=(l=a.question)?l:"",answer:a.content,sql:a.inteligencia?"":null!=(t=a.sql)?t:"",rows:a.inteligencia?[]:null!=(n=a.rows)?n:[],...e?{caduca_horas:e}:{}})}),i=await s.json();if(!i.url)throw Error("sin url");c(i.url),await navigator.clipboard.writeText(i.url).catch(()=>{}),r("hecho")}catch(e){r("error"),setTimeout(()=>r("idle"),3e3)}}};return"hecho"===i?(0,t.jsxs)("a",{href:o,target:"_blank",rel:"noopener",className:"mt-2 inline-flex items-center gap-1.5 text-[12px] font-bold",style:{color:l},children:[s.compartirHecho," â"]}):(0,t.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,t.jsx)("button",{onClick:()=>d(),className:"mt-2 inline-flex items-center gap-1.5 text-[12px] px-3 py-1.5 rounded-full transition-colors",style:{background:"".concat(l,"14"),border:"1px solid ".concat(l,"35"),color:"#fff"},children:"cargando"===i?s.compartirCreando:"error"===i?s.compartirError:s.compartir}),"idle"===i&&(0,t.jsxs)("button",{onClick:()=>d(48),title:s.compartir48Titulo,className:"mt-2 inline-flex items-center text-[11px] px-2.5 py-1.5 rounded-full",style:{background:"transparent",border:"1px solid ".concat(l,"25"),color:"rgba(255,255,255,.55)"},children:["â³ ",s.compartir48]})]})}function V(e){var a,l;let{res:s,color:i,t:r}=e,[o,c]=(0,n.useState)(null),d=s.games.filter(e=>e.url),u=null!=(a=s.articles)?a:[],h=null!=(l=s.players)?l:[];return d.length||s.clips.length||u.length||h.length?(0,t.jsxs)("div",{className:"mt-2.5",children:[d.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:d.map(e=>(0,t.jsxs)(p(),{href:e.url,className:"text-[12px] px-3 py-1.5 rounded-full font-semibold transition-colors hover:brightness-125",style:{background:"rgba(255,255,255,0.05)",border:"1px solid ".concat(i,"50"),color:"#fff"},children:["\uD83D\uDCCA ",e.label," \xb7 ",e.date]},e.nba_game_id))}),h.length>0&&(0,t.jsx)("div",{className:"mt-2 flex gap-3 overflow-x-auto pb-1 [scrollbar-width:thin]",children:h.map(e=>(0,t.jsxs)(p(),{href:e.url,className:"shrink-0 w-[74px] text-center group",children:[(0,t.jsx)("span",{className:"block w-[54px] h-[54px] mx-auto rounded-full overflow-hidden",style:{background:"rgba(255,255,255,0.05)",border:"1px solid rgba(255,255,255,0.12)"},children:e.image&&(0,t.jsx)("img",{src:e.image,alt:"",className:"w-full h-full object-cover group-hover:scale-105 transition-transform"})}),(0,t.jsx)("span",{className:"block mt-1 text-[11px] font-bold text-white/85 leading-tight line-clamp-2",children:e.name})]},e.id))}),u.length>0&&(0,t.jsxs)("div",{className:"mt-2 flex flex-col gap-2",children:[(0,t.jsx)("p",{className:"text-[10px] tracking-[0.14em] font-extrabold uppercase",style:{color:i},children:r.recursosEscrito}),u.map(e=>(0,t.jsxs)(p(),{href:e.url,className:"flex items-center gap-3 p-2 rounded-xl transition-colors hover:brightness-125",style:{background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.08)"},children:[e.image&&(0,t.jsx)("img",{src:e.image,alt:"",className:"w-[54px] h-[54px] rounded-lg object-cover shrink-0"}),(0,t.jsxs)("span",{className:"min-w-0",children:[(0,t.jsx)("span",{className:"block text-[13.5px] font-extrabold text-white leading-tight line-clamp-2",children:e.title}),(0,t.jsxs)("span",{className:"block text-[11.5px] text-white/50 mt-0.5",children:[e.porque?"".concat(r.recursosSobre," ").concat(e.porque," \xb7 "):"",e.date," \xb7 ",r.recursosLeerlo]})]})]},e.slug))]}),s.clips.length>0&&(0,t.jsx)("div",{className:"mt-2 flex gap-2 overflow-x-auto pb-1 [scrollbar-width:thin]",children:s.clips.map((e,a)=>(0,t.jsxs)("button",{onClick:()=>
1c({url:e.video_url,title:e.description}),className:"shrink-0 w-[168px] text-left group",children:[(0,t.jsxs)("div",{className:"relative rounded-lg overflow-hidden",style:{border:"1px solid rgba(255,255,255,0.12)"},children:[(0,t.jsx)("img",{src:e.thumb_url,alt:"",className:"w-full h-[94px] object-cover group-hover:scale-105 transition-transform"}),(0,t.jsx)("span",{className:"absolute inset-0 grid place-items-center",children:(0,t.jsx)("span",{className:"grid place-items-center w-9 h-9 rounded-full",style:{background:"rgba(0,0,0,0.55)",border:"1px solid rgba(255,255,255,0.5)"},children:"â¶"})})]}),(0,t.jsx)("p",{className:"mt-1 text-[10.5px] leading-tight text-white/55 line-clamp-2",children:e.description})]},a))}),o&&(0,t.jsx)("div",{className:"fixed inset-0 z-50 grid place-items-center p-4",style:{background:"rgba(0,0,0,0.82)"},onClick:()=>c(null),children:(0,t.jsxs)("div",{className:"w-full max-w-2xl",onClick:e=>e.stopPropagation(),children:[(0,t.jsx)("video",{src:o.url,controls:!0,autoPlay:!0,playsInline:!0,className:"w-full rounded-xl",style:{background:"#000"}}),(0,t.jsxs)("div",{className:"flex items-center justify-between mt-2 gap-3",children:[(0,t.jsx)("p",{className:"text-[12px] text-white/70 truncate",children:o.title}),(0,t.jsxs)("button",{onClick:()=>c(null),className:"text-[12px] font-bold text-white/80 px-3 py-1 rounded-full",style:{border:"1px solid rgba(255,255,255,0.3)"},children:[r.cerrar," â"]})]})]})})]}):null}let J=/(\*\*[^*]+\*\*|\[[^\]\n]+\]\((?:\/|https:\/\/)[^)\s]+\))/g;function K(e){return e.split(J).filter(Boolean).flatMap((e,a)=>{if(/^\*\*[^*]+\*\*$/.test(e))return[(0,t.jsx)("strong",{className:"font-semibold text-white",children:e.slice(2,-2)},a)];let l=/^\[([^\]\n]+)\]\(((?:\/|https:\/\/)[^)\s]+)\)$/.exec(e);if(l){let e=l[2].startsWith("https://");return[(0,t.jsx)("a",{href:l[2],className:"underline underline-offset-2 font-semibold hover:brightness-125",...e?{target:"_blank",rel:"noopener noreferrer"}:{},children:l[1]},a)]}return(0,s.F)(e).map((e,l)=>{var n;return"cursiva"===e.tipo?(0,t.jsx)("em",{className:"opacity-85",children:(null!=(n=e.hijos)?n:[{tipo:"texto",texto:e.texto}]).map((e,a)=>"negrita"===e.tipo?(0,t.jsx)("strong",{className:"font-semibold text-white",children:e.texto},a):(0,t.jsx)("span",{children:e.texto},a))},"".concat(a,"-").concat(l)):"negrita"===e.tipo?(0,t.jsx)("strong",{className:"font-semibold text-white",children:e.texto},"".concat(a,"-").concat(l)):(0,t.jsx)("span",{children:e.texto},"".concat(a,"-").concat(l))})})}function U(e){let{text:a}=e,l=a.split("\n"),n=[],s=[],i=()=>{s.length&&(n.push((0,t.jsx)("ul",{className:"list-disc pl-5 space-y-1 my-1.5",children:s.map((e,a)=>(0,t.jsx)("li",{children:K(e)},a))},"u".concat(n.length))),s=[])};for(let e of l){let a=/^#{1,6}\s+/.test(e),l=e.replace(/^#{1,6}\s+/,""),r=l.match(/^[-*]\s+(.*)/);if(r){s.push(r[1]);continue}i(),""!==l.trim()&&n.push((0,t.jsx)("p",{className:a?"font-semibold text-white mt-2 mb-1":"my-1.5 first:mt-0 last:mb-0",children:K(l)},"p".concat(n.length)))}return i(),(0,t.jsx)(t.Fragment,{children:n})}function Q(e,a){var l,t,n,s,i,r,o,c,d,u,p,h,m,g,x;let{status:b,question:f,hilo:v,id:j,t:y}=a,_=e.answer?e.answer:(0,M.errorDicho)(null!=(t=e.error)?t:"",y),N=!e.answer&&(429===b||!!e.quota);return{id:j,hilo:v,role:"assistant",content:_,question:f,rows:e.rows,sql:e.sql,cupo:N,cupoMotivo:N&&"string"==typeof e.motivo?String(e.motivo):void 0,followups:e.followups,resources:e.resources,propuesta:null==(l=e.accion)?void 0:l.propuesta,rico:null!=(n=e.rico)?n:void 0,grafico:null!=(s=e.grafico)?s:null,evolucion:null!=(i=e.evolucion)?i:null,inteligencia:null!=(r=e.inteligencia)?r:null,insight:null!=(o=e.insight)?o:null,comparacion:null!=(c=e.comparacion)?c:null,actividad:null!=(d=e.actividad)?d:void 0,hechos:null!=(u=e.hechos)?u:null,respuesta:null!=(p=e.respuesta)?p:null,presentacion:null!=(h=e.presentacion)?h:null,momentos:null!=(m=e.momentos)?m:null,ambitoDeclarado:null!=(g=e.ambito_declarado)?g:null,galeria:null!=(x=e.galeria)?x:null}}function G(e,a,l){try{sessionStorage.setItem(R.uL,JSON.stringify({v:1,guardado:Date.now(),identidad:a.identidad,ambito:a.ambito,cobertura:a.cobertura,tipos:[...new Set(e.map(e=>e.tipo))],momentos:e}))}catch(e){}window.location.href=(0,F.SM)("/studio?momentos=1",l)}function Y(e){var a,l,n,s,i,r,o,d,u,h,x,v,j,y,_,w,k,R,q,M,B,O,J,K,Q,Y,Z,X,$,ee,ea,el;let{m:et,i:en,a:es}=e,{t:ei,locale:er}=es,eo=!!et.rows&&et.rows.length>0;return(0,t.jsxs)(t.Fragment,{children:[et.cupo?(0,t.jsxs)("div",{className:I().cupo,children:[(0,t.jsx)("span",{className:"".concat(I().cupoTitulo," sw-cond"),children:"monthly_limit"===et.cupoMotivo?ei.cupoTituloMes:ei.cupoTitulo}),(0,t.jsx)("span",{className:I().cupoTexto,children:et.content}),(0,t.jsxs)(p(),{href:(0,F.SM)("/profesional/planes",er),className:I().cupoCta,children:[ei.cupoCta," â"]})]}):(null==(l=et.galeria)||null==(a=l.clips)?void 0:a.length)?(0,t.jsxs)("div",{className:I().respuesta,style:{display:"grid",gap:8},children:[(0,t.jsx)(U,{text:et.content}),(0,t.jsx)(z.default,{clips:et.galeria.clips.map(e=>({ctx:e.ctx,desc:e.desc,url:e.url,date:e.date,ms:e.ms,thumb:e.thumb})),espnId:null!=(M=et.galeria.sujeto.espnId)?M:"",name:et.galeria.sujeto.nombre,t:null!=(B=E[er])?B:E.es,locale:er,aviso:et.galeria.disponibilidad.texto})]}):et.galeria?(0,t.jsxs)("div",{className:I().respuesta,style:{display:"grid",gap:8},children:[(0,t.jsx)(U,{text:et.content}),(0,t.jsxs)("div",{style:{display:"grid",gap:4,padding:"10px 12px",borderRadius:12,border:"1px solid rgba(255,255,255,.12)",background:"rgba(255,255,255,.03)"},children:[(0,t.jsx)("span",{style:{fontSize:10.5,letterSpacing:".12em",textTransform:"uppercase",color:"#E32636",fontWeight:800},children:ei.sinVideos}),(0,t.jsx)("span",{style:{fontSize:12.5,color:"#E9EDF4",fontWeight:700},children:[et.galeria.sujeto.nombre,null==(n=et.galeria.ambito)?void 0:n.texto].filter(
1Boolean).join(" \xb7 ")}),(null==(s=et.galeria.vacio)?void 0:s.texto)&&(0,t.jsx)("span",{style:{fontSize:12,lineHeight:1.4,color:"#8B93A1"},children:et.galeria.vacio.texto})]})]}):(null==(r=et.momentos)||null==(i=r.momentos)?void 0:i.length)?(0,t.jsxs)("div",{className:I().respuesta,style:{display:"grid",gap:8},children:[(0,t.jsx)(U,{text:et.content}),(0,t.jsx)(C.Ay,{sobre:et.momentos,locale:er,retrato:null!=(O=null==(u=et.resources)||null==(d=u.players)||null==(o=d[0])?void 0:o.image)?O:null,onUsarEnVideo:e=>G(e,et.momentos,er)})]}):et.inteligencia?es.kitVisual?(0,t.jsx)(A.A,{m:{inteligencia:et.inteligencia,rico:null!=(J=et.rico)?J:null,insight:null!=(K=et.insight)?K:null},locale:er,className:I().respuesta,onPregunta:e=>es.onPregunta(e),accionesExtra:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(L,{text:et.content,color:H,locale:er}),(0,t.jsx)(W,{m:et,color:H,t:ei})]})}):(0,t.jsx)(T.A,{m:{inteligencia:et.inteligencia,rico:null!=(Q=et.rico)?Q:null,insight:null!=(Y=et.insight)?Y:null},locale:er,className:I().respuesta,onPregunta:e=>es.onPregunta(e),accionesExtra:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(L,{text:et.content,color:H,locale:er}),(0,t.jsx)(W,{m:et,color:H,t:ei})]})}):et.rico?(0,t.jsxs)("div",{className:I().respuesta,style:{display:"grid",gap:8},children:[(0,t.jsx)(f.A,{rico:et.rico,grafico:et.grafico,rows:et.rows,comparacion:null!=(Z=et.comparacion)?Z:void 0,acciones:function(e,a,l){let{t:n,locale:s,profundizando:i,haySesion:r}=l;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(L,{text:e.content,color:H,locale:s}),(0,t.jsx)(W,{m:e,color:H,t:n}),(0,t.jsx)("button",{type:"button",onClick:()=>l.onProfundizar(a,e),className:"mt-2 inline-flex items-center gap-1.5 text-[12px] px-3 py-1.5 rounded-full transition-colors",style:{background:"".concat(H,"14"),border:"1px solid ".concat(H,"35"),color:"#fff",cursor:"pointer"},children:i===a?n.profundizando:"â ".concat(n.profundizar)}),r&&(0,t.jsxs)("button",{type:"button",disabled:!0,"aria-disabled":"true",title:n.crearArticuloProxTitulo,className:"mt-2 inline-flex items-center gap-1.5 text-[12px] px-3 py-1.5 rounded-full",style:{background:"transparent",border:"1px dashed rgba(255,255,255,.2)",color:"rgba(255,255,255,.45)",cursor:"default"},children:["â ",n.crearArticulo," \xb7 ",n.proximamente]})]})}(et,en,es),visual:et.evolucion&&(null==(h=et.evolucion.temporadas)?void 0:h.length)>=2?(0,t.jsx)(D.A,{evolucion:et.evolucion,titulo:null!=(X=null==(x=et.grafico)?void 0:x.titulo)?X:null,locale:er,acento:null!=($=null==(v=et.rico.identidad)?void 0:v.color)?$:null,colores:Object.fromEntries(et.rico.kpis.filter(e=>e.color).map(e=>[e.etiqueta,e.color]))}):void 0}),(0,t.jsxs)("details",{className:I().fuente,children:[(0,t.jsx)("summary",{children:ei.verTextoCompleto}),(0,t.jsx)("div",{style:{marginTop:6},children:(0,t.jsx)(U,{text:et.content})})]})]}):et.insight&&!et.inteligencia&&b(et)?(0,t.jsxs)("div",{className:I().respuesta,style:{display:"grid",gap:10},children:[(0,t.jsx)("div",{"data-analista-insight":!0,"data-analista-tarjeta":!0,children:(0,t.jsx)(g.Ay,{s:et.insight,perfil:"COMPACT"})}),(0,t.jsx)(U,{text:et.content})]}):(0,P.z)(et.presentacion)&&(null!=(ee=null==(j=et.rows)?void 0:j.length)?ee:0)===1?(0,t.jsxs)("div",{className:I().respuesta,style:{display:"grid",gap:10},children:[(0,t.jsx)(P.A,{presentacion:et.presentacion,locale:er,foto:null!=(ea=null==(w=et.resources)||null==(_=w.players)||null==(y=_.find(e=>{var a,l;return e.id===(null==(l=et.presentacion)||null==(a=l.subject)?void 0:a.key)}))?void 0:y.image)?ea:(null==(R=et.resources)||null==(k=R.players)?void 0:k.length)===1?et.resources.players[0].image:null}),(0,t.jsx)(U,{text:et.content})]}):(0,t.jsx)("div",{className:I().respuesta,children:(0,t.jsx)(U,{text:et.content})}),et.propuesta&&(0,t.jsx)("div",{className:I().accesorios,children:(0,t.jsx)(c,{propuesta:et.propuesta,locale:er,onResuelta:e=>es.onPropuestaResuelta(e)})}),(eo&&!et.rico||et.resources)&&!et.inteligencia&&(()=>{var e,a,l,n,s,i,r;let o=!et.rico&&!et.cupo&&!et.galeria&&!(et.insight&&b(et))&&!(null==(a=et.momentos)||null==(e=a.momentos)?void 0:e.length)&&(0,P.z)(et.presentacion)&&(null!=(s=null==(l=et.rows)?void 0:l.length)?s:0)===1,c=e=>String(null!=e?e:"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim(),d=o&&et.resources?{...et.resources,players:(null!=(i=et.resources.players)?i:[]).filter(e=>{var a,l,t,n;return e.id!==(null==(l=et.presentacion)||null==(a=l.subject)?void 0:a.key)&&c(e.name)!==c(null==(n=et.presentacion)||null==(t=n.subject)?void 0:t.name)})}:et.resources;return(0,t.jsxs)("div",{className:I().accesorios,children:[eo&&!et.rico&&!o&&(0,t.jsx)(m.A,{rows:et.rows,color:H,metrica:null!=(r=null==(n=et.presentacion)?void 0:n.primary_metric)?r:null,locale:es.locale,textos:{todos:es.t.datosTodos,filas:es.t.datosFilas,ocultar:es.t.datosOcultar}}),d&&(0,t.jsx)(V,{res:d,color:H,t:ei})]})})(),eo||(null==(q=et.actividad)?void 0:q.length)||et.question&&et.content.length>40?(0,t.jsxs)("div",{className:I().pieRespuesta,children:[null!=(el=function(e,a){var l,n,s,i,r,o,c,d,u,p,h,g,x,b,f,v,j,y;let{t:_,locale:w}=a;if(e.inteligencia)return null;let k=null!=(h=e.actividad)?h:[],C=!!e.rows&&e.rows.length>0,T=!!(null==(s=e.respuesta)||null==(n=s.fuente)||null==(l=n.refs)?void 0:l.length),A=!!(null==(i=e.hechos)?void 0:i.length);return k.length||C||T||A?(0,t.jsxs)("details",{className:I().fuente,children:[(0,t.jsx)("summary",{children:_.verPrueba}),(0,t.jsx)(N,{respuesta:e.respuesta,comparacion:null!=(g=e.comparacion)?g:void 0,presentacion:null!=(x=e.presentacion)?x:void 0,rowCount:null!=(b=null==(r=e.rows)?void 0:r.length)?b:null,locale:w,ambitoDeclarado:null!=(f=e.ambitoDeclarado)?f:void 0,cobertura:null!=(v=null==(o=e.momentos)?void 0:o.cobertura)?v:void 0}),A&&(0,t.jsx)(S,{hechos:e.hechos,rotulo:null!=(j=null==(u=e.respuesta)||null==(d=u.fuente)||null==(c=d.rotulos)?void 0:c.hechos)?j:null}),k.length>0&&(0,t.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6,margin:"8px 0"},children:k.map((e,a)=>(0,t.jsxs)("span",{style:{fontSize:11,padding:"3px 9px",borderRadius:99,background:"rgba(255,255,255,.05)",border:"1px solid rgba(255,255,255,.12)",color:"rgba(255,255,255,.8)"},children:[(0,t.jsx)("b",{style:{color:"#fff"},children:e.clave})," \xb7 ",e.detalle]},a))}),C&&(0,t.jsx)(m.A,{rows:e.rows,color:H,metrica:null!=(y=null==(p=e.presentacion)?void 0:p.primary_metric)?y:null,locale:a.locale,textos:{todos:a.t.datosTodos,filas:a.t.datosFilas,ocultar:a.t.datosOcultar}})]}):null}(et,es))?el:(0,t.jsx)("span",{}),et.question&&et.content.length>40&&!et.rico&&(0,t.jsxs)("span",{className:I().accionesRespuesta,children:[(0,t.jsx)(L,{text:et.content,color:H,locale:er}),(0,t.jsx)(W,{m:et,color:H,t:ei})]})]}):null]})}function Z(e){var a;let{m:l,onPregunta:n,className:s}=e,i=(null==l?void 0:l.role)!=="assistant"||l.inteligencia?[]:null!=(a=l.followups)?a:[];return i.length>0?(0,t.jsx)("div",{className:null!=s?s:I().seguimientos,children:i.map((e,a)=>(0,t.jsx)("button",{type:"button",className:I().seguimiento,onClick:()=>n(e.question),children:e.label},a))}):null}function X(e){var a,s;let{persona:r,initialQ:o="",contexto:c=null,locale:d="es",pantalla:u}=e,m=(0,i.useRouter)(),g=M.TEXTOS[(0,M.idiomaAnalista)(d)],x=e=>(0,F.SM)(e,d),b=(0,h.Oi)(c),f=b?(0,h.ec)(b,(0,M.idiomaAnalista)(d)).map(e=>({kicker:null,pregunta:e.pregunta}
1)):[],v=f.length?f:g.sugerencias,[j,y]=(0,n.useState)([]),[_,N]=(0,n.useState)(""),[w,k]=(0,n.useState)(!1),[S,C]=(0,n.useState)(!0);(0,n.useEffect)(()=>{try{C("tarjeta"!==new URLSearchParams(window.location.search).get("analista"))}catch(e){C(!0)}},[]);let T=(0,n.useRef)(null),A=(0,n.useRef)(null),D=(0,n.useRef)(null),P=(0,n.useRef)(null),z=(0,n.useRef)(0),E=(0,n.useRef)(new Set),R="sw_chat_".concat(r),B="sw_chat_conv_".concat(r);(0,n.useEffect)(()=>{try{let e=sessionStorage.getItem(R);if(e){let a=JSON.parse(e);Array.isArray(a)&&a.length>0&&y(a)}let a=sessionStorage.getItem(B);a&&(T.current=a)}catch(e){}},[r]),(0,n.useEffect)(()=>{try{j.length>0&&sessionStorage.setItem(R,JSON.stringify(j.slice(-30))),T.current&&sessionStorage.setItem(B,T.current)}catch(e){}},[j]);let[H,L]=(0,n.useState)(!1),[W,V]=(0,n.useState)(!1),[J,K]=(0,n.useState)(null),[U,G]=(0,n.useState)(null),X=(0,n.useRef)(null),$=(0,n.useRef)(null),ee=(0,n.useRef)(null),ea=(0,n.useRef)(!1),[el,et]=(0,n.useState)([]),[en,es]=(0,n.useState)(null),[ei,er]=(0,n.useState)(""),eo=(0,n.useRef)(null);async function ec(e){try{var a,t;let{getBrowserSupabase:n}=await Promise.all([l.e(25730),l.e(70445),l.e(60450)]).then(l.bind(l,60450)),s=null!=(t=null==(a=(await n().auth.getSession()).data.session)?void 0:a.access_token)?t:"";if(!s)return;let i=await fetch("/api/chat/history?id=".concat(encodeURIComponent(e)),{headers:{Authorization:"Bearer ".concat(s)}}),r=await i.json(),o=Array.isArray(r.messages)?r.messages:[];if(!o.length)return;T.current=e,y(o.map(e=>{var a;return{role:"user"===e.role?"user":"assistant",content:String(null!=(a=e.content)?a:"")}})),L(!1)}catch(e){}}async function ed(e){var a,t,n,s,i,o,p,h;let x=(null!=e?e:_).trim();if(!x||w)return;N("");let b=z.current,f=j.filter(e=>{var a;return(null!=(a=e.hilo)?a:0)===b}),v=[...f,{role:"user",content:x,hilo:b}];y(v),k(!0);try{let e=f.slice(-6).map(e=>({role:e.role,content:e.content.slice(0,400)})),h="";try{let{getBrowserSupabase:e}=await Promise.all([l.e(25730),l.e(70445),l.e(60450)]).then(l.bind(l,60450));h=null!=(o=null==(i=(await e().auth.getSession()).data.session)?void 0:i.access_token)?o:""}catch(e){}let j=await fetch("/api/ask",{method:"POST",headers:{"Content-Type":"application/json",...h?{Authorization:"Bearer ".concat(h)}:{}},body:JSON.stringify({question:x,persona:r,history:e,locale:d,tz:-new Date().getTimezoneOffset(),tz_name:Intl.DateTimeFormat().resolvedOptions().timeZone,acepta:["escritura"],...T.current?{conversation_id:T.current}:{},...A.current?{marco_previo:A.current}:{},...D.current?{momentos_previo:D.current}:{},...P.current?{galeria_previa:P.current}:{},...en?{imagen:en}:{},...u?{pantalla:u}:{},...c?{contexto:c}:{}})});en&&es(null);let _=await j.json();if(z.current!==b)return;"string"==typeof _.conversation_id&&_.conversation_id&&(T.current=_.conversation_id),A.current=_.marco&&"object"==typeof _.marco?_.marco:A.current,D.current=null!=(p=null==(a=_.momentos)?void 0:a.contexto)?p:null;{let e=_.galeria;P.current=e?{nbaPlayerId:e.sujeto.nbaPlayerId,espnId:e.sujeto.espnId,nombre:e.sujeto.nombre,temporada:e.ambito.temporada,temporadaTexto:e.ambito.temporadaTexto,fecha:e.ambito.fecha,tipo:e.ambito.tipo,rival:e.ambito.rival}:P.current}let N="".concat(b,"-").concat(Date.now().toString(36),"-").concat(Math.random().toString(36).slice(2,8));y([...v,Q(_,{status:j.status,question:x,hilo:b,id:N,t:g})]),(null==(n=_.rico)||null==(t=n.pendiente)?void 0:t.length)&&(async()=>{let a=new AbortController;E.current.add(a);try{let l=await fetch("/api/ask",{method:"POST",signal:a.signal,headers:{"Content-Type":"application/json",...h?{Authorization:"Bearer ".concat(h)}:{}},body:JSON.stringify({question:x,locale:d,fase:"sintesis",history:e,..."string"==typeof _.continuacion?{continuacion:_.continuacion}:{},...A.current?{marco_previo:A.current}:{}})}),t=await l.json(),n=null==t?void 0:t.sintesis;(null==n?void 0:n.tesis)&&(null==t?void 0:t.para)===x&&z.current===b&&y(e=>e.map(e=>{var a;return e.id===N&&e.hilo===b&&e.rico&&e.question===x?{...e,rico:{...e.rico,tesis:n.tesis,takeaway:null!=(a=n.takeaway)?a:e.rico.takeaway,pendiente:[]}}:e}))}catch(e){}finally{E.current.delete(a)}})();let w="string"==typeof(null==(s=_.navegacion)?void 0:s.web)?_.navegacion.web:"";w.startsWith("/")&&setTimeout(()=>
1m.push(w),900)}catch(e){y([...v,{role:"assistant",content:g.errConexion}])}finally{k(!1),null==(h=ee.current)||h.focus()}}(0,n.useEffect)(()=>{(async()=>{try{var e,a;let{getBrowserSupabase:t}=await Promise.all([l.e(25730),l.e(70445),l.e(60450)]).then(l.bind(l,60450)),n=null!=(a=null==(e=(await t().auth.getSession()).data.session)?void 0:e.access_token)?a:"";if(K(!!n),!n)return;let s={Authorization:"Bearer ".concat(n)},i=await fetch("/api/chat/history",{headers:s}),r=await i.json();Array.isArray(r.conversations)&&et(r.conversations.slice(0,12));try{let e=await fetch("/api/mine",{headers:s}),a=await e.json();V((null==a?void 0:a.plus)===!0);let l=null==a?void 0:a.consumo;l&&Number.isFinite(l.hits)&&Number.isFinite(l.limit)&&l.limit>0&&G({hits:Number(l.hits),limit:Number(l.limit)})}catch(e){}}catch(e){K(!1)}})()},[]),(0,n.useEffect)(()=>{if(!j.length&&!w)return;let e=$.current;e&&e.scrollTo({top:e.scrollHeight,behavior:"smooth"})},[j,w]),(0,n.useEffect)(()=>{var e;let a=[...j].reverse().find(e=>"assistant"===e.role);window.dispatchEvent(new CustomEvent("sw:motion-senales",{detail:{escribiendo:_.trim().length>0&&!w,procesando:w,entidadResuelta:!!(null==a||null==(e=a.rows)?void 0:e.length)}}))},[_,w,j]),(0,n.useEffect)(()=>{o&&!ea.current&&(ea.current=!0,ed(o))},[o]);let[eu,ep]=(0,n.useState)(null),eh=async(e,a)=>{if(null===eu&&a.question){ep(e);try{var t,n,s;let i="";try{let{getBrowserSupabase:e}=await Promise.all([l.e(25730),l.e(70445),l.e(60450)]).then(l.bind(l,60450));i=null!=(n=null==(t=(await e().auth.getSession()).data.session)?void 0:t.access_token)?n:""}catch(e){}let r=null!=(s=a.hilo)?s:0,o=j.slice(0,e).filter(e=>{var a;return(null!=(a=e.hilo)?a:0)===r}),c=o.map(e=>"user"===e.role&&e.content===a.question).lastIndexOf(!0),u=(c>=0?o.slice(0,c):o).slice(-6).map(e=>({role:e.role,content:e.content.slice(0,400)})),p=await fetch("/api/ask",{method:"POST",headers:{"Content-Type":"application/json",...i?{Authorization:"Bearer ".concat(i)}:{}},body:JSON.stringify({question:a.question,locale:d,fase:"sintesis",nivel:"profundo",...u.length?{history:u}:{}})}),h=await p.json(),m=null==h?void 0:h.sintesis;((null==m?void 0:m.lectura)||(null==m?void 0:m.tesis))&&y(a=>a.map((a,l)=>{var t,n,s;return l===e&&a.rico?{...a,rico:{...a.rico,tesis:null!=(t=m.tesis)?t:a.rico.tesis,takeaway:null!=(n=m.takeaway)?n:a.rico.takeaway,lectura:null!=(s=m.lectura)?s:null,pendiente:[]}}:a}))}catch(e){}finally{ep(null)}}},em={locale:d,t:g,haySesion:J,profundizando:eu,onPregunta:e=>{ed(e)},onProfundizar:(e,a)=>{eh(e,a)},onPropuestaResuelta:e=>y(a=>[...a,{role:"assistant",content:e.answer,propuesta:e.siguiente}]),kitVisual:S},eg=0===j.length,ex=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:72,l=String(null!=e?e:"").replace(/\s+/g," ").trim();if(l.length<=a)return l;let t=l.search(/[?!.;:](?=\s|$)/);if(t>0&&t+1<=a)return l.slice(0,t+1);let n=l.slice(0,a),s=n.lastIndexOf(" ");return s>.6*a&&(n=n.slice(0,s)),n.replace(/[\s,;:¿¡(]+$/,"")+"â¦"}(null!=(s=null==(a=j.find(e=>"user"===e.role))?void 0:a.content)?s:""),eb=(0,t.jsxs)("div",{className:I().railDentro,children:[(0,t.jsxs)("div",{className:I().railTop,children:[(0,t.jsx)("p",{className:"".concat(I().railTitulo," sw-cond"),children:g.railTitulo}),(0,t.jsxs)("button",{type:"button",className:I().nuevaHilo,onClick:function(){for(let e of(z.current+=1,A.current=null,D.current=null,P.current=null,E.current))e.abort();E.current.clear(),k(!1),T.current=null,y([]),N(""),es(null),er(""),L(!1);try{sessionStorage.removeItem(R),sessionStorage.removeItem(B)}catch(e){}},children:[(0,t.jsx)("span",{"aria-hidden":!0,children:"â"})," ",g.nueva]})]}),(0,t.jsx)("div",{className:I().railLista,children:0===el.length?(0,t.jsx)("p",{className:I().railVacio,children:!1===J?(0,t.jsxs)(t.Fragment,{children:[g.sinSesion," ",(0,t.jsxs)(p(),{href:x("/entrar"),children:[g.entrar," â"]})]}):g.railVacio}):el.map(e=>{let a=T.current===e.id;return(0,t.jsxs)("button",{type:"button",className:I().hilada,"data-activa":a?"1":"0",onClick:()=>void ec(e.id),children:[(0,t.jsx)("span",{className:I().hiladaPunto,"aria-hidden":!0}),(0,t.jsxs)("span",{className:I().hiladaCopy,children:[(0,t.jsx)("strong",{className:I().hiladaTitulo,children:e.title||e.updated_at.slice(0,10)}),(0,t.jsx)("small",{className:I().hiladaPie,children:function(e,a){let l=(null!=e?e:"").slice(0,10);return l===new Date().toISOString().slice(0,10)?a.hoy:l}(e.updated_at,g)})]}),a?(0,t.jsx)("span",{className:I().hiladaFlecha,"aria-hidden":!0,
1children:"âº"}):(0,t.jsx)("span",{})]},e.id)})}),(0,t.jsxs)("div",{className:I().railPlan,children:[(0,t.jsxs)("div",{className:I().railPlanFila,children:[(0,t.jsx)("span",{children:g.planRotulo}),(0,t.jsx)("strong",{children:W?"Plus":g.planLibre})]}),U&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:I().usoCopy,children:g.preguntasHoy(U.hits)}),(0,t.jsx)("div",{className:I().usoBarra,role:"img","aria-label":"".concat(U.hits," / ").concat(U.limit),children:(0,t.jsx)("span",{style:{width:"".concat(Math.min(100,Math.round(U.hits/U.limit*100)),"%")}})})]}),(0,t.jsx)(p(),{href:x("/profesional/planes"),children:g.verCapacidad})]})]}),ef=e=>(0,t.jsxs)("form",{className:"".concat(I().composer," ").concat(e?I().compacto:""),onSubmit:e=>{e.preventDefault(),ed()},children:[en&&(0,t.jsxs)("div",{className:I().adjunto,children:[(0,t.jsx)("img",{src:en,alt:""}),(0,t.jsx)("span",{children:g.imgPuesta}),(0,t.jsx)("button",{type:"button",onClick:()=>es(null),"aria-label":g.imgQuitar,title:g.imgQuitar,className:I().adjuntoQuitar,children:"â"})]}),ei&&(0,t.jsx)("p",{className:I().avisoError,role:"status",children:ei}),(0,t.jsxs)("div",{className:I().composerCaja,children:[(0,t.jsx)("input",{ref:eo,type:"file",accept:"image/jpeg,image/png,image/webp,image/gif",style:{display:"none"},onChange:e=>{var a;let l=null==(a=e.target.files)?void 0:a[0];if(e.target.value="",!l)return;if(er(""),!/^image\/(jpeg|jpg|png|webp|gif)$/i.test(l.type))return void er(g.imgTipo);if(l.size>45e5)return void er(g.imgPeso);let t=new FileReader;t.onload=()=>{"string"==typeof t.result&&es(t.result)},t.onerror=()=>er(g.imgFallo),t.readAsDataURL(l)}}),(0,t.jsx)("button",{type:"button",onClick:()=>{var e;return null==(e=eo.current)?void 0:e.click()},disabled:w,"aria-label":g.imgAdjuntar,title:g.imgAdjuntar,className:I().clip,"data-on":en?"1":"0",children:"\uD83D\uDCCE"}),(0,t.jsx)("input",{ref:ee,className:I().entrada,placeholder:g.placeholder,value:_,onChange:e=>N(e.target.value),disabled:w,enterKeyHint:"send","aria-label":g.placeholder}),(0,t.jsx)("button",{type:"submit",className:I().enviar,disabled:w||!_.trim(),"aria-label":g.enviarAria,children:(0,t.jsx)("span",{"aria-hidden":!0,children:"â"})})]}),(0,t.jsx)("p",{className:I().aviso,children:g.descargo})]});return(0,t.jsxs)("div",{className:I().app,children:[(0,t.jsxs)("header",{className:I().cabecera,children:[(0,t.jsxs)(p(),{href:x("/"),className:I().volver,children:[(0,t.jsx)("span",{"aria-hidden":!0,children:"â"})," ",(0,t.jsx)("span",{children:g.volver})]}),(0,t.jsxs)("div",{className:I().identidad,children:[(0,t.jsx)("span",{className:"".concat(I().avatar," ").concat(I().avatarCabecera),children:(0,t.jsx)("img",{src:O,alt:"","aria-hidden":!0})}),(0,t.jsxs)("span",{className:I().identidadTexto,children:[(0,t.jsx)("strong",{className:"".concat(I().nombre," sw-cond"),children:g.nombre}),(0,t.jsxs)("span",{className:I().estado,children:[(0,t.jsx)("i",{"aria-hidden":!0})," ",g.estado]})]})]}),(0,t.jsxs)("div",{className:I().accionesCabecera,children:[(0,t.jsx)("button",{type:"button",className:I().botonHistorialMovil,onClick:()=>L(!0),"aria-label":g.abrirHistorial,children:(0,t.jsx)("span",{"aria-hidden":!0,children:"â°"})}),(0,t.jsxs)("span",{className:I().plan,children:[(0,t.jsx)("span",{className:I().planRotulo,children:g.planRotulo}),(0,t.jsx)("strong",{className:"".concat(I().planBadge," sw-cond"),children:W?"Plus":g.planLibre})]})]})]}),(null==c?void 0:c.entityName)?(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap",padding:"8px 16px",borderBottom:"1px solid var(--line)",background:"rgba(240,241,243,.02)"},children:[(0,t.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:8,minHeight:32,padding:"4px 12px",borderRadius:999,border:"1px solid rgba(74,163,255,.35)",background:"rgba(74,163,255,.08)"},children:[(0,t.jsx)("strong",{className:"sw-cond",style:{fontSize:13,color:"#F0F1F3",letterSpacing:".2px"},children:c.entityName}),c.scope?(0,t.jsx)("span",{style:{fontSize:11,color:"var(--label)"},children:c.scope}):null]}),c.volver?(0,t.jsxs)(p(),{href:c.volver,style:{display:"inline-flex",alignItems:"center",minHeight:44,fontSize:11.5,textTransform:"uppercase",letterSpacing:"1.2px",color:"var(--label)",textDecoration:"none"},children:["â ",g.volver]}):null]}):null,(0,t.jsxs)("div",{className:I().workspace,children:[(0,t.jsx)("aside",{className:I().rail,"aria-label":g.railTitulo,children:eb}),(0,t.jsx)("section",{className:I().principal,"aria-label":g.nombre,children:eg?(0,t.jsxs)("div",{className:I().vacio,children:[(0,t.jsxs)("div",{className:I().vacioIntro,children:[(0,t.jsxs)("div",{className:I().vacioRetrato,children:[(0,t.jsx)("span",{className:I().vacioHalo,"aria-hidden":!0}),(0,t.jsx)(q.A,{lang:d,className:I().vacioFigura,poster2d:O,aspect:"210 / 260"})]}),(0,t.jsx)("p",{className:"".concat(I().continuidad," sw-cond"),children:g.continuidad}),(0,t.jsx)("h1",{className:"".concat(I().vacioTitulo," sw-cond"),children:g.entradilla}),(0,t.jsx)("p",{className:I().vacioSub,children:g.promesa})]}),(0,t.jsx)("div",{className:I().arranques,"aria-label":g.entradilla,children:v.map(e=>(0,t.jsxs)("button",{type:"button",className:I().arranque,onClick:()=>ed(e.pregunta),"data-arranque-sujeto":e.kicker?void 0:"1",children:[(0,t.jsxs)("span",{className:I().arranqueCopy,children:[e.kicker?(0,t.jsx)("small",{className:"".concat(I().arranqueKicker," sw-cond"),children:e.kicker}):null,(0,t.jsx)("strong",{className:I().arranquePregunta,children:e.pregunta})]}),(0,t.jsx)("span",{className:I().arranqueFlecha,"aria-hidden":!0,
1children:"â"})]},e.pregunta))}),ef(!1)]}):(0,t.jsxs)("div",{className:I().conversacion,children:[(0,t.jsx)("div",{className:I().hiloScroll,ref:$,children:(0,t.jsxs)("div",{className:I().hiloAncho,children:[(0,t.jsxs)("div",{className:I().hiloCabecera,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"".concat(I().hiloKicker," sw-cond"),children:o?g.kickerPortada:g.kickerConversacion}),(0,t.jsx)("h1",{className:"".concat(I().hiloTitulo," sw-cond"),children:ex})]}),(0,t.jsx)("span",{className:I().hiloFecha,children:g.hoy})]}),j.map((e,a)=>"user"===e.role?(0,t.jsx)("div",{className:I().tuMensaje,children:e.content},a):(0,t.jsxs)("article",{className:I().suMensaje,children:[(0,t.jsx)("span",{className:"".concat(I().avatar," ").concat(I().avatarMensaje),children:(0,t.jsx)("img",{src:O,alt:"","aria-hidden":!0})}),(0,t.jsxs)("div",{className:I().cuerpoMensaje,children:[(0,t.jsxs)("div",{className:I().autor,children:[(0,t.jsx)("strong",{className:"sw-cond",children:g.nombre}),W&&(0,t.jsx)("span",{className:"".concat(I().autorBadge," sw-cond"),children:g.badgeProfundidad})]}),(0,t.jsx)(Y,{m:e,i:a,a:em})]})]},a)),!w&&(0,t.jsx)(Z,{m:j[j.length-1],onPregunta:e=>{ed(e)}}),w&&(0,t.jsxs)("p",{className:I().pensando,children:[(0,t.jsxs)("span",{className:I().puntos,children:[(0,t.jsx)("i",{}),(0,t.jsx)("i",{}),(0,t.jsx)("i",{})]}),g.pensando]}),(0,t.jsx)("div",{ref:X})]})}),(0,t.jsx)("div",{className:I().dock,children:ef(!0)})]})})]}),H&&(0,t.jsxs)("div",{className:I().cajonMovil,role:"dialog","aria-modal":"true","aria-label":g.railTitulo,children:[(0,t.jsx)("button",{type:"button",className:I().velo,"aria-label":g.cerrarHistorial,onClick:()=>L(!1)}),(0,t.jsxs)("aside",{className:I().cajon,children:[(0,t.jsxs)("div",{className:"".concat(I().cajonCabecera," sw-cond"),children:[(0,t.jsx)("span",{children:g.historial}),(0,t.jsx)("button",{type:"button",className:I().cajonCerrar,"aria-label":g.cerrarHistorial,onClick:()=>L(!1),children:"â"})]}),eb]})]})]})}},55982:e=>{e.exports={app:"analista_app__4l9PJ",cabecera:"analista_cabecera__EPsJL",volver:"analista_volver__sSkSl",identidad:"analista_identidad__JjLda",avatar:"analista_avatar__GTQmT",avatarCabecera:"analista_avatarCabecera__BCHhN",avatarMensaje:"analista_avatarMensaje__7nykk",identidadTexto:"analista_identidadTexto___XP6M",nombre:"analista_nombre__IkMVf",estado:"analista_estado__Pgqax",accionesCabecera:"analista_accionesCabecera__RDM7G",plan:"analista_plan__otd9V",planRotulo:"analista_planRotulo__ZiIHN",planBadge:"analista_planBadge__yvT24",botonHistorialMovil:"analista_botonHistorialMovil__PJ3Pw",workspace:"analista_workspace__J1q0O",rail:"analista_rail__406QR",railDentro:"analista_railDentro__GeTBo",railTop:"analista_railTop__cHxdA",railTitulo:"analista_railTitulo__4taAO",nuevaHilo:"analista_nuevaHilo__as4Fu",railLista:"analista_railLista__kXoc7",hilada:"analista_hilada__hIJIM",hiladaPunto:"analista_hiladaPunto__JfIDV",hiladaCopy:"analista_hiladaCopy__e3j5H",hiladaTitulo:"analista_hiladaTitulo__0Gvs5",hiladaPie:"analista_hiladaPie__HqVo6",hiladaFlecha:"analista_hiladaFlecha__2x9Es",railVacio:"analista_railVacio__RNSx8",railPlan:"analista_railPlan__xMdOT",railPlanFila:"analista_railPlanFila__3OW8Q",usoCopy:"analista_usoCopy__AHQ_1",usoBarra:"analista_usoBarra__axz44",principal:"analista_principal__NxkWD",vacio:"analista_vacio__bmu4g",vacioIntro:"analista_vacioIntro__glC9n",vacioRetrato:"analista_vacioRetrato__HcHD4",vacioFigura:"analista_vacioFigura__GJ01u",vacioHalo:"analista_vacioHalo__l2RIh",continuidad:"analista_continuidad__y_OAX",vacioTitulo:"analista_vacioTitulo__hyr36",vacioSub:"analista_vacioSub__Xjjne",arranques:"analista_arranques__fBWG2",arranque:"analista_arranque__jbrnN",arranqueCopy:"analista_arranqueCopy__0uUti",arranqueKicker:"analista_arranqueKicker__Wdn_e",arranquePregunta:"analista_arranquePregunta__S5wcK",arranqueFlecha:"analista_arranqueFlecha__SQFoY",composer:"analista_composer__2StoN",composerCaja:"analista_composerCaja__Kn_uW",compacto:"analista_compacto__jHr2o",clip:"analista_clip__0_w9_",entrada:"analista_entrada__r32vl",enviar:"analista_enviar__naF3A",aviso:"analista_aviso__As7u0",avisoError:"analista_avisoError__lI4yP",adjunto:"analista_adjunto__aW_YL",adjuntoQuitar:"analista_adjuntoQuitar__m4ZWV",conversacion:"analista_conversacion__DlFYo",hiloScroll:"analista_hiloScroll__bKWas",hiloAncho:"analista_hiloAncho__zvzrh",hiloCabecera:"analista_hiloCabecera__vz4gV",hiloKicker:"analista_hiloKicker__cPHGB",hiloTitulo:"analista_hiloTitulo__Fkgcw",hiloFecha:"analista_hiloFecha__XCzCI",tuMensaje:"analista_tuMensaje__R3uED",suMensaje:"analista_suMensaje__WWtlQ",cuerpoMensaje:"analista_cuerpoMensaje__ulwaj",autor:"analista_autor__8sAEw",autorBadge:"analista_autorBadge__6_N2a",respuesta:"analista_respuesta__fEce2",accesorios:"analista_accesorios__GCL15",pieRespuesta:"analista_pieRespuesta__tIJz_",fuente:"analista_fuente__fnvdV",accionesRespuesta:"analista_accionesRespuesta____VeA",gateBadge:"analista_gateBadge__Yrn8n",seguimientos:"analista_seguimientos__Q0Mr7",seguimiento:"analista_seguimiento__NKFxb",pensando:"analista_pensando__WkH2x",puntos:"analista_puntos__u2Q_M",late:"analista_late__kF4Cd",cupo:"analista_cupo__l8LeE",cupoTitulo:"analista_cupoTitulo__eGlqG",cupoTexto:"analista_cupoTexto__gIWV6",cupoCta:"analista_cupoCta__S12ZM",dock:"analista_dock__rC22A",cajonMovil:"analista_cajonMovil__d80lW",velo:"analista_velo__LIChg",cajon:"analista_cajon__ovDLE",cajonCabecera:"analista_cajonCabecera__omWVV",cajonCerrar:"analista_cajonCerrar__UQTDh"}}}]);
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.