import{e as B,_ as h}from"./index.8c439602.js";/* empty css *//* empty css *//* empty css *//* empty css */import{d as v,r as k,bi as C,C as D,D as A,aE as a,b0 as l,aV as E,G as x,bd as y,bs as T,bO as H,bP as P,bN as R,bQ as K,n as N}from"./arco.b143604e.js";import{e as S,f as V,g as U}from"./serial.3518333f.js";import"./chart.9aa904c5.js";import"./vue.12fb94d8.js";const $={class:"container"},I=["innerHTML"],L={name:"Chi"},M=v({...L,setup(z){const o=B(),i=k({status:"\u70B9\u51FB\u5199\u5165\u6309\u94AE\u5199\u5165\u5B57\u5E93\u5230\u8BBE\u5907

",eepromType:""}),g=async(e=0,t)=>{var c;await S(o.connectPort);for(let u=e;u",N(()=>{const n=document==null?void 0:document.getElementById("statusArea");n&&(n.scrollTop=n==null?void 0:n.scrollHeight)});i.status=i.status+"\u5199\u5165\u8FDB\u5EA6\uFF1A100.0%
",await U(o.connectPort)},w=async(e=1)=>{var c,u,n,p,b,F,m;if(o.connectState!=!0){alert("\u8BF7\u5148\u8FDE\u63A5\u624B\u53F0\uFF01");return}if(((c=o.configuration)==null?void 0:c.uart)=="official"){alert("\u56FA\u4EF6\u7248\u672C\u4E0D\u5339\u914D");return}if(e==1&&((u=o.configuration)==null?void 0:u.charset)!="losehu"||e==1&&((n=o.configuration)==null?void 0:n.K)!=!0){alert("\u56FA\u4EF6\u7248\u672C\u4E0D\u5339\u914D");return}if(e==2&&((p=o.configuration)==null?void 0:p.charset)!="gb2312"||e==2&&((b=o.configuration)==null?void 0:b.K)!=!0){alert("\u56FA\u4EF6\u7248\u672C\u4E0D\u5339\u914D");return}if(e==3&&((F=o.configuration)==null?void 0:F.charset)!="gb2312"||e==3&&((m=o.configuration)==null?void 0:m.H)!=!0){alert("\u56FA\u4EF6\u7248\u672C\u4E0D\u5339\u914D");return}i.status=i.status+"\u6B63\u5728\u4E0B\u8F7D\u5B57\u5E93...
";let t;if(e==1){t=await fetch("/old_font.bin");const r=t.body.getReader(),s=[];for(;;){const{done:_,value:f}=await r.read();if(_)break;s.push(...f)}const d=new Uint8Array(s);await g(8192,d);return}if(e==2){t=await fetch("/new_font_k.bin");const r=t.body.getReader(),s=[];for(;;){const{done:_,value:f}=await r.read();if(_)break;s.push(...f)}const d=new Uint8Array(s);await g(9344,d);return}if(e==3){t=await fetch("/new_font_h.bin");const r=t.body.getReader(),s=[];for(;;){const{done:_,value:f}=await r.read();if(_)break;s.push(...f)}const d=new Uint8Array(s);await g(9344,d);return}};return(e,t)=>{const c=C("Breadcrumb"),u=y,n=T,p=H,b=P,F=R,m=K;return D(),A("div",$,[a(c,{items:["\u5C0F\u5DE5\u5177","\u5B57\u5E93\u5199\u5165"]}),a(m,{gutter:20,align:"stretch"},{default:l(()=>[a(F,{span:24},{default:l(()=>[a(b,{class:"general-card",title:"\u5B57\u5E93\u5199\u5165"},{default:l(()=>[a(n,null,{default:l(()=>[a(u,{onClick:t[0]||(t[0]=r=>w(1))},{default:l(()=>[E("\u5199\u5165 117 \u5B57\u5E93\uFF08K\uFF09")]),_:1}),a(u,{onClick:t[1]||(t[1]=r=>w(2))},{default:l(()=>[E("\u5199\u5165 118+ \u5B57\u5E93\uFF08K\uFF09")]),_:1}),a(u,{onClick:t[2]||(t[2]=r=>w(3))},{default:l(()=>[E("\u5199\u5165 118+ \u5B57\u5E93\uFF08H\uFF09")]),_:1})]),_:1}),a(p),x("div",{id:"statusArea",style:{height:"20em","background-color":"azure",color:"silver",overflow:"auto",padding:"20px"},innerHTML:i.status},null,8,I)]),_:1})]),_:1})]),_:1})])}}});const Z=h(M,[["__scopeId","data-v-c103becb"]]);export{Z as default};