PageSourceSearch

https://www.sonoranews.com.br/_nuxt/DGj-mssI.js

js sonoranews.com.br collected 2026-10-08 12:15:59 UTC 3,620 bytes, 1 lines download raw bytes

1import{d as M,i as N,r as c,c9 as O,E as W,q as B,a_ as P,o as E,b as z,e as d,g as v,n as u,u as r,t as D,j as F,D as I,_ as U}from"./B1HgvGcc.js";const V={key:0,class:"speech-reader justify-center w-full flex flex-row flex-wrap items-center",style:{paddingTop:"var(--theme-padding-top-medium)",paddingBottom:"var(--theme-padding-bottom-medium)",gap:"8px"}},q=M({__name:"SpeechReader",props:{content:{type:String,required:!0}},setup(w){const t=N("siteTheme",c({})).value.siteTema.corPrimaria,y=c(!0),p=()=>typeof window<"u"&&"speechSynthesis"in window&&"SpeechSynthesisUtterance"in window?window.speechSynthesis:null,s=()=>{var e;try{(e=p())==null||e.cancel()}catch(i){console.warn("[SpeechReader] Erro ao interromper leitura:",i)}};O(()=>{s()});const a={SLOW:1,NORMAL:2,FAST:4},g=w,b=c([]),o=c(0),m=c(!1),n=c(a.NORMAL);let h=null;const x=()=>{s(),o.value=0,m.value=!1},f=()=>{const e=p();if(!e||o.value>=b.value.length)return;const i=b.value[o.value];i&&(h=new SpeechSynthesisUtterance(i),h.lang="pt-BR",h.rate=n.value,h.onend=()=>{m.value||(o.value++,f())},e.speak(h))},C=()=>{const e=p();if(e){if(e.speaking||m.value){e.resume(),m.value=!1;return}x(),f()}},k=()=>{const e=p();e!=null&&e.speaking&&(e.pause(),m.value=!0)},L=()=>{x()},R=()=>{s(),o.value=Math.min(o.value+1,b.value.length-1),f()},A=()=>{s(),o.value=Math.max(o.value-1,0),f()};W(()=>g.content,()=>{x(),S()});const S=()=>{var _;const e=document.createElement("div");e.innerHTML=g.content;const l=(((_=e.textContent)==null?void 0:_.trim())||"").split(".").map(j=>j.trim()).filter(Boolean);b.value=l};B(()=>{y.value=p()!==null,S(),window.addEventListener("beforeunload",s)}),P(()=>{s(),window.removeEventListener("beforeunload",s)});const T=()=>{n.value===a.NORMAL?n.value=a.FAST:n.value===a.FAST?n.value=a.SLOW:n.value=a.NORMAL,x(),f()};return(e,i)=>{const l=I;return y.value?(E(),z("div",V,[d("button",{onClick:C,style:u({borderColor:r(t),borderStyle:"solid",borderWidth:"2px",color:r(t)}
1),"aria-label":"Ouvir",class:"speech-bnt rounded-circle flex justify-center items-center"},[v(l,{name:"mdi:play",size:"30"})],4),d("button",{onClick:k,style:u({borderColor:r(t),borderStyle:"solid",borderWidth:"2px",color:r(t)}),"aria-label":"Pausar",class:"speech-bnt rounded-circle flex justify-center items-center"},[v(l,{name:"mdi:pause",size:"30"})],4),d("button",{onClick:L,style:u({borderColor:r(t),borderStyle:"solid",borderWidth:"2px",color:r(t)}),"aria-label":"Parar",class:"speech-bnt rounded-circle flex justify-center items-center"},[v(l,{name:"mdi:stop",size:"30"})],4),d("button",{onClick:A,style:u({borderColor:r(t),borderStyle:"solid",borderWidth:"2px",color:r(t)}),"aria-label":"Parágrafo anterior",class:"speech-bnt rounded-circle flex justify-center items-center"},[v(l,{name:"mdi:skip-previous",size:"30"})],4),d("button",{style:u({borderColor:r(t),borderStyle:"solid",borderWidth:"2px",color:r(t),paddingLeft:"var(--theme-padding-left-small)",paddingRight:"var(--theme-padding-right-small)",paddingTop:"var(--theme-padding-top-small)",paddingBottom:"var(--theme-padding-bottom-small)"}),"aria-label":"Alterar velocidade de leitura",onClick:T,class:"speed-bnt rounded flex justify-center items-center text-xs sm:text-sm md:text-base"},D(n.value===a.SLOW?"0.5x (Lento)":n.value===a.NORMAL?"1x (Normal)":"2x (Rápido)"),5),d("button",{onClick:R,style:u({borderColor:r(t),borderStyle:"solid",borderWidth:"2px",color:r(t)}
1),"aria-label":"Parágrafo seguinte",class:"speech-bnt rounded-circle flex justify-center items-center"},[v(l,{name:"mdi:skip-next",size:"30"})],4)])):F("",!0)}}}),J=U(q,[["__scopeId","data-v-30e966dd"]]);export{J as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.