PageSourceSearch

https://www.ahrcm-srmo.org/build/assets/Recorder.02e86d32.js

js ahrcm-srmo.org collected 2026-10-06 18:25:17 UTC 2,111 bytes, 1 lines download raw bytes

1import{d as l,q as h,y as b,e as d,a as r,h as a,l as y,v as R,g as k,f as M,t as T,o as u}from"./app.1c75f29f.js";const E="/build/assets/delete.c17d54ca.svg",L="/build/assets/pause.1530be0a.svg",N="/build/assets/voice.3c0b7d31.svg",S={class:"container"},q={class:"record-button-container text-center"},O={key:0,class:"flex items-center gap-4"},$={class:"text-error-40 text-16-medium"},j={key:0},H=r("i",{class:"flex cursor-pointer text-gray-60 icon-voice-3 text-lg"},null,-1),Y=[H],G={__name:"Recorder",props:{modelValue:{type:[Blob,null],required:!0},sent:{type:Boolean,default:!1}},emits:["update:modelValue","recording","remove"],setup(w,{emit:n}){const x=w,t=l(!1),p=l(null),o=l(0),v=l(null);let c=[],s=null,i=null;h(()=>{document.getElementById("recordedAudioContainer")});const B=()=>{if(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia){alert("Your browser does not support recording!");return}},I=()=>{o.value++},D=()=>{v.value=setInterval(I,1e3)},m=()=>{s.stop(),t.value=!1,clearInterval(v.value)},g=()=>{B(),t.value=!0,n("recording",!0),D(),navigator.mediaDevices.getUserMedia({audio:!0}).then(e=>{s=new MediaRecorder(e),s.start(),s.ondataavailable=V,s.onstop=C}).catch(e=>{alert(`The following error occurred: ${e}`),t.value=!1})},V=e=>{c.push(e.data),i=new Blob(c,{type:"audio/mp3"}),n("update:modelValue",i)},C=()=>{i=new Blob(c,{type:"audio/mp3"});const e=window.URL.createObjectURL(i);p.value=e,s=null},U=l(null);h(()=>{U.value=document.getElementById("progressIndicator")}),b(o,e=>{e==59&&m()}),b(()=>x.sent,e=>{e&&_()});const A=()=>{_()},_=()=>{o.value=0,p.value=null,clearInterval(v.value),t.value=!1,c=[],n("update:modelValue",null),n("recording",!1),n("remove")};return(e,f)=>(u(),d("div",S,[r("div",q,[a(t)||a(o)>0?(u(),d("div",O,[r("img",{src:E,alt:"delete icon",onClick:A}),y(r("img",{src:L,alt:"pause icon",onClick:m},null,512),[[R,a(t)]]),y(r("img",{src:N,alt:"record icon",onClick:g},null,512),[[R,!a(t)]]),r("span",$,[k(" 00:"),a(o)<10?(u(),d("span",j,"0")):M("",!0),k(T(a(o)),1)])])):(u(),d("button",{key:1,onClick:f[0]||(f[0]=z=>g())},Y))])]))}};export{G 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.