PageSourceSearch

https://mof.gov.vn/assets/ArticleReading-B3l_PT4z.js

js mof.gov.vn collected 2026-10-02 06:01:12 UTC 1,719 bytes, 1 lines download raw bytes

1import{k as o,p as k,R as _,f as d,o as v,h as g,g as w,U as V}from"./index-B1UYKE73.js";const b={class:"flex items-center gap-2"},C={class:"h-2 bg-gray-300 rounded overflow-hidden w-40 lg:w-20 xl:w-40"},D={__name:"ArticleReading",props:{content:{type:String,required:!0,default:""}},setup(y){const h=y,i=o(""),l=o([]),a=o(0);let p=null,f=0;const n=o(!1);let s=null,r=null;function m(){const t=window.speechSynthesis.getVoices();l.value=t.filter(e=>e.lang.toLowerCase().startsWith("vi")),l.value.length&&!i.value&&(i.value=l.value[0].name)}k(()=>{"speechSynthesis"in window&&(m(),window.speechSynthesis.onvoiceschanged=m)}),_(()=>{c()});function x(t){const e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText||""}function S(){if(c(),!h.content.trim())return;const t=x(h.content);s=new SpeechSynthesisUtterance(t),s.lang="vi-VN";const e=l.value.find(u=>u.name===i.value);e&&(s.voice=e),f=t.length/15*1e3,p=Date.now(),r=setInterval(()=>{const u=Date.now()-p;a.value=Math.min(u/f*100,100)},200),s.onend=()=>{a.value=100,clearInterval(r),n.value=!1},window.speechSynthesis.speak(s),n.value=!0}function c(){window.speechSynthesis.cancel(),a.value=0,clearInterval(r),n.value=!1}return(t,e)=>(v(),d("div",b,[n.value?g("",!0):(v(),d("div",{key:0,onClick:S,text:"",size:"small",class:"h-7 font-semibold text-primary items-center flex cursor-pointer hover:underline"},"Đọc báo")),n.value?(v(),d("div",{key:1,onClick:c,text:"",size:"small",class:"h-7 font-semibold text-primary items-center flex cursor-pointer hover:underline"},"Dừng đọc")):g("",!0),w("div",C,[w("div",{style:V({width:a.value+"%"}),class:"h-full bg-blue-600 transition-all duration-100"},null,4)])]))}};export{D 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.