1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LivePlayer-B58r5U3V.js","assets/index-BLWRXzF8.js","assets/index-Cr54Dyi-.css","assets/___vite-browser-external_commonjs-proxy-BROmp0Tv.js","assets/extends-CF3RwP-h.js","assets/LivePlayer-CNCXBngZ.css"])))=>i.map(i=>d[i]); 2import{I as k,N as e,a9 as V,eu as ee,z as m,U as te,O as se,cc as ae,fc as le,am as X,K as G,c8 as oe}from"./index-BLWRXzF8.js";import{A as ne,aZ as re,a_ as ie,a$ as ce,b0 as de,a3 as xe,x as Y,b1 as Z,b2 as pe,aY as ue}from"./index-Cdc2US9a.js";import{p as he,c as me,t as fe}from"./Dashboard-DJyNHYkv.js";import{b as be,s as ge}from"./exerciseAnswer-DO9ALEJu.js";import{g as z}from"./imgHelper-CTYT11cS.js";import{f as K,S as Q,F as we,E as ye,G as je,r as Ne}from"./ReviewSession-Dr6bXkB-.js";const ve={pt:"pt",en:"en",es:"es",ja:"en",fr:"fr",it:"it"};function Ce(t){const l=String(t||"").slice(0,2).toLowerCase();return ve[l]||"en"}const ke=["pt","es","fr","it","en"],q=(t,l)=>{const a=((t==null?void 0:t.descendants)||[]).find(s=>(s==null?void 0:s.langCode)===l&&(s==null?void 0:s.word));return a?String(a.word):""},W=t=>{const l=((t==null?void 0:t.senses)||[]).find(Boolean);return l?String(l).replace(/\s+/g," ").trim():""},Se=["sex","sexual","coitus","copulat","intercourse","genital","penis","vagina","vulva","testicl","phallus","prostitut","whore","harlot","brothel","orgy","orgies","bacchanal","lewd","lust","obscene","adulter","incest","rape","debauch","fornicat","concubine","eunuch","castrat","excrement","defecat","urinat","anus","buttock","breast","nipple","nude","naked","erotic","seduc","pimp","sodom"];function Ee(t){const l=[t==null?void 0:t.word,...(t==null?void 0:t.senses)||[],...((t==null?void 0:t.descendants)||[]).map(a=>a==null?void 0:a.word)].join(" ").toLowerCase();return Se.some(a=>l.includes(a))}function _e(t,l="pt",a=3){return(t||[]).filter(s=>(s==null?void 0:s.word)&&q(s,l)&&W(s)).filter(s=>!Ee(s)).slice(0,a).map(s=>({raiz:String(s.word),pos:String(s.pos||""),sentido:W(s),minha:q(s,l),alvo:l,familia:ke.map(r=>({code:r,word:q(s,r)})).filter(r=>r.word)}))}const M={curiosity:t=>[t.titulo,t.conteudo],historical_fact:t=>[t.titulo,t.conteudo],today_in_history:t=>[t.evento||t.titulo,t.descricao||t.conteudo||t.impacto]},Te=t=>[t==null?void 0:t.impacto,t==null?void 0:t.curiosidade,t==null?void 0:t.contexto].filter(l=>typeof l=="string"&&l.trim()).slice(0,2),Ze=t=>{const l=typeof t=="string"?t:t==null?void 0:t.type,a=M[l];if(!a)return!1;if(typeof t=="string")return!0;const[s]=a(t||{})||[];return!!s},Ie=3;function Re(t){return String(t||"").trim().split(/\s+/).filter(Boolean).length>=Ie}const Oe={curiosity:"dashCompo.storyTypeCuriosity",historical_fact:"dashCompo.storyTypeHistory",today_in_history:"dashCompo.storyTypeHistory"},Ae=t=>{var l,a;return(l=t==null?void 0:t.source)!=null&&l.thumbnail?t.source.thumbnail:(a=t==null?void 0:t.source)!=null&&a.youtubeId?`https://img.youtube.com/vi/${t.source.youtubeId}/maxresdefault.jpg`:null},$e=({item:t,navigate:l,isDark:a})=>{var d;const s=k(),r=(t==null?void 0:t._short)||{},p=Ae(r);return e.jsxs("button",{type:"button",onClick:()=>r._id&&l(`/shorts/${r._id}`),"aria-label":r.title||s("dashCompo.storyTypeShort"),className:"block w-full h-full relative overflow-hidden rounded-2xl text-left",children:[p?e.jsx("img",{src:p,alt:r.title||"",className:"absolute inset-0 w-full h-full object-cover"}):e.jsx("div",{className:`absolute inset-0 ${a?"bg-slate-800":"bg-gray-200"}`}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/10 to-black/30"}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx("div",{className:"w-16 h-16 rounded-full bg-white/25 backdrop-blur-sm flex items-center justify-center",children:e.jsx(V,{className:"w-6 h-6 text-white ml-1"})})}),e.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-4",children:[e.jsx("span",{className:"inline-block text-[10px] font-bold uppercase tracking-widest text-white/70 mb-1",children:s("dashCompo.storyTypeShort")}),e.jsx("p",{className:"text-white font-bold text-base leading-snug line-clamp-2",children:r.title||s("dashCompo.storyTypeShort")}),((d=r.channel)==null?void 0:d.name)&&e.jsx("p",{className:"text-white/60 text-xs mt-1 truncate",children:r.channel.name})]})]})},Fe=3,Le=({item:t,navigate:l})=>{var j,S,I,E;const a=k(),s=(t==null?void 0:t._story)||{},{data:r,isError:p}=ee({queryKey:["story-detail",s._id],queryFn:async()=>{const c=await fetch(`${G}/stories/${s._id}`);if(!c.ok)throw new Error("falhou");return c.json()},enabled:!!s._id,staleTime:30*60*1e3,retry:!1}),[d,i]=m.useState(-1),[x,h]=m.useState(null),o=(r==null?void 0:r.story)||r||{},f=(((S=(j=o==null?void 0:o.chapters)==null?void 0:j[0])==null?void 0:S.dialogues)||[]).slice(0,Fe),n=d>=0&&f[d]||null,w=d<0,T=!w&&f.length>0&&d>=f.length,N=p||!!r&&f.length===0,y=m.useRef(null),[g,v]=m.useState(!1),C=m.useCallback(c=>{var _;if(!(!c||g))try{(_=y.current)==null||_.pause();const H=new Audio(c);y.current=H,H.play().catch(()=>{})}catch{}},[g]),P=()=>{h(null),i(c=>c+1)},b=()=>{s._id&&l(`/stories/play/${s._id}`)};m.useEffect(()=>{n!=null&&n.audioUrl&&C(n.audioUrl)},[n==null?void 0:n.audioUrl,C]),m.useEffect(()=>()=>{var c;(c=y.current)==null||c.pause()},[]);const R=(n==null?void 0:n.options)||[],$=R.length>1&&R.some(c=>c.isCorrect),O=(c,_)=>{if(!$){P();return}h({k:_,o:c})},F=(I=o==null?void 0:o.chapters)==null?void 0:I[0],D=z((n==null?void 0:n.characterImage)||(F==null?void 0:F.backgroundImage)||((E=f[0])==null?void 0:E.
2characterImage)),B=((o==null?void 0:o.characters)||[]).find(c=>c.id===(n==null?void 0:n.character)),A=(B==null?void 0:B.name)||(n==null?void 0:n.character)||"",U=((n==null?void 0:n.vocabularyIntroduced)||[]).slice(0,3),L=String(s.language||"").toUpperCase(),u=[s.jlptLevel,s.difficulty,s.estimatedTime?`${s.estimatedTime} min`:""].filter(Boolean);return e.jsxs("div",{className:"relative w-full h-full overflow-hidden rounded-2xl",children:[D?e.jsx("img",{src:D,alt:"",className:"absolute inset-0 w-full h-full object-cover"}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"absolute inset-0 bg-slate-900"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-emerald-600 to-teal-800 opacity-[0.22]"}),e.jsx("span",{"aria-hidden":!0,className:"absolute -right-6 top-6 text-[180px] leading-none font-black text-white/[0.05] select-none",children:L.slice(0,1)||"èª"})]}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-slate-950 via-slate-950/85 to-slate-950/30"}),e.jsxs("div",{className:"absolute inset-0 flex flex-col justify-end p-5 pb-8 gap-3 overflow-y-auto",children:[e.jsxs("span",{className:`inline-flex items-center gap-1.5 self-start px-2 py-1 rounded-md bg-white/15 3 backdrop-blur-sm text-[10px] font-bold uppercase tracking-widest text-white/85`,children:[e.jsx(ne,{className:"w-3 h-3"}),a("dashCompo.storyTypeLangStory"),L?` · ${L}`:""]}),w&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"text-white font-extrabold text-[26px] leading-tight line-clamp-3",children:s.title}),s.description&&e.jsx("p",{className:"text-[14px] leading-snug text-white/75 line-clamp-4",children:s.description}),u.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5",children:u.map(c=>e.jsx("span",{className:"px-2.5 py-1 rounded-lg bg-white/12 text-[11px] font-bold text-white/80 uppercase",children:c},c))}),e.jsx("button",{type:"button",onClick:P,className:`mt-1 self-start px-5 py-3.5 rounded-full bg-white text-slate-900 4 text-[15px] font-extrabold cursor-pointer`,children:a("dashCompo.storyStart")})]}),N&&!w&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"text-white font-extrabold text-2xl leading-tight line-clamp-3",children:s.title}),e.jsxs("button",{type:"button",onClick:b,className:`mt-1 inline-flex items-center gap-2 self-start px-5 py-3 rounded-full 5 bg-white text-slate-900 text-sm font-bold cursor-pointer`,children:[e.jsx(V,{className:"w-3 h-3"})," ",a("dashCompo.storyPlayStory")]})]}),n&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[12px] font-bold text-white/70",children:A}),n.audioUrl&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:()=>C(n.audioUrl),"aria-label":a("dashCompo.storyReplayAudio"),className:"p-1.5 rounded-full bg-white/15 text-white cursor-pointer",children:e.jsx(re,{className:"w-3.5 h-3.5"})}),e.jsx("button",{type:"button",onClick:()=>{var c;v(_=>!_),(c=y.current)==null||c.pause()},"aria-label":a("dashCompo.storyMuteAudio"),className:`p-1.5 rounded-full cursor-pointer ${g?"bg-white/15 text-white/50":"bg-white/15 text-white"}`,children:g?e.jsx(ie,{className:"w-3.5 h-3.5"}):e.jsx(ce,{className:"w-3.5 h-3.5"})})]}),e.jsxs("span",{className:"ml-auto text-[11px] text-white/40 tabular-nums",children:[d+1,"/",f.length]})]}),e.jsx("p",{className:"text-white font-bold text-xl leading-snug",children:n.text}),n.textTranslation&&e.jsx("p",{className:"text-[13px] leading-snug text-white/60",children:n.textTranslation}),U.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5",children:U.map(c=>e.jsxs("span",{className:"px-2.5 py-1.5 rounded-lg bg-white/10 text-[12px] text-white/90",children:[e.jsx("span",{className:"font-bold",children:c.word}),c.reading&&c.reading!==c.word&&e.jsxs("span",{className:"text-white/50",children:[" ",c.reading]}),c.meaning&&e.jsxs("span",{className:"text-white/60",children:[" · ",c.meaning]})]},c.word))}),$&&!x&&e.jsx("ul",{className:"space-y-2",children:R.map((c,_)=>e.jsx("li",{children:e.jsxs("button",{type:"button",onClick:()=>O(c,_),className:`w-full text-left px-4 py-3 rounded-xl text-[13px] leading-snug 6 bg-white/10 hover:bg-white/20 text-white cursor-pointer`,children:[c.text,c.textTranslation&&e.jsx("span",{className:"block text-[11px] opacity-70 mt-0.5",children:c.textTranslation})]})},_))}),$&&x&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`px-4 py-3 rounded-xl text-[13px] leading-snug 7 ${x.o.isCorrect?"bg-emerald-400 text-slate-900 font-bold":"bg-rose-500/80 text-white"}`,children:x.o.text}),(x.o.isCorrect?x.o.feedbackCorrect:x.o.feedbackIncorrect)&&e.jsx("p",{className:`text-[13px] leading-snug ${x.o.isCorrect?"text-emerald-300":"text-rose-200"}`,children:x.o.isCorrect?x.o.feedbackCorrect:x.o.feedbackIncorrect})]}),(!$||x)&&e.jsx("button",{type:"button",onClick:P,className:`mt-1 self-start px-5 py-3 rounded-full bg-white text-slate-900 8 text-sm font-bold cursor-pointer`,children:R.length===1?R[0].text:a("dashCompo.newsNext")})]}),T&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-[13px] font-bold text-white/70",children:a("dashCompo.storyPreviewEnd")}),e.jsx("h2",{className:"text-white font-extrabold text-xl leading-tight line-clamp-2",children:s.title}),e.jsxs("button",{type:"button",onClick:b,className:`inline-flex items-center gap-2 self
8-start px-5 py-3 rounded-full 9 bg-white text-slate-900 text-sm font-bold cursor-pointer`,children:[e.jsx(V,{className:"w-3 h-3"})," ",a("dashCompo.storyContinueFull")]})]})]})]})},J=({texto:t})=>e.jsx(e.Fragment,{children:fe(t).map((l,a)=>l.tipo==="forte"?e.jsx("strong",{className:"font-extrabold text-white",children:l.valor},a):l.tipo==="enfase"?e.jsx("em",{className:"italic",children:l.valor},a):e.jsx(X.Fragment,{children:l.valor},a))}),Pe=({item:t,navigate:l})=>{const a=k(),s=(t==null?void 0:t._news)||{},r=he(s.bullets),p=!!s.imageUrl,d=[{tipo:"manchete",texto:s.headline},...r.map(n=>({tipo:"ponto",texto:n})),...s.summary?[{tipo:"resumo",texto:s.summary}]:[]].filter(n=>n.texto),[i,x]=m.useState(0),h=i>=d.length-1,o=d[i]||d[0],f=n=>{n.stopPropagation(),h||x(w=>w+1)};return e.jsxs("div",{className:"relative w-full h-full overflow-hidden rounded-2xl",children:[p?e.jsx("img",{src:s.imageUrl,alt:"",className:"absolute inset-0 w-full h-full object-cover"}):e.jsx("div",{className:"absolute inset-0 bg-slate-900"}),e.jsx("div",{className:`absolute inset-0 ${p?(o==null?void 0:o.tipo)==="manchete"?"bg-gradient-to-t from-slate-950 via-slate-950/45 to-transparent":"bg-gradient-to-t from-slate-950 via-slate-950/80 to-slate-950/25":"bg-gradient-to-br from-sky-600 to-indigo-700 opacity-[0.18]"}`}),d.length>1&&e.jsx("div",{className:"absolute top-4 inset-x-5 flex gap-1",children:d.map((n,w)=>e.jsx("span",{className:`flex-1 h-[2px] rounded-full ${w<=i?"bg-white/80":"bg-white/20"}`},w))}),e.jsxs("button",{type:"button",onClick:f,"aria-label":(o==null?void 0:o.texto)||"",className:`absolute inset-0 flex flex-col text-left p-5 gap-3 cursor-pointer 10 ${p?"justify-end":"justify-center"} ${h?"pb-24":""}`,children:[e.jsxs("span",{className:`inline-flex items-center gap-1.5 self-start px-2 py-1 rounded-md bg-white/15 11 backdrop-blur-sm text-[10px] font-bold uppercase tracking-widest text-white/85`,children:[e.jsx(de,{className:"w-3 h-3"}),s.category||a("dashCompo.storyTypeNews")]}),e.jsx(te,{mode:"wait",initial:!1,children:e.jsx(se.span,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{duration:.16,ease:[.22,.61,.36,1]},className:"block",children:(o==null?void 0:o.tipo)==="manchete"?e.jsx("h2",{className:"text-white font-extrabold text-2xl leading-tight line-clamp-5",children:e.jsx(J,{texto:o.texto})}):e.jsx("p",{className:"text-white font-semibold text-lg leading-snug line-clamp-6",children:e.jsx(J,{texto:o==null?void 0:o.texto})})},i)}),!h&&e.jsx("span",{className:"text-[11px] font-bold uppercase tracking-widest text-white/45",children:a("dashCompo.newsNext")})]}),h&&e.jsx("div",{className:"absolute inset-x-0 bottom-0 p-5 pt-12 bg-gradient-to-t from-slate-950 via-slate-950/85 to-transparent",children:e.jsx("button",{type:"button",onClick:n=>{n.stopPropagation(),l("/hoje")},className:"w-full px-5 py-3 rounded-full bg-white text-slate-900 text-sm font-bold cursor-pointer",children:a("dashCompo.storyNewsRead")})})]})},Be=({item:t,navigate:l})=>{var L;const a=k(),s=((L=t==null?void 0:t._review)==null?void 0:L.dueCount)||0,[r,p]=m.useState(null),[d,i]=m.useState(0),[x,h]=m.useState(!1),[o,f]=m.useState(null),n=m.useRef([]),[w,T]=m.useState(!1),[N,y]=m.useState(!1),[g,v]=m.useState(!1),[C,P]=m.useState(0);m.useEffect(()=>{let u=!0;return K().then(j=>{u&&p((j==null?void 0:j.items)||[])}),()=>{u=!1}},[]);const b=(r==null?void 0:r[d])||null,R=()=>{w||(T(!0),K(n.current).then(u=>{const j=(u==null?void 0:u.items)||[];j.length>0?p(S=>[...S||[],...j]):y(!0)}).finally(()=>T(!1)))},$=async u=>{if(!(!b||g)){v(!0);try{await Ne(b,{quality:u,timeSpent:0})}catch{}v(!1),P(j=>j+1),h(!1),i(j=>j+1)}},O=u=>e.jsx("div",{className:`w-full h-full overflow-y-auto rounded-2xl p-5 bg-gradient-to-br 12 from-violet-900 via-slate-900 to-slate-900`,children:u});if(r===null)return O(e.jsx("div",{className:"h-full flex items-center justify-center",children:e.jsx("span",{className:"w-6 h-6 rounded-full border-2 border-white/30 border-t-white animate-spin"})}));if(!r.length)return O(e.jsxs("div",{className:"h-full flex flex-col justify-center items-center text-center",children:[e.jsx(xe,{className:"w-12 h-12 text-white/90 mb-4"}),e.jsx("p",{className:"text-white font-extrabold text-4xl leading-none",children:s}),e.jsx("button",{type:"button",onClick:()=>l("/study/review"),className:"mt-6 px-5 py-2.5 rounded-full bg-white text-slate-900 text-sm font-bold",children:a("dashCompo.storyReviewNow")})]}));if(!b)return O(e.jsxs("div",{className:"h-full flex flex-col justify-center items-center text-center",children:[e.jsx(Y,{className:"w-12 h-12 text-white/90 mb-4"}),e.jsx("p",{className:"text-white font-extrabold text-4xl leading-none",children:C}),e.jsx("p",{className:"relative text-white/70 text-sm mt-2",children:a(C===1?"dashCompo.storyReviewDueOne":"dashCompo.storyReviewDueMany",{n:C})}),!N&&e.jsx("button",{type:"button",disabled:w,onClick:R,className:`mt-6 px-5 py-3 rounded-full bg-white text-slate-900 text-sm font-extrabold 13 disabled:opacity-60 cursor-pointer`,children:a(w?"dashCompo.storiesEndLoading":"dashCompo.reviewMore")}),e.jsx("button",{type:"button",onClick:()=>l("/study/review"),className:`px-5 py-2.5 rounded-full bg-white/15 text-white text-sm font-bold cursor-pointer ${N?"mt-6":"mt-2"}`,children:a("dashCompo.storyReviewNow")})]}));b!=null&&b.id&&!n.current.includes(b.id)&&n.current.push(b.id);const F=Q[b.source]||Q.review_item;if(b.source==="writing"||b.source==="speaking"){const u=b.source==="writing",j=u?"/study/writing":"/study/speaking",S=u?b.character:b.item,I=u?[b.characterSet,b.script].filter(
13Boolean).join(" · "):b.language||"",E=u?typeof b.bestScore=="number"?`${b.bestScore}%`:"":b.errorCount>0?String(b.errorCount):"";return O(e.jsxs("div",{className:"min-h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-white/60",children:F.label}),e.jsxs("span",{className:"text-[11px] font-bold text-white/50 tabular-nums",children:[d+1,"/",r.length]})]}),e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 py-6",children:[e.jsx("span",{className:"text-white font-black leading-none text-[92px]",children:S}),I&&e.jsx("span",{className:"text-[13px] text-white/55",children:I}),E&&e.jsx("span",{className:"text-[12px] font-bold text-white/40 tabular-nums",children:u?a("dashCompo.reviewBestScore",{n:E}):a("dashCompo.reviewErrors",{n:E})})]}),e.jsxs("div",{className:"mt-2 flex gap-2",children:[e.jsx("button",{type:"button",onClick:()=>l(j),className:"flex-1 px-4 py-3.5 rounded-xl bg-white text-slate-900 text-[14px] font-extrabold cursor-pointer",children:a("dashCompo.reviewPracticeNow")}),e.jsx("button",{type:"button",onClick:()=>{h(!1),f(null),i(c=>c+1)},className:"px-4 py-3.5 rounded-xl bg-white/12 text-white text-[13px] font-bold cursor-pointer",children:a("dashCompo.reviewSkip")})]})]}))}const B=b.source==="flashcard"?we:ye,A=(()=>{var I,E;if(o===null)return null;const u=b.snapshot||((I=b._raw)==null?void 0:I.exerciseSnapshot)||{};if(u.tipo==="true-or-false"||u.tipo==="right-or-wrong"||!(((E=u.opcoes)==null?void 0:E.length)>0)){const c=be(u);return c===null?null:o===0===c}const S=ge(u).indiceCorreto;return S<0?null:o===S})(),U=A===null?null:A?4:1;return O(e.jsxs("div",{className:"min-h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-white/60",children:F.label}),e.jsxs("span",{className:"text-[11px] font-bold text-white/50 tabular-nums",children:[d+1,"/",r.length]})]}),e.jsx(B,{item:b,revealed:x,onReveal:()=>h(!0),isDark:!0,onTryToAnswer:u=>{f(u??null),h(!0)}}),x&&A!==null&&e.jsx("div",{className:`mt-3 px-4 py-3 rounded-xl text-[13px] font-bold 14 ${A?"bg-emerald-400 text-slate-900":"bg-rose-500/80 text-white"}`,children:a(A?"dashCompo.reviewGotIt":"dashCompo.reviewMissed")}),x&&e.jsx("div",{className:"mt-4 grid grid-cols-2 gap-2",children:je.map(u=>e.jsx("button",{type:"button",disabled:g,onClick:()=>$(u.quality),className:`px-3 py-2.5 rounded-xl text-[13px] font-bold text-white cursor-pointer 15 bg-gradient-to-br ${u.gradient} disabled:opacity-50 16 ${U===u.quality?"ring-2 ring-white":""}`,children:u.label},u.quality))})]}))},Ue=({item:t})=>{var o;const l=k(),[a,s]=m.useState(!1),r=l(Oe[t==null?void 0:t.type]||"dashCompo.storyTypeCuriosity"),[p,d]=((o=M[t==null?void 0:t.type])==null?void 0:o.call(M,t||{}))||[],i=Te(t),x=z(t==null?void 0:t.imagem),h=!!(p&&d)&&Re(p);return p?e.jsxs("div",{className:"relative w-full h-full overflow-hidden rounded-2xl",children:[x?e.jsxs(e.Fragment,{children:[e.jsx("img",{src:x,alt:"",className:"absolute inset-0 w-full h-full object-cover"}),e.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 bg-gradient-to-t from-slate-950 via-slate-950/85 to-slate-950/40"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 bg-slate-900"}),e.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 bg-gradient-to-br from-emerald-500 to-cyan-700 opacity-[0.18]"})]}),e.jsxs("div",{className:"absolute inset-0 flex flex-col justify-end p-5 pb-10 gap-4 overflow-y-auto",children:[e.jsxs("span",{className:`inline-flex items-center gap-1.5 self-start px-2 py-1 rounded-md bg-white/15 17 backdrop-blur-sm text-[10px] font-bold uppercase tracking-widest text-white/85`,children:[e.jsx(Z,{className:"w-3 h-3"}),r]}),e.jsx("p",{className:"text-white font-extrabold text-[26px] leading-[1.15] tracking-tight",children:p}),h&&!a&&e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("button",{type:"button",onClick:()=>s(!0),className:"px-4 py-3 rounded-xl bg-white text-slate-900 text-[13px] font-bold cursor-pointer",children:l("dashCompo.factKnew")}),e.jsx("button",{type:"button",onClick:()=>s(!0),className:"px-4 py-3 rounded-xl bg-white/12 text-white text-[13px] font-bold cursor-pointer",children:l("dashCompo.factNoIdea")})]}),(!h||a)&&d&&e.jsx("p",{className:"text-[15px] leading-relaxed text-white/80",children:d}),(!h||a)&&i.map(f=>e.jsx("p",{className:"text-[13px] leading-relaxed text-white/55",children:f},f))]})]}):null}
17,Me=({item:t,isDark:l})=>{const a=k(),{language:s}=ae(),{openTool:r}=le(),p=X.useMemo(()=>{var o;return _e((o=t==null?void 0:t._etymology)==null?void 0:o.raizes,Ce(s),3)},[t,s]),[d,i]=m.useState(0),x=p[d]||null,h=p.length>0&&d>=p.length;return p.length===0?null:e.jsxs("div",{className:`relative w-full h-full overflow-hidden rounded-2xl ${l?"":"bg-slate-900"}`,children:[e.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 bg-slate-900"}),e.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 bg-gradient-to-br from-amber-500 to-rose-700 opacity-[0.20]"}),e.jsxs("div",{className:"absolute inset-0 flex flex-col justify-end p-5 pb-10 gap-3 overflow-y-auto",children:[e.jsxs("span",{className:`inline-flex items-center gap-1.5 self-start px-2 py-1 rounded-md bg-white/15 18 backdrop-blur-sm text-[10px] font-bold uppercase tracking-widest text-white/85`,children:[e.jsx(pe,{className:"w-3 h-3"}),a("dashCompo.storyTypeEtymology"),e.jsxs("span",{className:"ml-1 text-white/45 tabular-nums",children:[Math.min(d+1,p.length),"/",p.length]})]}),x&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-white font-black leading-none tracking-tight text-[44px]",style:{fontFamily:'Georgia, "Times New Roman", serif'},children:x.raiz}),e.jsxs("p",{className:"text-[12px] font-bold uppercase tracking-widest text-white/45",children:[a("dashCompo.etymLatin"),x.pos?` · ${x.pos}`:""]}),e.jsx("p",{className:"text-[14px] leading-snug text-white/75",children:x.sentido}),e.jsx("p",{className:"mt-1 text-[12px] font-bold uppercase tracking-widest text-white/45",children:a("dashCompo.etymFamily")}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:x.familia.map(o=>e.jsxs("span",{className:`px-2.5 py-2 rounded-lg text-[13px] ${o.code===x.alvo?"bg-white text-slate-900 font-bold":"bg-white/10 text-white/90"}`,children:[e.jsx("span",{className:`uppercase mr-1.5 ${o.code===x.alvo?"text-slate-500":"text-white/40"}`,children:o.code}),o.word]},o.code))}),e.jsx("button",{type:"button",onClick:()=>i(o=>o+1),className:`mt-1 self-start px-5 py-3 rounded-full bg-white/12 text-white 19 text-sm font-bold cursor-pointer`,children:a("dashCompo.newsNext")})]}),h&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-white font-extrabold text-2xl leading-tight",children:a("dashCompo.etymEndTitle")}),e.jsx("p",{className:"text-[14px] leading-snug text-white/70",children:a("dashCompo.etymEndSubtitle")}),e.jsx("button",{type:"button",onClick:()=>r==null?void 0:r("etymology-explorer"),className:`mt-1 self-start px-5 py-3 rounded-full bg-white text-slate-900 20 text-sm font-bold cursor-pointer`,children:a("dashCompo.etymOpenTool")})]})]})]})},De=({total:t,reviewDue:l=0,navigate:a,onClose:s,onAction:r,onCarregarMais:p,carregando:d})=>{const i=k(),x={key:"review",label:i("dashCompo.storiesEndReview",{n:l}),to:"/study/review"},h={key:"study",label:i("dashCompo.storiesEndStudy"),to:"/study"},o={key:"explore",label:i("dashCompo.storiesEndExplore"),to:"/explore"},f=[p&&{key:"mais",label:i(d?"dashCompo.storiesEndLoading":"dashCompo.storiesEndMore"),acao:p},l>0&&x,h,o].filter(Boolean),[n,w,...T]=f,N=y=>{if(y.acao){y.acao();return}r==null||r(y.key),a(y.to)};return e.jsxs("div",{className:`relative w-full h-full overflow-hidden rounded-2xl flex flex-col 21 justify-center items-center text-center p-6 bg-slate-900`,children:[e.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 bg-gradient-to-br from-violet-600 to-indigo-700 opacity-[0.20]"}),e.jsx(Y,{className:"relative w-14 h-14 text-white/90 mb-4"}),e.jsx("p",{className:"relative text-white font-extrabold text-2xl leading-tight",children:i(p?"dashCompo.storiesEndRound":"dashCompo.storiesEndTitle")}),e.jsx("p",{className:"text-white/70 text-sm mt-2",children:i("dashCompo.storiesEndSubtitle",{n:t})}),e.jsxs("div",{className:"relative mt-7 w-full max-w-[280px] flex flex-col gap-2.5",children:[e.jsx("button",{type:"button",disabled:!!d,onClick:()=>N(n),className:`w-full px-5 py-3.5 rounded-xl bg-white text-slate-900 text-[15px] font-extrabold 22 cursor-pointer transition-colors hover:bg-white/90 disabled:opacity-60`,children:n.label}),w&&e.jsx("button",{type:"button",disabled:!!d,onClick:()=>N(w),className:`w-full px-5 py-2.5 rounded-xl bg-white/12 text-white text-[13px] font-bold 23 cursor-pointer transition-colors hover:bg-white/20 disabled:opacity-60`,children:w.label})]}),e.jsxs("div",{className:"relative mt-5 flex items-center gap-4",children:[T.map(y=>e.jsx("button",{type:"button",onClick:()=>N(y),className:"text-xs font-semibold text-white/55 hover:text-white/90 cursor-pointer",children:y.label},y.key)),e.jsx("button",{type:"button",onClick:s,className:"text-xs font-semibold text-white/40 hover:text-white/80 curs
23or-pointer",children:i("dashCompo.storiesEndClose")})]})]})},qe=m.lazy(()=>oe(()=>import("./LivePlayer-B58r5U3V.js"),__vite__mapDeps([0,1,2,3,4,5]))),Ve=({item:t,navigate:l})=>{var x,h;const a=k(),s=(t==null?void 0:t._live)||{},r=typeof s.instructor=="string"?s.instructor:((x=s.instructor)==null?void 0:x.displayName)||((h=s.instructor)==null?void 0:h.name)||"",p=Number(s.viewers)||0,[d,i]=m.useState(null);return m.useEffect(()=>{if(!s.playbackId){i(!1);return}let o=!0;return fetch(`${G}/lives/${s.playbackId}`).then(f=>f.ok?f.json():null).then(f=>{var n;o&&i(((n=f==null?void 0:f.live)==null?void 0:n.playbackUrl)||(f==null?void 0:f.playbackUrl)||!1)}).catch(()=>{o&&i(!1)}),()=>{o=!1}},[s.playbackId]),e.jsxs("div",{className:"relative w-full h-full overflow-hidden rounded-2xl bg-slate-950",children:[s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:"",className:"absolute inset-0 w-full h-full object-cover"}):e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-rose-700 to-slate-900"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-slate-950 via-slate-950/60 to-black/30"}),d&&e.jsx(m.Suspense,{fallback:null,children:e.jsxs("div",{className:"absolute inset-0 flex items-center justify-center story-live",children:[e.jsx("style",{children:` 24 .story-live .vjs-error-display, 25 .story-live .vjs-modal-dialog, 26 .story-live .vjs-error .vjs-poster { display: none !important; } 27 .story-live .vjs-error { background: transparent !important; } 28 /* O LivePlayer tem bg-black na raiz e cobria a thumb quando 29 o stream falha. Transparente aqui: com stream, o proprio 30 video pinta por cima; sem stream, aparece a capa. */ 31 .story-live > div { background: transparent !important; } 32 .story-live .video-js { background: transparent !important; } 33 `}),e.jsx(qe,{playbackUrl:d,thumbnail:s.thumbnail})]})}),e.jsxs("span",{className:`absolute top-4 left-4 z-10 inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md 34 bg-red-600 text-[10px] font-black uppercase tracking-widest text-white`,children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-white animate-pulse"}),a("dashCompo.storyTypeLive")]}),e.jsxs("div",{className:"absolute inset-x-0 bottom-0 z-10 p-5 pt-10 bg-gradient-to-t from-slate-950 via-slate-950/80 to-transparent",children:[r&&e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-white/60",children:r}),e.jsx("h2",{className:"mt-1 text-white font-extrabold text-lg leading-tight line-clamp-2",children:s.title}),e.jsxs("div",{className:"mt-1.5 flex items-center gap-3",children:[p>0&&e.jsx("span",{className:"text-[12px] text-white/60",children:a("dashCompo.liveViewers",{n:me(p)})}),e.jsx("button",{type:"button",onClick:()=>s.playbackId&&l(`/live/${s.playbackId}`),className:"ml-auto px-3.5 py-1.5 rounded-full bg-white/15 text-white text-[12px] font-bold cursor-pointer",children:a("dashCompo.liveWatch")})]})]})]})},Ge=({item:t,navigate:l})=>{const a=k(),s=(t==null?void 0:t._challenge)||{},r=(s.options||[]).map(g=>g==null?void 0:g.label).filter(Boolean).slice(0,5),[p,d]=m.useState(null),[i,x]=m.useState(null),[h,o]=m.useState(!1),[f,n]=m.useState(!1),[w,T]=m.useState(""),N=async g=>{if(!(i||h)){d(g),o(!0),n(!1);try{const v=await fetch(`${G}/daily-challenges/today/${s.tagId}/check`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userAnswer:g})});if(!v.ok)throw new Error("check falhou");const C=await v.json();x({isCorrect:!!C.isCorrect,correctAnswer:C.correctAnswer})}catch{n(!0),d(null)}finally{o(!1)}}},y=g=>i?i.correctAnswer&&g===i.correctAnswer?"bg-emerald-400 text-slate-900 font-bold":g===p?"bg-rose-500/80 text-white":"bg-white/5 text-white/40":p===g?"bg-white/25 text-white":"bg-white/10 text-white/90 hover:bg-white/20";return e.jsxs("div",{className:"relative w-full h-full overflow-y-auto rounded-2xl p-6 bg-slate-900",children:[e.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 bg-gradient-to-br from-amber-500 to-rose-600 opacity-[0.16]"}),e.jsxs("div",{className:"relative min-h-full flex flex-col justify-center",children:[e.jsxs("span",{className:"text-[10px] font-bold uppercase tracking-widest text-white/70",children:[a("dashCompo.storyTypeDaily"),s.topic?` · ${s.topic}`:""]}),e.jsx("h2",{className:"mt-3 text-white font-extrabold text-xl leading-tight line-clamp-4",children:s.question}),r.length>0?e.jsx("ul",{className:"mt-5 space-y-2",children:r.map((g,v)=>e.jsx("li",{children:e.jsxs("button",{type:"button",onClick:()=>N(g),disabled:p!==null||h,className:`w-full text-left flex gap-2.5 items-start px-3 py-2.5 rounded-xl 35 text-[13px] leading-snug transition-colors cursor-pointer 36 disabled:cursor-default ${y(g)}`,children:[e.jsx("span",{className:"font-bold opacity-60",children:String.fromCharCode(65+v)}),e.jsx("span",{className:"line-clamp-2",children:g})]})},v))}):i?null:e.jsxs("form",{className:"mt-5 flex gap-2",onSubmit:g=>{g.preventDefault(),w.trim()&&N(w.trim())},children:[e.jsx("input",{value:w,onChange:g=>T(g.target.value),placeholder:a("dashCompo.challengeType"),disabled:h,className:`flex-1 min-w-0 px-3 py-2.5 rounded-xl bg-white/10 text-white text-[13px] 37 placeholder:text-white/40 outline-none focus:bg-white/15`}),e.jsx("button",{type:"submit",disabled:h||!w.trim(),className:`px-4 py-2.5 rounded-xl bg-white text-slate-900 text-[13px] font-bold 38 cursor-pointer disabled:opacity-40`,children:a("dashCompo.challengeSend")})]}),h&&e.jsx("p",{className:"mt-4 text-[12px] text-white/70",children:a("dashCompo.challengeChecking")}),f&&e.jsxs("div",{className:"mt-4",children:[e.jsx("p",{className:"text-[12px] text-amber-200",children:a("dashCompo.challengeFailed")}),e.jsx("button",{type:"button",onClick:()=>l("/daily-challenges"),className:"mt-2 px-4 py-2 rounded-full bg-white/20 text-white text-[13px] font-bold cursor-pointer",children:a("dashCompo.challengeAnswer")})]}),i&&e.jsxs("div",{className:"mt-4",children:[e.jsx("p",{className:`text-sm font-extrabold ${i.isCorrect?"text-emerald-300":"text-rose-200"}`,children:i.isCorrect?a("dashCompo.challengeCorrect"):a("dashCompo.challengeWrong")}),!i.isCorrect&&i.correctAnswer&&e.jsxs("p",{className:"mt-1 text-[12px] text-white/75",children:[a("dashCompo.challengeRight"),": ",i.correctAnswer]})]}),!i&&!h&&s.hint&&e.jsxs("p",{className:"mt-4 flex items-start gap-2 text-[12px] leading-snug text-white/60",children:[e.jsx(Z,{className:"w-4 h-4 flex-shrink-0 mt-0.5"}),e.jsx("span",{className:"line-clamp-2",children:s.hint})]})]})]})},He=({item:t})=>{const l=k(),[a,s]=m.useState(!1),r=((t==null?void 0:t.sinais_suspeitos)||[]).filter(
38Boolean).slice(0,3),p=(t==null?void 0:t.manchete)||(t==null?void 0:t.afirmacao)||(t==null?void 0:t.titulo)||"";return e.jsxs("div",{className:`w-full h-full overflow-hidden rounded-2xl flex flex-col justify-center 39 p-6 bg-gradient-to-br from-red-700 via-rose-800 to-slate-900`,children:[e.jsxs("span",{className:`inline-flex items-center gap-1.5 self-start px-2 py-1 rounded-md bg-white/15 40 text-[10px] font-bold uppercase tracking-widest text-white/85`,children:[e.jsx(ue,{className:"w-3 h-3"}),l((t==null?void 0:t.type)==="fact_check"?"dashCompo.storyTypeFactCheck":"dashCompo.storyTypeFakeNews")]}),e.jsx("p",{className:"mt-4 text-[11px] font-bold uppercase tracking-widest text-white/50",children:l("dashCompo.fakeNewsPrompt")}),e.jsx("h2",{className:"mt-1.5 text-white font-extrabold text-xl leading-tight line-clamp-4",children:p}),a?e.jsxs("div",{className:"mt-5 space-y-4",children:[(t==null?void 0:t.veredicto)&&e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-white/50",children:l("dashCompo.fakeNewsVerdict")}),e.jsx("p",{className:"mt-1 text-white font-bold text-base leading-snug",children:t.veredicto})]}),r.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-white/50",children:l("dashCompo.fakeNewsSignals")}),e.jsx("ul",{className:"mt-1.5 space-y-1.5",children:r.map((d,i)=>e.jsxs("li",{className:"flex gap-2 text-[13px] leading-snug text-white/85",children:[e.jsx("span",{className:"mt-1.5 w-1.5 h-1.5 rounded-full bg-amber-300 flex-shrink-0"}),e.jsx("span",{className:"line-clamp-2",children:d})]},i))})]}),(t==null?void 0:t.explicacao)&&e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-white/50",children:l("dashCompo.claimExplain")}),e.jsx("p",{className:"mt-1 text-[13px] leading-relaxed text-white/80 line-clamp-3",children:t.explicacao})]}),(t==null?void 0:t.como_verificar)&&e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-white/50",children:l("dashCompo.fakeNewsHow")}),e.jsx("p",{className:"mt-1 text-[13px] leading-relaxed text-white/80 line-clamp-3",children:t.como_verificar})]}),(t==null?void 0:t.fonte)&&e.jsxs("p",{className:"text-[12px] text-white/50",children:[l("dashCompo.claimSource"),": ",t.fonte]})]}):e.jsx("button",{type:"button",onClick:()=>s(!0),className:"mt-6 self-start px-5 py-2.5 rounded-full bg-white text-slate-900 text-sm font-bold",children:l("dashCompo.fakeNewsReveal")})]})},ze=Object.freeze(Object.defineProperty({__proto__:null,StoryChallengeCard:Ge,StoryClaimCheckCard:He,StoryEtymologyCard:Me,StoryFactCard:Ue,StoryFinishCard:De,StoryLangStoryCard:Le,StoryLiveCard:Ve,StoryNewsCard:Pe,StoryReviewCard:Be,StoryShortCard:$e},Symbol.toStringTag,{value:"Module"}));export{$e as S,Le as a,Be as b,Pe as c,Ve as d,Ge as e,Me as f,He as g,Ze as h,Ue as i,ze as j};
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.