mirror of
https://github.com/silenty4ng/k5web
synced 2024-11-12 21:54:24 +00:00
update
This commit is contained in:
parent
0d4da8535f
commit
0104d774f6
BIN
L_BL001.bin
Normal file
BIN
L_BL001.bin
Normal file
Binary file not shown.
55
assets/chart.3e6cb2f1.js
Normal file
55
assets/chart.3e6cb2f1.js
Normal file
File diff suppressed because one or more lines are too long
BIN
assets/chart.3e6cb2f1.js.gz
Normal file
BIN
assets/chart.3e6cb2f1.js.gz
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
assets/default-layout.96755dff.js.gz
Normal file
BIN
assets/default-layout.96755dff.js.gz
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
assets/dep-6deb4e3a.355b5fc9.js.gz
Normal file
BIN
assets/dep-6deb4e3a.355b5fc9.js.gz
Normal file
Binary file not shown.
Binary file not shown.
@ -1,10 +0,0 @@
|
||||
/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function n(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,a=new Array(e);t<e;t++)a[t]=r[t];return a}function o(r,e){if(!!r){if(typeof r=="string")return n(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return n(r,e)}}/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function u(r){if(Array.isArray(r))return n(r)}function i(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function f(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y(r){return u(r)||i(r)||o(r)||f()}export{y as _,o as a,i as b};
|
1
assets/dialog.2ef52b62.css
Normal file
1
assets/dialog.2ef52b62.css
Normal file
File diff suppressed because one or more lines are too long
BIN
assets/dialog.2ef52b62.css.gz
Normal file
BIN
assets/dialog.2ef52b62.css.gz
Normal file
Binary file not shown.
46
assets/dialog.30d78e3d.js
Normal file
46
assets/dialog.30d78e3d.js
Normal file
File diff suppressed because one or more lines are too long
BIN
assets/dialog.30d78e3d.js.gz
Normal file
BIN
assets/dialog.30d78e3d.js.gz
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
24
assets/form-model.e2f8f96d.js
Normal file
24
assets/form-model.e2f8f96d.js
Normal file
File diff suppressed because one or more lines are too long
BIN
assets/form-model.e2f8f96d.js.gz
Normal file
BIN
assets/form-model.e2f8f96d.js.gz
Normal file
Binary file not shown.
@ -1,14 +1,14 @@
|
||||
import{a as v,_ as f}from"./dep-83cdf63a.1fe6124c.js";import{g as d,h}from"./index.d0c9d757.js";/**
|
||||
import{c as v,b as f}from"./useConfig.b5d89e07.js";import{g as b,h as d}from"./index.c5405c09.js";/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function b(e){if(Array.isArray(e))return e}function m(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,i,n,o,u=[],l=!0,c=!1;try{if(n=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(a=n.call(r)).done)&&(u.push(a.value),u.length!==t);l=!0);}catch(s){c=!0,i=s}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function g(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N(e,t){return b(e)||m(e,t)||v(e,t)||g()}/**
|
||||
*/function h(e){if(Array.isArray(e))return e}function m(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,i,n,o,u=[],l=!0,c=!1;try{if(n=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(a=n.call(r)).done)&&(u.push(a.value),u.length!==t);l=!0);}catch(s){c=!0,i=s}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return u}}function g(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N(e,t){return h(e)||m(e,t)||v(e,t)||g()}/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var p=d,y=h,_="[object Number]";function A(e){return typeof e=="number"||y(e)&&p(e)==_}var E=A;/**
|
||||
*/var p=b,y=d,_="[object Number]";function A(e){return typeof e=="number"||y(e)&&p(e)==_}var E=A;/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function M(){if(typeof navigator>"u"||!navigator)return Number.MAX_SAFE_INTEGER;var e=navigator,t=e.userAgent,r=t.indexOf("compatible")>-1&&t.indexOf("MSIE")>-1,a=t.indexOf("Trident")>-1&&t.indexOf("rv:11.0")>-1;if(r){var i=new RegExp("MSIE (\\d+\\.\\d+);"),n=t.match(i);if(!n)return-1;var o=parseFloat(n[1]);return o<7?6:o}return a?11:Number.MAX_SAFE_INTEGER}function T(){var e,t,r;if(typeof navigator>"u"||!navigator)return!1;var a=navigator.userAgent,i=a.match(/AppleWebKit.+Chrome\/(.+) Safari\/.+/i);if(Number(i==null||(e=i[1])===null||e===void 0?void 0:e.split(".")[0])<100)return!0;var n=a.match(/AppleWebKit.+Version\/(.+) Safari\/.+/i);if(Number(n==null||(t=n[1])===null||t===void 0?void 0:t.split(".")[0])<12)return!0;var o=M();if(o<=11)return!0;var u=a.match(/Firefox\/(.+)/i);return Number(u==null||(r=u[1])===null||r===void 0?void 0:r.split(".")[0])<100}function F(e,t){var r=E(t);if(!e||e.length===0)return r?{length:0,characters:e}:0;for(var a=0,i=0;i<e.length;i++){var n=0;if(e.charCodeAt(i)>127?n=2:n=1,r&&a+n>t)return{length:a,characters:e.slice(0,i)};a+=n}return r?{length:a,characters:e}:a}function O(e){return f(e!=null?e:"").length}function j(e,t,r){return f(r!=null?r:"").slice().length===t?r||"":f(e!=null?e:"").slice(0,t).join("")}export{N as _,O as a,F as b,M as c,b as d,g as e,T as g,E as i,j as l};
|
||||
*/function M(){if(typeof navigator>"u"||!navigator)return Number.MAX_SAFE_INTEGER;var e=navigator,t=e.userAgent,r=t.indexOf("compatible")>-1&&t.indexOf("MSIE")>-1,a=t.indexOf("Trident")>-1&&t.indexOf("rv:11.0")>-1;if(r){var i=new RegExp("MSIE (\\d+\\.\\d+);"),n=t.match(i);if(!n)return-1;var o=parseFloat(n[1]);return o<7?6:o}return a?11:Number.MAX_SAFE_INTEGER}function T(){var e,t,r;if(typeof navigator>"u"||!navigator)return!1;var a=navigator.userAgent,i=a.match(/AppleWebKit.+Chrome\/(.+) Safari\/.+/i);if(Number(i==null||(e=i[1])===null||e===void 0?void 0:e.split(".")[0])<100)return!0;var n=a.match(/AppleWebKit.+Version\/(.+) Safari\/.+/i);if(Number(n==null||(t=n[1])===null||t===void 0?void 0:t.split(".")[0])<12)return!0;var o=M();if(o<=11)return!0;var u=a.match(/Firefox\/(.+)/i);return Number(u==null||(r=u[1])===null||r===void 0?void 0:r.split(".")[0])<100}function F(e,t){var r=E(t);if(!e||e.length===0)return r?{length:0,characters:e}:0;for(var a=0,i=0;i<e.length;i++){var n=0;if(e.charCodeAt(i)>127?n=2:n=1,r&&a+n>t)return{length:a,characters:e.slice(0,i)};a+=n}return r?{length:a,characters:e}:a}function O(e){return f(e!=null?e:"").length}function j(e,t,r){return f(r!=null?r:"").slice().length===t?r||"":f(e!=null?e:"").slice(0,t).join("")}export{N as _,O as a,F as b,M as c,h as d,g as e,T as g,E as i,j as l};
|
BIN
assets/helper.4ea41844.js.gz
Normal file
BIN
assets/helper.4ea41844.js.gz
Normal file
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
import{g as j,i as v,_ as w}from"./helper.ab125cae.js";import{u as x,_ as l}from"./useConfig.f1b2a203.js";import{d as z,c as m,aI as u,aK as N}from"./arco.7f845a67.js";import{c as _,i as C,e as y,w as F}from"./index.d0c9d757.js";import{u as T}from"./slot.696d5493.js";/**
|
||||
import{g as j,i as v,_ as w}from"./helper.4ea41844.js";import{u as x,_ as l}from"./useConfig.b5d89e07.js";import{d as z,c as m,aI as u,aK as N}from"./arco.7f845a67.js";import{c as _,i as C,e as y,w as F}from"./index.c5405c09.js";import{u as T}from"./slot.0936fab4.js";/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
BIN
assets/index.08cc7013.js.gz
Normal file
BIN
assets/index.08cc7013.js.gz
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
assets/index.105ceaee.js.gz
Normal file
BIN
assets/index.105ceaee.js.gz
Normal file
Binary file not shown.
@ -1 +0,0 @@
|
||||
import{v as V,ak as j,_ as B}from"./index.d0c9d757.js";/* empty css *//* empty css *//* empty css */import{d as C,r as E,w as O,o as U,bT as $,bI as I,C as u,D as h,aI as r,aH as i,u as T,G as H,aM as f,aN as v,aK as x,aJ as y,aE as k,bU as J,a$ as R,bJ as F,bL as G}from"./arco.7f845a67.js";import{g as Y}from"./vue.0bef8fc5.js";import{u as q}from"./loading.1a4e75f4.js";import{L as A}from"./index.e98108d6.js";import{S as K}from"./index.36386460.js";import"./chart.95d38b48.js";import"./dep-83cdf63a.1fe6124c.js";import"./useConfig.f1b2a203.js";import"./useDisabled.29f0c6d6.js";import"./helper.ab125cae.js";import"./slot.696d5493.js";const z={class:"container"},P={name:"DIY"},Q=C({...P,setup(W){const M=Y(),{t:S}=V.exports.useI18n(),N=()=>{M.push({path:"/tool/flash",query:{url:"https://k5.vicicode.com/diyapi/LOSEHU"+t.flag.join("")+".bin?v="+new Date().getTime()}})},t=E({versions:[],flag:[],disMatrix:[],disName:[],showSort:[]});O(()=>[...t.flag],()=>{w()});const w=()=>{t.flag.map((a,o)=>{t.disMatrix[o].forEach((l,n)=>{t.versions.indexOf("LOSEHU"+t.flag.join("").substring(0,o)+n+t.flag.join("").substring(o+1)+".bin")==-1?t.disMatrix[o].set(n,!0):t.disMatrix[o].set(n,!1)})})},{loading:L,setLoading:b}=q(!0);return U(async()=>{b(!0);let a=await(await fetch("https://k5.vicicode.com/diyapi/function.json?v="+new Date().getTime())).text();a=JSON.parse(a);let o=[],l=[];a.map(e=>{o[e[e.length-1]-1]=e,l.push(e[e.length-1]-1)}),a=o;let n=[],p=[];a.map(e=>{let _=new Map,c=new Map;for(let s=e[0]*2+1;s<e[0]*3+1;s++)_.set(e[s],!1),S("idea.diy")!=="LOSEHU DIY"?c.set(e[s],e[s-e[0]-e[0]]):c.set(e[s],e[s-e[0]]);n.push(_),p.push(c)}),t.flag=new Array(a.length).fill("0"),t.disName=p,t.disMatrix=n,t.showSort=l;const g=await(await fetch("https://k5.vicicode.com/diyapi/version.json?v="+new Date().getTime())).text();t.versions=JSON.parse(g),w(),b(!1)}),(a,o)=>{const l=j,n=A,p=$,g=J,e=R,_=K,c=I,s=F,D=G;return u(),h("div",z,[r(l,{items:[a.$t("menu.workshop"),a.$t("idea.diy")]},null,8,["items"]),r(D,{gutter:20,align:"stretch"},{default:i(()=>[r(s,{span:24},{default:i(()=>[r(c,{class:"general-card",title:a.$t("idea.diy"),loading:T(L)},{default:i(()=>[r(_,{direction:"vertical"},{default:i(()=>[H("div",null,[f(v(a.$t("oi")),1),r(n,{theme:"primary",href:"https://github.com/losehu/uv-k5-firmware-custom",target:"_blank"},{default:i(()=>[f("https://github.com/losehu/uv-k5-firmware-custom")]),_:1})]),(u(!0),h(x,null,y(t.showSort,m=>(u(),k(g,{modelValue:t.flag[m],"onUpdate:modelValue":d=>t.flag[m]=d,type:"button"},{default:i(()=>[(u(!0),h(x,null,y(t.disMatrix[m],d=>(u(),k(p,{value:d[0],disabled:d[1]},{default:i(()=>[f(v(t.disName[m].get(d[0])),1)]),_:2},1032,["value","disabled"]))),256))]),_:2},1032,["modelValue","onUpdate:modelValue"]))),256)),r(e,{type:"primary",onClick:N},{default:i(()=>[f(v(a.$t("diy.generate")),1)]),_:1})]),_:1})]),_:1},8,["title","loading"])]),_:1})]),_:1})])}}});const _t=B(Q,[["__scopeId","data-v-9368fb4d"]]);export{_t as default};
|
Binary file not shown.
1
assets/index.12d2a811.js
Normal file
1
assets/index.12d2a811.js
Normal file
File diff suppressed because one or more lines are too long
BIN
assets/index.12d2a811.js.gz
Normal file
BIN
assets/index.12d2a811.js.gz
Normal file
Binary file not shown.
@ -1 +1 @@
|
||||
import{m as L,ak as N,_ as F}from"./index.d0c9d757.js";/* empty css *//* empty css *//* empty css */import{d as U,r as V,o as j,bI as A,bP as O,C as h,D as b,aI as f,aH as g,G as x,aK as $,aJ as k,F as T,aM as y,aN as v,a$ as q,ba as z,bJ as H,bL as J,be as K,bf as G}from"./arco.7f845a67.js";import{f as Q}from"./vue.0bef8fc5.js";import{e as W,b as X,g as Y}from"./serial.c741fbda.js";import"./chart.95d38b48.js";const E=w=>(K("data-v-ffb80c1d"),w=w(),G(),w),Z={class:"container"},tt=E(()=>x("div",{id:"canvasDiv",style:{zoom:"250%",display:"none"}},null,-1)),et={style:{padding:"0",margin:"0","border-spacing":"0"}},ot=["onMousedown","onMouseover"],nt=E(()=>x("br",null,null,-1)),at={name:"Backup"},it=U({...at,setup(w){const p=L(),s=V({binaryFile:void 0,loading:!1,matrix:[],mousedown:!1}),I=Q();j(async()=>{if(I.query.url){const e=await fetch(I.query.url,{responseType:"blob"});M(window.URL.createObjectURL(await e.blob()))}});const D=()=>{const e=s.matrix;e.map((n,t)=>{n.map((a,l)=>{e[t][l]=a=="#fff"?"#000":"#fff"})}),s.matrix=e},S=(e,n)=>{if(s.mousedown){const t=s.matrix;t[n][e]=s.matrix[n][e]=="#fff"?"#000":"#fff",s.matrix=t}},M=e=>{const n=document.createElement("canvas");n.width=128,n.height=64;const t=n.cloneNode(),a=document.getElementById("canvasDiv");a.innerHTML="",a==null||a.append(n,t);const l=new Image;l.src=e,l.onload=()=>{const i=n.getContext("2d");i==null||i.drawImage(l,0,0,128,64);const m=i==null?void 0:i.getImageData(0,0,n.width,n.height).data;function _(o,r){const c=(r*128+o)*4;return m[c]+m[c+1]+m[c+2]>128*3?0:1}const d=[];for(let o=0;o<64;o++){d.push([]),d[o]=[];for(let r=0;r<128;r++){const u=!_(r,o);d[o][r]=u?"#fff":"#000"}}s.matrix=d}},P=()=>{const e=document.createElement("input");e.type="file",e.onchange=async()=>{const n=new Blob([e.files[0]],{type:"application/octet-stream"}),t=URL.createObjectURL(n),a=document.createElement("canvas");a.width=128,a.height=64;const l=new Image;l.src=t,l.onload=()=>{const i=a.getContext("2d");i==null||i.drawImage(l,0,0,128,64);const m=i==null?void 0:i.getImageData(0,0,a.width,a.height).data;function _(o,r){const c=(r*128+o)*4;return m[c]+m[c+1]+m[c+2]>128*3?0:1}const d=[];for(let o=0;o<64;o++){d.push([]),d[o]=[];for(let r=0;r<128;r++){const u=!_(r,o);d[o][r]=u?"#fff":"#000"}}s.matrix=d}},e.click()},R=async()=>{const e=s.matrix,n=document.createElement("canvas");n.width=128,n.height=64;const t=n.getContext("2d");t&&(t.fillStyle="#fff",t.fillRect(0,0,n.width,n.height),t.fillStyle="#000");for(let l=0;l<64;l++)for(let i=0;i<128;i++)e[l][i]=="#000"&&(t==null||t.beginPath(),t==null||t.rect(i,l,1,1),t==null||t.fill());const a=document.createElement("a");a.href=n.toDataURL("image/jpeg",1),a.download="image.jpg",a.click()},B=async()=>{var l,i,m,_,d;const e=new Uint8Array(1024);let n=0;for(let o=0;o<64;o+=8)for(let r=0;r<128;r++){let u=0;for(let c=0;c<8;c++)u|=(s.matrix[o+c][r]=="#000"?1:0)<<c;e[n++]=u}if(s.binaryFile=e,p.connectState!=!0){alert(sessionStorage.getItem("noticeConnectK5"));return}if(((l=p.configuration)==null?void 0:l.uart)=="official"){alert(sessionStorage.getItem("noticeVersionNoSupport"));return}if(((i=p.configuration)==null?void 0:i.charset)!="losehu"&&((m=p.configuration)==null?void 0:m.charset)!="gb2312"){alert(sessionStorage.getItem("noticeVersionNoSupport"));return}s.loading=!0;let t=123728;((_=p.configuration)==null?void 0:_.charset)=="gb2312"&&(t=8320),await W(p.connectPort);const a=s.binaryFile;for(let o=t;o<a.length+t;o+=128)await X(p.connectPort,o,a.slice(o-t,o-t+128),128,(d=p.configuration)==null?void 0:d.uart);await Y(p.connectPort),s.loading=!1};return(e,n)=>{const t=N,a=q,l=z,i=A,m=O,_=H,d=J;return h(),b("div",Z,[f(t,{items:[e.$t("menu.list"),e.$t("menu.image")]},null,8,["items"]),f(d,{gutter:20,align:"stretch"},{default:g(()=>[f(_,{span:24},{default:g(()=>[f(m,{loading:s.loading,tip:"\u5199\u5165\u4E2D...",style:{width:"100%"}},{default:g(()=>[f(i,{class:"general-card",title:e.$t("menu.image")+e.$t("global.onStart")},{default:g(()=>[tt,x("div",null,[x("table",et,[(h(!0),b($,null,k(s.matrix,(o,r)=>(h(),b("tr",null,[(h(!0),b($,null,k(o,(u,c)=>(h(),b("td",{onMousedown:C=>{s.mousedown=!0,S(c,r)},onMouseup:n[0]||(n[0]=C=>{s.mousedown=!1}),onMouseover:C=>S(c,r),style:T("background-color: "+u+"; height: 5px; width: 3.5px;")},null,44,ot))),256))]))),256))])]),nt,f(l,null,{default:g(()=>[f(a,{onClick:P},{default:g(()=>[y(v(e.$t("tool.selectImage")),1)]),_:1}),f(a,{disabled:s.matrix.length<64,onClick:D},{default:g(()=>[y(v(e.$t("image.negative")),1)]),_:1},8,["disabled"]),f(a,{disabled:s.matrix.length<64,onClick:R},{default:g(()=>[y(v(e.$t("cps.save")),1)]),_:1},8,["disabled"]),f(a,{type:"primary",disabled:s.matrix.length<64,onClick:B},{default:g(()=>[y(v(e.$t("tool.write")),1)]),_:1},8,["disabled"])]),_:1})]),_:1},8,["title"])]),_:1},8,["loading"])]),_:1})]),_:1})])}}});const pt=F(it,[["__scopeId","data-v-ffb80c1d"]]);export{pt as default};
|
||||
import{m as L,ak as N,_ as F}from"./index.c5405c09.js";/* empty css *//* empty css *//* empty css */import{d as U,r as V,o as j,bI as A,bP as O,C as h,D as b,aI as f,aH as g,G as x,aK as $,aJ as k,F as T,aM as y,aN as v,a$ as q,ba as z,bJ as H,bL as J,be as K,bf as G}from"./arco.7f845a67.js";import{f as Q}from"./vue.0bef8fc5.js";import{e as W,b as X,g as Y}from"./serial.c741fbda.js";import"./chart.3e6cb2f1.js";const E=w=>(K("data-v-ffb80c1d"),w=w(),G(),w),Z={class:"container"},tt=E(()=>x("div",{id:"canvasDiv",style:{zoom:"250%",display:"none"}},null,-1)),et={style:{padding:"0",margin:"0","border-spacing":"0"}},ot=["onMousedown","onMouseover"],nt=E(()=>x("br",null,null,-1)),at={name:"Backup"},it=U({...at,setup(w){const p=L(),s=V({binaryFile:void 0,loading:!1,matrix:[],mousedown:!1}),I=Q();j(async()=>{if(I.query.url){const e=await fetch(I.query.url,{responseType:"blob"});M(window.URL.createObjectURL(await e.blob()))}});const D=()=>{const e=s.matrix;e.map((n,t)=>{n.map((a,l)=>{e[t][l]=a=="#fff"?"#000":"#fff"})}),s.matrix=e},S=(e,n)=>{if(s.mousedown){const t=s.matrix;t[n][e]=s.matrix[n][e]=="#fff"?"#000":"#fff",s.matrix=t}},M=e=>{const n=document.createElement("canvas");n.width=128,n.height=64;const t=n.cloneNode(),a=document.getElementById("canvasDiv");a.innerHTML="",a==null||a.append(n,t);const l=new Image;l.src=e,l.onload=()=>{const i=n.getContext("2d");i==null||i.drawImage(l,0,0,128,64);const m=i==null?void 0:i.getImageData(0,0,n.width,n.height).data;function _(o,r){const c=(r*128+o)*4;return m[c]+m[c+1]+m[c+2]>128*3?0:1}const d=[];for(let o=0;o<64;o++){d.push([]),d[o]=[];for(let r=0;r<128;r++){const u=!_(r,o);d[o][r]=u?"#fff":"#000"}}s.matrix=d}},P=()=>{const e=document.createElement("input");e.type="file",e.onchange=async()=>{const n=new Blob([e.files[0]],{type:"application/octet-stream"}),t=URL.createObjectURL(n),a=document.createElement("canvas");a.width=128,a.height=64;const l=new Image;l.src=t,l.onload=()=>{const i=a.getContext("2d");i==null||i.drawImage(l,0,0,128,64);const m=i==null?void 0:i.getImageData(0,0,a.width,a.height).data;function _(o,r){const c=(r*128+o)*4;return m[c]+m[c+1]+m[c+2]>128*3?0:1}const d=[];for(let o=0;o<64;o++){d.push([]),d[o]=[];for(let r=0;r<128;r++){const u=!_(r,o);d[o][r]=u?"#fff":"#000"}}s.matrix=d}},e.click()},R=async()=>{const e=s.matrix,n=document.createElement("canvas");n.width=128,n.height=64;const t=n.getContext("2d");t&&(t.fillStyle="#fff",t.fillRect(0,0,n.width,n.height),t.fillStyle="#000");for(let l=0;l<64;l++)for(let i=0;i<128;i++)e[l][i]=="#000"&&(t==null||t.beginPath(),t==null||t.rect(i,l,1,1),t==null||t.fill());const a=document.createElement("a");a.href=n.toDataURL("image/jpeg",1),a.download="image.jpg",a.click()},B=async()=>{var l,i,m,_,d;const e=new Uint8Array(1024);let n=0;for(let o=0;o<64;o+=8)for(let r=0;r<128;r++){let u=0;for(let c=0;c<8;c++)u|=(s.matrix[o+c][r]=="#000"?1:0)<<c;e[n++]=u}if(s.binaryFile=e,p.connectState!=!0){alert(sessionStorage.getItem("noticeConnectK5"));return}if(((l=p.configuration)==null?void 0:l.uart)=="official"){alert(sessionStorage.getItem("noticeVersionNoSupport"));return}if(((i=p.configuration)==null?void 0:i.charset)!="losehu"&&((m=p.configuration)==null?void 0:m.charset)!="gb2312"){alert(sessionStorage.getItem("noticeVersionNoSupport"));return}s.loading=!0;let t=123728;((_=p.configuration)==null?void 0:_.charset)=="gb2312"&&(t=8320),await W(p.connectPort);const a=s.binaryFile;for(let o=t;o<a.length+t;o+=128)await X(p.connectPort,o,a.slice(o-t,o-t+128),128,(d=p.configuration)==null?void 0:d.uart);await Y(p.connectPort),s.loading=!1};return(e,n)=>{const t=N,a=q,l=z,i=A,m=O,_=H,d=J;return h(),b("div",Z,[f(t,{items:[e.$t("menu.list"),e.$t("menu.image")]},null,8,["items"]),f(d,{gutter:20,align:"stretch"},{default:g(()=>[f(_,{span:24},{default:g(()=>[f(m,{loading:s.loading,tip:"\u5199\u5165\u4E2D...",style:{width:"100%"}},{default:g(()=>[f(i,{class:"general-card",title:e.$t("menu.image")+e.$t("global.onStart")},{default:g(()=>[tt,x("div",null,[x("table",et,[(h(!0),b($,null,k(s.matrix,(o,r)=>(h(),b("tr",null,[(h(!0),b($,null,k(o,(u,c)=>(h(),b("td",{onMousedown:C=>{s.mousedown=!0,S(c,r)},onMouseup:n[0]||(n[0]=C=>{s.mousedown=!1}),onMouseover:C=>S(c,r),style:T("background-color: "+u+"; height: 5px; width: 3.5px;")},null,44,ot))),256))]))),256))])]),nt,f(l,null,{default:g(()=>[f(a,{onClick:P},{default:g(()=>[y(v(e.$t("tool.selectImage")),1)]),_:1}),f(a,{disabled:s.matrix.length<64,onClick:D},{default:g(()=>[y(v(e.$t("image.negative")),1)]),_:1},8,["disabled"]),f(a,{disabled:s.matrix.length<64,onClick:R},{default:g(()=>[y(v(e.$t("cps.save")),1)]),_:1},8,["disabled"]),f(a,{type:"primary",disabled:s.matrix.length<64,onClick:B},{default:g(()=>[y(v(e.$t("tool.write")),1)]),_:1},8,["disabled"])]),_:1})]),_:1},8,["title"])]),_:1},8,["loading"])]),_:1})]),_:1})])}}});const pt=F(it,[["__scopeId","data-v-ffb80c1d"]]);export{pt as default};
|
BIN
assets/index.20a2d82c.js.gz
Normal file
BIN
assets/index.20a2d82c.js.gz
Normal file
Binary file not shown.
@ -1 +1 @@
|
||||
import{m as B,ak as k,_ as E}from"./index.d0c9d757.js";/* empty css *//* empty css *//* empty css *//* empty css */import{d as v,r as A,o as C,bI as N,C as $,D as I,aI as i,aH as c,aM as p,aN as f,G as P,n as b,a$ as S,ba as T,bG as D,bJ as H,bL as M}from"./arco.7f845a67.js";import{f as V}from"./vue.0bef8fc5.js";import{d as y,c as q,r as _,j as x,k as h,l as L,m as R}from"./serial.c741fbda.js";import"./chart.95d38b48.js";const j={class:"container"},U=["innerHTML"],G={name:"Flash"},O=v({...G,setup(z){const m=B(),e=A({status:"\u70B9\u51FB\u66F4\u65B0\u6309\u94AE\u66F4\u65B0\u56FA\u4EF6\u5230\u8BBE\u5907<br/><br/>",binaryFile:void 0,binaryName:""}),d=V();C(async()=>{var t;if(d.query.url){const o=await fetch(d.query.url),r=(t=o==null?void 0:o.body)==null?void 0:t.getReader();if(r){const n=[];for(;;){const{done:u,value:l}=await r.read();if(u)break;n.push(...l)}const a=new Uint8Array(n);e.binaryFile=a,e.binaryName=d.query.url.substring(d.query.url.lastIndexOf("/")+1).split("?")[0]+" "}}});const F=()=>{const t=document.createElement("input");t.type="file",t.onchange=async()=>{const o=new Blob([t.files[0]],{type:"application/octet-stream"}),r=new Uint8Array(await o.arrayBuffer());e.binaryFile=r,e.binaryName=t.files[0].name},t.click()},g=async()=>{if(!e.binaryFile){alert("\u8BF7\u9009\u62E9\u6587\u4EF6");return}m.connectPort&&await y(m.connectPort);let t=await q();await _(t,24,1e3);const o=x(e.binaryFile),r=new Uint8Array([48,5,o.length,0,...o]);await h(t,r),await _(t,24);const n=L(e.binaryFile);if(n.length>61439)throw new Error("Last resort boundary check failed. Whoever touched the code is an idiot.");for(let a=0;a<n.length;a+=256){const u=n.slice(a,a+256),l=R(u,a,n.length);try{await h(t,l),await _(t,26)}catch(s){return console.log("Flash command rejected. Aborting."),Promise.reject(s)}e.status=e.status+`\u66F4\u65B0\u8FDB\u5EA6 ${(a/n.length*100).toFixed(1)}%<br/>`,b(()=>{const s=document==null?void 0:document.getElementById("statusArea");s&&(s.scrollTop=s==null?void 0:s.scrollHeight)})}e.status=e.status+"\u66F4\u65B0\u8FDB\u5EA6 100.0%<br/>",e.status=e.status+"\u56FA\u4EF6\u66F4\u65B0\u6210\u529F",b(()=>{const a=document==null?void 0:document.getElementById("statusArea");a&&(a.scrollTop=a==null?void 0:a.scrollHeight)}),y(t),m.updateSettings({connectState:!1})};return(t,o)=>{const r=k,n=S,a=T,u=D,l=N,s=H,w=M;return $(),I("div",j,[i(r,{items:[t.$t("menu.list"),t.$t("menu.flash")]},null,8,["items"]),i(w,{gutter:20,align:"stretch"},{default:c(()=>[i(s,{span:24},{default:c(()=>[i(l,{class:"general-card",title:t.$t("menu.flash")+t.$t("global.onBoot")},{default:c(()=>[i(a,null,{default:c(()=>[i(n,{onClick:F},{default:c(()=>[p(f(e.binaryFile?e.binaryName:t.$t("tool.selectFirmware")),1)]),_:1}),i(n,{type:"primary",disabled:!e.binaryFile,onClick:g},{default:c(()=>[p(f(t.$t("tool.flash")),1)]),_:1},8,["disabled"])]),_:1}),i(u),P("div",{id:"statusArea",style:{height:"20em","background-color":"azure",color:"silver",overflow:"auto",padding:"20px"},innerHTML:e.status},null,8,U)]),_:1},8,["title"])]),_:1})]),_:1})])}}});const at=E(O,[["__scopeId","data-v-5cb91e08"]]);export{at as default};
|
||||
import{m as B,ak as k,_ as E}from"./index.c5405c09.js";/* empty css *//* empty css *//* empty css *//* empty css */import{d as v,r as A,o as C,bI as N,C as $,D as I,aI as i,aH as c,aM as p,aN as f,G as P,n as b,a$ as S,ba as T,bG as D,bJ as H,bL as M}from"./arco.7f845a67.js";import{f as V}from"./vue.0bef8fc5.js";import{d as y,c as q,r as _,j as x,k as h,l as L,m as R}from"./serial.c741fbda.js";import"./chart.3e6cb2f1.js";const j={class:"container"},U=["innerHTML"],G={name:"Flash"},O=v({...G,setup(z){const m=B(),e=A({status:"\u70B9\u51FB\u66F4\u65B0\u6309\u94AE\u66F4\u65B0\u56FA\u4EF6\u5230\u8BBE\u5907<br/><br/>",binaryFile:void 0,binaryName:""}),d=V();C(async()=>{var t;if(d.query.url){const o=await fetch(d.query.url),r=(t=o==null?void 0:o.body)==null?void 0:t.getReader();if(r){const n=[];for(;;){const{done:u,value:l}=await r.read();if(u)break;n.push(...l)}const a=new Uint8Array(n);e.binaryFile=a,e.binaryName=d.query.url.substring(d.query.url.lastIndexOf("/")+1).split("?")[0]+" "}}});const F=()=>{const t=document.createElement("input");t.type="file",t.onchange=async()=>{const o=new Blob([t.files[0]],{type:"application/octet-stream"}),r=new Uint8Array(await o.arrayBuffer());e.binaryFile=r,e.binaryName=t.files[0].name},t.click()},g=async()=>{if(!e.binaryFile){alert("\u8BF7\u9009\u62E9\u6587\u4EF6");return}m.connectPort&&await y(m.connectPort);let t=await q();await _(t,24,1e3);const o=x(e.binaryFile),r=new Uint8Array([48,5,o.length,0,...o]);await h(t,r),await _(t,24);const n=L(e.binaryFile);if(n.length>61439)throw new Error("Last resort boundary check failed. Whoever touched the code is an idiot.");for(let a=0;a<n.length;a+=256){const u=n.slice(a,a+256),l=R(u,a,n.length);try{await h(t,l),await _(t,26)}catch(s){return console.log("Flash command rejected. Aborting."),Promise.reject(s)}e.status=e.status+`\u66F4\u65B0\u8FDB\u5EA6 ${(a/n.length*100).toFixed(1)}%<br/>`,b(()=>{const s=document==null?void 0:document.getElementById("statusArea");s&&(s.scrollTop=s==null?void 0:s.scrollHeight)})}e.status=e.status+"\u66F4\u65B0\u8FDB\u5EA6 100.0%<br/>",e.status=e.status+"\u56FA\u4EF6\u66F4\u65B0\u6210\u529F",b(()=>{const a=document==null?void 0:document.getElementById("statusArea");a&&(a.scrollTop=a==null?void 0:a.scrollHeight)}),y(t),m.updateSettings({connectState:!1})};return(t,o)=>{const r=k,n=S,a=T,u=D,l=N,s=H,w=M;return $(),I("div",j,[i(r,{items:[t.$t("menu.list"),t.$t("menu.flash")]},null,8,["items"]),i(w,{gutter:20,align:"stretch"},{default:c(()=>[i(s,{span:24},{default:c(()=>[i(l,{class:"general-card",title:t.$t("menu.flash")+t.$t("global.onBoot")},{default:c(()=>[i(a,null,{default:c(()=>[i(n,{onClick:F},{default:c(()=>[p(f(e.binaryFile?e.binaryName:t.$t("tool.selectFirmware")),1)]),_:1}),i(n,{type:"primary",disabled:!e.binaryFile,onClick:g},{default:c(()=>[p(f(t.$t("tool.flash")),1)]),_:1},8,["disabled"])]),_:1}),i(u),P("div",{id:"statusArea",style:{height:"20em","background-color":"azure",color:"silver",overflow:"auto",padding:"20px"},innerHTML:e.status},null,8,U)]),_:1},8,["title"])]),_:1})]),_:1})])}}});const at=E(O,[["__scopeId","data-v-5cb91e08"]]);export{at as default};
|
BIN
assets/index.2ae73c63.js.gz
Normal file
BIN
assets/index.2ae73c63.js.gz
Normal file
Binary file not shown.
@ -1 +0,0 @@
|
||||
.t-divider{margin:0;padding:0;list-style:none;font:var(--td-font-body-medium);margin:var(--td-comp-margin-xxl) 0;border-top:1px solid var(--td-border-level-1-color);color:var(--td-text-color-primary);box-sizing:border-box}.t-divider--dashed{border-top-style:dashed}.t-divider--horizontal{width:100%;display:flex}.t-divider--vertical{border-top:0;display:inline-block;margin:0 var(--td-comp-margin-m);border-left:1px solid var(--td-border-level-1-color);height:.9em;vertical-align:middle}.t-divider--with-text{display:flex;border-top:0;white-space:nowrap;align-items:center}.t-divider--with-text .t-divider__inner-text:not(:empty){padding:0 1em;display:inline-block}.t-divider--with-text:before,.t-divider--with-text:after{content:"";width:50%;border-top:1px solid var(--td-border-level-1-color)}.t-divider--with-text-left:before{width:5%}.t-divider--with-text-left:after{width:95%}.t-divider--with-text-right:before{width:95%}.t-divider--with-text-right:after{width:5%}.t-divider--dashed:before,.t-divider--dashed:after{border-top:1px dashed var(--td-border-level-1-color)}.t-divider--vertical.t-divider--dashed{border-left:1px dashed var(--td-border-level-1-color)}[data-v-c8ef48f4] ::-webkit-scrollbar-thumb{border-radius:0!important}[data-v-c8ef48f4] .scrollbar::-webkit-scrollbar{height:10px}[data-v-c8ef48f4] .t-table__content::-webkit-scrollbar{height:15px}.container[data-v-c8ef48f4]{padding:0 20px 20px}[data-v-c8ef48f4] .arco-table-th:last-child .arco-table-th-item-title{margin-left:16px}.action-icon[data-v-c8ef48f4]{margin-left:12px;cursor:pointer}.active[data-v-c8ef48f4]{color:#0960bd;background-color:#e3f4fc}.setting[data-v-c8ef48f4]{display:flex;align-items:center;width:200px}.setting .title[data-v-c8ef48f4]{margin-left:12px;cursor:pointer}.ttable[data-v-c8ef48f4] .t-table__affixed-header-elm-wrap{height:60px!important}.ttable[data-v-c8ef48f4] .t-table__content{scrollbar-width:auto!important}
|
Binary file not shown.
Binary file not shown.
1
assets/index.36f442c6.js
Normal file
1
assets/index.36f442c6.js
Normal file
@ -0,0 +1 @@
|
||||
import{m as B,ak as E,_ as S}from"./index.c5405c09.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{d as A,r as F,bT as R,bI as T,C as D,D as U,aI as o,aH as n,G as y,aN as f,aM as _,bg as k,bh as C,bU as V,a$ as H,ba as I,bG as P,bJ as M,bL as N,n as z}from"./arco.7f845a67.js";import{i as G,e as L,b as J,g as K}from"./serial.c741fbda.js";import{C as O}from"./index.d705382f.js";import"./chart.3e6cb2f1.js";import"./vue.0bef8fc5.js";import"./useConfig.b5d89e07.js";import"./index.ab8a635e.js";import"./helper.4ea41844.js";const j={class:"container"},q=["innerHTML"],Q={name:"Chi"},W=A({...Q,setup(X){const s=B(),r=F({status:"\u70B9\u51FB\u5199\u5165\u6309\u94AE\u5199\u5165\u5B57\u5E93\u5230\u8BBE\u5907<br/><br/>",eepromType:"",showHide:0,lang:"Simplified_Chinese"}),g=async(e=0,t)=>{var m;await L(s.connectPort);for(let u=e;u<t.length+e;u+=128)await J(s.connectPort,u,t.slice(u-e,u-e+128),128,(m=s.configuration)==null?void 0:m.uart),r.status=r.status+"\u5199\u5165\u8FDB\u5EA6\uFF1A"+((u-e)/t.length*100).toFixed(1)+"%<br/>",z(()=>{const p=document==null?void 0:document.getElementById("statusArea");p&&(p.scrollTop=p==null?void 0:p.scrollHeight)});r.status=r.status+"\u5199\u5165\u8FDB\u5EA6\uFF1A100.0%<br/>",await K(s.connectPort)},v=async(e=1)=>{var m,u,p,b,w,h;if(s.connectState!=!0){alert(sessionStorage.getItem("noticeConnectK5"));return}if(((m=s.configuration)==null?void 0:m.uart)=="official"){alert(sessionStorage.getItem("noticeVersionNoSupport"));return}r.status=r.status+"\u6B63\u5728\u4E0B\u8F7D\u5B57\u5E93...<br />";let t;if(e==4){(u=s.configuration)!=null&&u.newpinyin?t=await fetch("/pinyin_plus.bin"):t=await fetch("/pinyin.bin");const l=t.body.getReader(),a=[];for(;;){const{done:c,value:i}=await l.read();if(c)break;a.push(...i)}const d=new Uint8Array(a);await g(131072,d);return}if(e==5){const l=await G(s.connectPort,(p=s.configuration)==null?void 0:p.uart);if(l!=262144&&l!=524288){r.status=r.status+"\u53EA\u652F\u6301 2Mbit \u4EE5\u4E0A EEPROM \u5199\u5165<br/>";return}t=await fetch("/ssb.bin");const a=t.body.getReader(),d=[];for(;;){const{done:i,value:$}=await a.read();if(i)break;d.push(...$)}const c=new Uint8Array(d);await g(246312,c);return}if(e==1){if(((b=s.configuration)==null?void 0:b.charset)=="losehu"){t=await fetch("/old_font.bin");const l=t.body.getReader(),a=[];for(;;){const{done:c,value:i}=await l.read();if(c)break;a.push(...i)}const d=new Uint8Array(a);await g(8192,d);return}if(((w=s.configuration)==null?void 0:w.charset)=="gb2312"){t=await fetch("/new_font_k.bin");const l=t.body.getReader(),a=[];for(;;){const{done:c,value:i}=await l.read();if(c)break;a.push(...i)}const d=new Uint8Array(a);await g(9344,d);return}}if(e==6)if(((h=s.configuration)==null?void 0:h.charset)=="gb2312"){t=await fetch("/new_font_k_f.bin");const l=t.body.getReader(),a=[];for(;;){const{done:c,value:i}=await l.read();if(c)break;a.push(...i)}const d=new Uint8Array(a);await g(9344,d);return}else alert("\u4E0D\u652F\u6301\u7684\u7248\u672C")};return(e,t)=>{const m=E,u=R,p=V,b=H,w=O,h=I,l=P,a=T,d=M,c=N;return D(),U("div",j,[o(m,{items:[e.$t("menu.list"),e.$t("menu.font")]},null,8,["items"]),o(c,{gutter:20,align:"stretch"},{default:n(()=>[o(d,{span:24},{default:n(()=>[o(a,{class:"general-card"},{title:n(()=>[y("span",{onClick:t[0]||(t[0]=()=>{r.showHide+=1})},f(e.$t("menu.font")+e.$t("global.onStart")),1)]),default:n(()=>[o(h,null,{default:n(()=>[o(w,{bordered:"",style:{width:"420px"}},{header:n(()=>[_(f(e.$t("tool.fontwrite"))+" ",1),y("div",null,[o(p,{type:"button",size:"mini",modelValue:r.lang,"onUpdate:modelValue":t[1]||(t[1]=i=>r.lang=i)},{default:n(()=>[o(u,{value:"Simplified_Chinese"},{default:n(()=>[_(f(e.$t("tool.Simplified_Chinese")),1)]),_:1}),o(u,{value:"Traditional_Chinese"},{default:n(()=>[_(f(e.$t("tool.Traditional_Chinese")),1)]),_:1})]),_:1},8,["modelValue"])])]),default:n(()=>[y("div",null,[k(o(b,{onClick:t[2]||(t[2]=i=>v(1))},{default:n(()=>[_(f(e.$t("tool.writefontwrite")),1)]),_:1},512),[[C,r.lang=="Simplified_Chinese"]]),k(o(b,{onClick:t[3]||(t[3]=i=>v(6))},{default:n(()=>[_(f(e.$t("tool.writefontwrite")),1)]),_:1},512),[[C,r.lang=="Traditional_Chinese"]])])]),_:1}),o(w,{bordered:""},{header:n(()=>[_(f(e.$t("tool.pinyinwrite")),1)]),default:n(()=>[o(h,null,{default:n(()=>[o(b,{onClick:t[4]||(t[4]=i=>v(4))},{default:n(()=>[_(f(e.$t("tool.writepinyin")),1)]),_:1})]),_:1})]),_:1}),o(w,{bordered:""},{header:n(()=>[_(f(e.$t("tool.ssbpatch")),1)]),default:n(()=>[o(h,null,{default:n(()=>[o(b,{onClick:t[5]||(t[5]=i=>v(5))},{default:n(()=>[_(f(e.$t("tool.writessbpatch")),1)]),_:1})]),_:1})]),_:1})]),_:1}),o(l),y("div",{id:"statusArea",style:{height:"20em","background-color":"azure",color:"silver",overflow:"auto",padding:"20px"},innerHTML:r.status},null,8,q)]),_:1})]),_:1})]),_:1})])}}});const ct=S(W,[["__scopeId","data-v-5b175fa0"]]);export{ct as default};
|
BIN
assets/index.36f442c6.js.gz
Normal file
BIN
assets/index.36f442c6.js.gz
Normal file
Binary file not shown.
1
assets/index.39d1dfb2.js
Normal file
1
assets/index.39d1dfb2.js
Normal file
File diff suppressed because one or more lines are too long
BIN
assets/index.39d1dfb2.js.gz
Normal file
BIN
assets/index.39d1dfb2.js.gz
Normal file
Binary file not shown.
65
assets/index.3c1bf074.js
Normal file
65
assets/index.3c1bf074.js
Normal file
@ -0,0 +1,65 @@
|
||||
import{u as B,a as Ve,_}from"./useConfig.b5d89e07.js";import{d as R,c as h,f as j,g as he,w as E,b as we,i as Oe,o as Ce,t as _e,n as ee,aI as C,bg as Fe,bh as Te,bC as Be}from"./arco.7f845a67.js";import{u as ne,r as te,_ as ae,a as Ee}from"./useGlobalIcon.c6c61ccc.js";import{F as $e,G as Ae,d as Le,c as Ie,w as Pe}from"./index.c5405c09.js";import{i as De,a as Re,b as ce,_ as Se,l as ze}from"./helper.4ea41844.js";/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function He(e,n){if(e==null)return{};var a={},t=Object.keys(e),o,d;for(d=0;d<t.length;d++)o=t[d],!(n.indexOf(o)>=0)&&(a[o]=e[o]);return a}function Ke(e,n){if(e==null)return{};var a=He(e,n),t,o;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(e);for(o=0;o<d.length;o++)t=d[o],!(n.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(a[t]=e[t]))}return a}/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function ke(e){return e===void 0}var We=ke;function se(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),a.push.apply(a,t)}return a}function ve(e){for(var n=1;n<arguments.length;n++){var a=arguments[n]!=null?arguments[n]:{};n%2?se(Object(a),!0).forEach(function(t){ae(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):se(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}var Ue={tag:"svg",attrs:{fill:"none",viewBox:"0 0 26 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M4 1.59l6.17 6.17 7.07 7.07L23.41 21 22 22.41l-2.97-2.96A12.5 12.5 0 011.08 12.3L1 12l.1-.3c.77-2.4 2.24-4.5 4.18-6.02L2.59 3 4 1.59zM6.7 7.1A10.53 10.53 0 003.1 12a10.5 10.5 0 0014.45 5.97l-1.8-1.8a5 5 0 01-6.93-6.93L6.7 7.11zm3.6 3.6a3 3 0 004 4l-4-4zM13 5c-.58 0-1.14.05-1.7.14l-.98.16L10 3.32l.99-.16A12.5 12.5 0 0124.9 11.7l.1.31-.1.3c-.41 1.3-1.03 2.5-1.82 3.58l-.59.8-1.61-1.18.59-.8c.6-.82 1.08-1.73 1.42-2.7A10.5 10.5 0 0013 5zm.51 1.93l.96.29a5 5 0 013.31 3.31l.3.96-1.92.58-.3-.95a3 3 0 00-1.98-1.99l-.95-.3.58-1.9z"}}]},Ge=R({name:"BrowseOffIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:a}=n,t=h(()=>e.size),{className:o,style:d}=ne(t),s=h(()=>["t-icon","t-icon-browse-off",o.value]),v=h(()=>ve(ve({},d.value),a.style)),m=h(()=>({class:s.value,style:v.value,onClick:p=>{var f;return(f=e.onClick)===null||f===void 0?void 0:f.call(e,{e:p})}}));return()=>te(Ue,m.value)}});const Je=Ge;function fe(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),a.push.apply(a,t)}return a}function de(e){for(var n=1;n<arguments.length;n++){var a=arguments[n]!=null?arguments[n]:{};n%2?fe(Object(a),!0).forEach(function(t){ae(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):fe(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}var Xe={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"g",attrs:{clipPath:"url(#clip0_8726_7319)"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2.1 12a10.5 10.5 0 0019.8 0 10.5 10.5 0 00-19.8 0zm-2.01-.3a12.5 12.5 0 0123.82 0l.1.3-.1.3a12.5 12.5 0 01-23.82 0l-.1-.3.1-.3zM12 9a3 3 0 100 6 3 3 0 000-6zm-5 3a5 5 0 1110 0 5 5 0 01-10 0z"}}]}]},Ze=R({name:"BrowseIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:a}=n,t=h(()=>e.size),{className:o,style:d}=ne(t),s=h(()=>["t-icon","t-icon-browse",o.value]),v=h(()=>de(de({},d.value),a.style)),m=h(()=>({class:s.value,style:v.value,onClick:p=>{var f;return(f=e.onClick)===null||f===void 0?void 0:f.call(e,{e:p})}}));return()=>te(Xe,m.value)}});const qe=Ze;function me(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),a.push.apply(a,t)}return a}function pe(e){for(var n=1;n<arguments.length;n++){var a=arguments[n]!=null?arguments[n]:{};n%2?me(Object(a),!0).forEach(function(t){ae(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):me(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}var Qe={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M12 23a11 11 0 100-22 11 11 0 000 22zM8.82 7.4L12 10.6l3.18-3.19 1.42 1.42L13.4 12l3.19 3.18-1.42 1.42L12 13.4 8.82 16.6 7.4 15.18 10.6 12 7.4 8.82 8.82 7.4z"}}]},Ye=R({name:"CloseCircleFilledIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:a}=n,t=h(()=>e.size),{className:o,style:d}=ne(t),s=h(()=>["t-icon","t-icon-close-circle-filled",o.value]),v=h(()=>pe(pe({},d.value),a.style)),m=h(()=>({class:s.value,style:v.value,onClick:p=>{var f;return(f=e.onClick)===null||f===void 0?void 0:f.call(e,{e:p})}}));return()=>te(Qe,m.value)}});const en=Ye;/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function nn(e,n,a,t){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"value",d=he(),s=d.emit,v=d.vnode,m=j(),p=v.props||{},f=Object.prototype.hasOwnProperty.call(p,"modelValue")||Object.prototype.hasOwnProperty.call(p,"model-value"),r=Object.prototype.hasOwnProperty.call(p,o)||Object.prototype.hasOwnProperty.call(p,$e(o));return f?[n,function(i){s("update:modelValue",i);for(var c=arguments.length,w=new Array(c>1?c-1:0),b=1;b<c;b++)w[b-1]=arguments[b];t==null||t.apply(void 0,[i].concat(w))}]:r?[e,function(i){s("update:".concat(o),i);for(var c=arguments.length,w=new Array(c>1?c-1:0),b=1;b<c;b++)w[b-1]=arguments[b];t==null||t.apply(void 0,[i].concat(w))}]:(m.value=a,[m,function(i){m.value=i;for(var c=arguments.length,w=new Array(c>1?c-1:0),b=1;b<c;b++)w[b-1]=arguments[b];t==null||t.apply(void 0,[i].concat(w))}])}/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var W=new Set,tn={warn:function(n,a){console.warn("TDesign ".concat(n," Warn: ").concat(a))},warnOnce:function(n,a){var t="TDesign ".concat(n," Warn: ").concat(a);W.has(t)||(W.add(t),console.warn(t))},error:function(n,a){console.error("TDesign ".concat(n," Error: ").concat(a))},errorOnce:function(n,a){var t="TDesign ".concat(n," Error: ").concat(a);W.has(t)||(W.add(t),console.error(t))},info:function(n,a){console.info("TDesign ".concat(n," Info: ").concat(a))}};/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function an(e,n){if(!(typeof window>"u")){var a=window&&window.ResizeObserver;if(!!a){var t=null,o=function(){!t||!e.value||(t.unobserve(e.value),t.disconnect(),t=null)},d=function(v){t=new ResizeObserver(n),t.observe(v)};e&&E(e,function(s){o(),s&&d(s)},{immediate:!0,flush:"post"}),we(function(){o()})}}}/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var rn={align:{type:String,default:"left",validator:function(n){return n?["left","center","right"].includes(n):!0}},allowInputOverMax:Boolean,autoWidth:Boolean,autocomplete:{type:String,default:void 0},autofocus:Boolean,borderless:Boolean,clearable:Boolean,disabled:Boolean,format:{type:Function},inputClass:{type:[String,Object,Array]},label:{type:[String,Function]},maxcharacter:{type:Number},maxlength:{type:[String,Number]},name:{type:String,default:""},placeholder:{type:String,default:void 0},prefixIcon:{type:Function},readonly:Boolean,showClearIconOnEmpty:Boolean,showLimitNumber:Boolean,size:{type:String,default:"medium",validator:function(n){return n?["small","medium","large"].includes(n):!0}},status:{type:String,default:void 0,validator:function(n){return n?["default","success","warning","error"].includes(n):!0}},suffix:{type:[String,Function]},suffixIcon:{type:Function},tips:{type:[String,Function]},type:{type:String,default:"text",validator:function(n){return n?["text","number","url","tel","password","search","submit","hidden"].includes(n):!0}},value:{type:[String,Number],default:void 0},modelValue:{type:[String,Number],default:void 0},defaultValue:{type:[String,Number]},onBlur:Function,onChange:Function,onClear:Function,onClick:Function,onCompositionend:Function,onCompositionstart:Function,onEnter:Function,onFocus:Function,onKeydown:Function,onKeypress:Function,onKeyup:Function,onMouseenter:Function,onMouseleave:Function,onPaste:Function,onValidate:Function,onWheel:Function};/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function xe(e){var n=he(),a=h(function(){return n.props.disabled}),t=Oe("formDisabled",Object.create(null)),o=t.disabled;return h(function(){return a.value||(o==null?void 0:o.value)||(e==null?void 0:e.value)||!1})}/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var _n=function(){var n=B();return h(function(){var a="".concat(n.value,"-form"),t="".concat(n.value,"-input"),o="".concat(n.value,"-is");return{form:a,label:"".concat(a,"__label"),labelTop:"".concat(a,"__label--top"),inline:"".concat(a,"-inline"),formItem:"".concat(a,"__item"),formItemWithHelp:"".concat(a,"__item-with-help"),formItemWithExtra:"".concat(a,"__item-with-extra"),controls:"".concat(a,"__controls"),controlsContent:"".concat(a,"__controls-content"),status:"".concat(a,"__status"),extra:"".concat(t,"__extra"),help:"".concat(t,"__help"),success:"".concat(o,"-success"),successBorder:"".concat(a,"--success-border"),error:"".concat(o,"-error"),warning:"".concat(o,"-warning")}})},on=function(e){return e.TO_BE_VALIDATED="not",e.SUCCESS="success",e.FAIL="fail",e}(on||{}),In=Symbol("FormProvide"),ln=Symbol("FormItemProvide");/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function un(e){var n=function(v){var m=e.value,p=m.allowInputOverMax,f=m.maxlength,r=m.maxcharacter;if(!(f||r)||p||!v)return v;if(f)return ze(v,f);if(r){var i=ce(v,r);if(Ae(i))return i.characters}},a=h(function(){var s=e.value,v=s.maxlength,m=s.maxcharacter,p=s.value;if(De(p))return String(p);if(v&&m&&tn.warn("Input","Pick one of maxlength and maxcharacter please."),v){var f=p!=null&&p.length?Re(p):0;return"".concat(f,"/").concat(v)}return m?"".concat(ce(p||""),"/").concat(m):""}),t=h(function(){if(a.value){var s=a.value.split("/"),v=Se(s,2),m=v[0],p=v[1];return Number(m)>Number(p)?"error":""}return""}),o=h(function(){var s=e.value.status;return s||t.value}),d=function(){var v,m;(v=(m=e.value).onValidate)===null||v===void 0||v.call(m,{error:t.value?"exceed-maximum":void 0})};return E(t,d),Ce(function(){t.value&&d()}),{tStatus:o,limitNumber:a,getValueByLimitNumber:n}}/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function U(e,n){return n==="number"?e||e===0?Number(e):void 0:e}function cn(e,n){var a=_e(e),t=a.value,o=a.modelValue,d=j(),s=j(!1),v=j(),m=j(null),p=j(),f=xe(),r=nn(t,o,e.defaultValue,e.onChange),i=Se(r,2),c=i[0],w=i[1],b=j(!1),V=j(!1),S=j(e.type),I=j(null),P=h(function(){return{value:[void 0,null].includes(c.value)?void 0:String(c.value),status:e.status,maxlength:Number(e.maxlength),maxcharacter:e.maxcharacter,allowInputOverMax:e.allowInputOverMax,onValidate:e.onValidate}}),$=un(P),F=$.limitNumber,A=$.getValueByLimitNumber,L=$.tStatus,z=h(function(){return(c.value&&!f.value&&e.clearable&&!e.readonly||e.showClearIconOnEmpty)&&b.value}),D=function(){var u;V.value=!0,(u=I.value)===null||u===void 0||u.focus()},G=function(){var u;V.value=!1,(u=I.value)===null||u===void 0||u.blur()},J=function(u){var l;b.value&&V.value||(d.value=c.value,!e.disabled&&(V.value=!0,(l=e.onFocus)===null||l===void 0||l.call(e,c.value,{e:u})))},X=function(u){var l,y=u.e,N=e.type==="number"?void 0:"";w(N,{e:y,trigger:"clear"}),(l=e.onClear)===null||l===void 0||l.call(e,{e:y})},H=function(u){p.value=u.target},K=function(){var u=S.value==="password"?"text":"password";S.value=u},O=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",l=I.value;if(!!l){var y=String(u);!l.value||l.value!==y&&(l.value=y)}},k=function(u){var l,y=u.target,N=y.value;e.type!=="number"&&typeof c.value=="string"&&N.length>((l=c.value)===null||l===void 0?void 0:l.length)&&(N=A(N)),w(U(N,e.type),{e:u,trigger:"input"}),ee(function(){O(c.value)})},Z=function(u){var l=u.inputType&&u.inputType==="insertCompositionText",y=u.currentTarget.value;if(l||s.value){v.value=y;return}k(u)},M=function(){var u,l=p.value;if(!l||!l.tagName||!((u=m.value)!==null&&u!==void 0&&u.$el)||!["path","svg"].includes(l.tagName))return!1;for(;l;){var y;if(((y=m.value)===null||y===void 0?void 0:y.$el)===l)return!0;l=l.parentNode}return!1},T=Oe(ln,void 0),q=function(u){if(M())D();else{var l;e.format&&(d.value=typeof c.value=="number"||e.type==="number"?c.value:e.format(c.value)),V.value=!1,(l=e.onBlur)===null||l===void 0||l.call(e,c.value,{e:u}),T==null||T.handleBlur()}},Q=function(u){var l;s.value=!1,v.value="",k(u),(l=e.onCompositionend)===null||l===void 0||l.call(e,String(c.value),{e:u})},Y=function(u){var l;s.value=!0;var y=u.currentTarget.value;v.value=y,(l=e.onCompositionstart)===null||l===void 0||l.call(e,String(c.value),{e:u})},x=function(u){var l,y;(l=I.value)===null||l===void 0||l.focus(),(y=e.onClick)===null||y===void 0||y.call(e,{e:u})};return E(function(){return e.autofocus},function(g){g===!0&&ee(function(){var u;(u=I.value)===null||u===void 0||u.focus()})},{immediate:!0}),E(c,function(g,u){var l=e.type==="number";u===void 0&&e.format&&typeof g!="number"&&!l?d.value=e.format(g):d.value=g;var y=typeof g=="number"?g:A(g);y!==g&&!l&&w(y,{trigger:"initial"})},{immediate:!0}),E(function(){return e.type},function(g){S.value=g},{immediate:!0}),n({inputRef:I,focus:D,blur:G}),{isHover:b,focused:V,renderType:S,showClear:z,inputRef:I,clearIconRef:m,inputValue:d,isComposition:s,compositionValue:v,limitNumber:F,tStatus:L,emitFocus:J,formatAndEmitBlur:q,onHandleCompositionend:Q,onHandleCompositionstart:Y,onRootClick:x,emitPassword:K,handleInput:Z,emitClear:X,onClearIconMousedown:H,innerValue:c}}/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function sn(e,n){var a=function(r){if(!e.disabled){var i=r.code,c=U(r.currentTarget.value,e.type);if(/enter/i.test(i)||/enter/i.test(r.key)){var w;(w=e.onEnter)===null||w===void 0||w.call(e,c,{e:r})}else{var b;(b=e.onKeydown)===null||b===void 0||b.call(e,c,{e:r})}}},t=function(r){var i;if(!e.disabled){var c=U(r.currentTarget.value,e.type);(i=e.onKeyup)===null||i===void 0||i.call(e,c,{e:r})}},o=function(r){var i;if(!e.disabled){var c=U(r.currentTarget.value,e.type);(i=e.onKeypress)===null||i===void 0||i.call(e,c,{e:r})}},d=function(r){var i;if(!e.disabled){var c=r.clipboardData||window.clipboardData;(i=e.onPaste)===null||i===void 0||i.call(e,{e:r,pasteValue:c==null?void 0:c.getData("text/plain")})}},s=function(r){return n.value=r},v=function(r){var i;return(i=e.onWheel)===null||i===void 0?void 0:i.call(e,{e:r})},m=function(r){var i;s(!0),(i=e.onMouseenter)===null||i===void 0||i.call(e,{e:r})},p=function(r){var i;s(!1),(i=e.onMouseleave)===null||i===void 0||i.call(e,{e:r})};return{isHover:n,handleKeydown:a,handleKeyUp:t,handleKeypress:o,onHandlePaste:d,onHandleMousewheel:v,onInputMouseenter:m,onInputMouseleave:p}}/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var vn=100;function fn(e,n,a){var t=_e(e),o=t.autoWidth,d=t.placeholder,s=j(null),v=j(null),m=function(){if(!(!s.value||!n.value)){var r=s.value.getBoundingClientRect(),i=r.width;n.value.style.width="".concat(i||0,"px")}};an(n,function(){o.value&&(v.value=setTimeout(function(){m(),clearTimeout(v.value)},vn))}),we(function(){clearTimeout(v.value)});var p=function(){E([a,d],function(){!o.value||ee(function(){m()})},{immediate:!0})};return Ce(function(){o.value&&p()}),{inputPreRef:s}}/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var dn=["isHover","tStatus","inputRef","renderType","showClear","focused","inputValue","isComposition","compositionValue","innerValue","limitNumber"];function ge(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),a.push.apply(a,t)}return a}function ye(e){for(var n=1;n<arguments.length;n++){var a=arguments[n]!=null?arguments[n]:{};n%2?ge(Object(a),!0).forEach(function(t){_(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ge(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function be(e){var n={};return Object.keys(e).forEach(function(a){We(e[a])||(n[a]=e[a])}),n}var mn=R({name:"TInput",props:ye(ye({},rn),{},{showInput:{type:Boolean,default:!0},keepWrapperWidth:{type:Boolean,default:!1}}),setup:function(n,a){var t=a.expose,o=Le("input"),d=o.globalConfig,s=Ee({BrowseIcon:qe,BrowseOffIcon:Je,CloseCircleFilledIcon:en}),v=s.BrowseIcon,m=s.BrowseOffIcon,p=s.CloseCircleFilledIcon,f=xe(),r=B("input"),i=B("input__wrap"),c=B("input__tips"),w=Ve(),b=w.STATUS,V=w.SIZE,S=B(),I=Ie(),P=cn(n,t),$=P.isHover,F=P.tStatus,A=P.inputRef,L=P.renderType,z=P.showClear,D=P.focused,G=P.inputValue,J=P.isComposition,X=P.compositionValue,H=P.innerValue,K=P.limitNumber,O=Ke(P,dn),k=fn(n,A,H),Z=k.inputPreRef,M=sn(n,$),T=h(function(){var x;return(x=n.placeholder)!==null&&x!==void 0?x:d.value.placeholder}),q=h(function(){var x;return be({autofocus:n.autofocus,disabled:f.value,readonly:n.readonly,placeholder:T.value,maxlength:!n.allowInputOverMax&&n.maxlength||void 0,name:n.name||void 0,type:L.value,autocomplete:(x=n.autocomplete)!==null&&x!==void 0?x:d.value.autocomplete||void 0,unselectable:n.readonly?"on":void 0})}),Q=h(function(){return[i.value,_({},"".concat(r.value,"--auto-width"),n.autoWidth&&!n.keepWrapperWidth)]}),Y=be({onFocus:O.emitFocus,onBlur:O.formatAndEmitBlur,onKeydown:M.handleKeydown,onKeyup:M.handleKeyUp,onKeypress:M.handleKeypress,onPaste:M.onHandlePaste,onCompositionend:O.onHandleCompositionend,onCompositionstart:O.onHandleCompositionstart});return function(){var x,g,u=I("prefixIcon"),l=I("suffixIcon"),y=I("passwordIcon"),N=I("label",{silent:!0}),re=I("suffix"),oe=K.value&&n.showLimitNumber?C("div",{class:["".concat(S.value,"-input__limit-number"),_({},"".concat(S.value,"-is-disabled"),f.value)]},[K.value]):null,le=N?C("div",{class:"".concat(r.value,"__prefix")},[N]):null,ue=re||oe?C("div",{class:"".concat(r.value,"__suffix")},[re,oe]):null;n.type==="password"&&(L.value==="password"?l=C(m,{class:"".concat(r.value,"__suffix-clear"),onClick:O.emitPassword},null):L.value==="text"&&(l=C(v,{class:"".concat(r.value,"__suffix-clear"),onClick:O.emitPassword},null))),z.value&&(n.type==="password"?y=C(p,{ref:O.clearIconRef,class:"".concat(r.value,"__suffix-clear"),onClick:O.emitClear,onMousedown:O.onClearIconMousedown},null):l=C(p,{ref:O.clearIconRef,class:"".concat(r.value,"__suffix-clear"),onClick:O.emitClear,onMousedown:O.onClearIconMousedown},null));var je=[r.value,n.inputClass,_(_(_(_(_(_(_(_(_({},V.value[n.size],n.size!=="medium"),b.value.disabled,f.value),b.value.focused,f.value?!1:D.value),"".concat(S.value,"-is-").concat(F.value),F.value&&F.value!=="default"),"".concat(S.value,"-align-").concat(n.align),n.align!=="left"),"".concat(S.value,"-is-readonly"),n.readonly),"".concat(r.value,"--prefix"),u||le),"".concat(r.value,"--suffix"),l||ue),"".concat(r.value,"--focused"),D.value)],ie=I("tips"),Me=[c.value,"".concat(S.value,"-tips"),"".concat(S.value,"-is-").concat(F.value||"default")];return Fe(C("div",{class:Q.value},[C("div",{class:je,onClick:O.onRootClick,onMouseenter:M.onInputMouseenter,onMouseleave:M.onInputMouseleave,onWheel:M.onHandleMousewheel},[u?C("span",{class:["".concat(r.value,"__prefix"),"".concat(r.value,"__prefix-icon")]},[u]):null,le,C("input",Be({class:["".concat(r.value,"__inner"),_({},"".concat(r.value,"--soft-hidden"),!n.showInput)]},q.value,Y,{ref:A,value:J.value?(x=X.value)!==null&&x!==void 0?x:"":(g=G.value)!==null&&g!==void 0?g:"",onInput:function(Ne){return O.handleInput(Ne)}}),null),n.autoWidth&&C("span",{ref:Z,class:"".concat(S.value,"-input__input-pre")},[H.value||T.value]),ue,y?C("span",{class:["".concat(r.value,"__suffix"),"".concat(r.value,"__suffix-icon"),"".concat(r.value,"__clear")]},[y]):null,l?C("span",{class:["".concat(r.value,"__suffix"),"".concat(r.value,"__suffix-icon"),_({},"".concat(r.value,"__clear"),z.value)]},[l]):null]),ie&&C("div",{class:Me},[ie])]),[[Te,n.type!=="hidden"]])}}});/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var pn={separate:Boolean};/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var gn=R({name:"TInputGroup",props:pn,setup:function(n){var a=B("input-group"),t=Ie(),o=h(function(){return[a.value,_({},"".concat(a.value,"--separate"),n.separate)]});return function(){return C("div",{class:o.value},[t("default")])}}});/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var Pn=Pe(mn);Pe(gn);export{qe as B,en as C,In as F,Pn as I,on as V,Ke as _,ln as a,nn as b,an as c,xe as d,un as e,We as i,tn as l,_n as u};
|
BIN
assets/index.3c1bf074.js.gz
Normal file
BIN
assets/index.3c1bf074.js.gz
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
assets/index.3f02f4cc.js.gz
Normal file
BIN
assets/index.3f02f4cc.js.gz
Normal file
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
assets/index.4b3bfbd1.js.gz
Normal file
BIN
assets/index.4b3bfbd1.js.gz
Normal file
Binary file not shown.
Binary file not shown.
1
assets/index.54c7b3ea.js
Normal file
1
assets/index.54c7b3ea.js
Normal file
File diff suppressed because one or more lines are too long
BIN
assets/index.54c7b3ea.js.gz
Normal file
BIN
assets/index.54c7b3ea.js.gz
Normal file
Binary file not shown.
@ -1 +0,0 @@
|
||||
import{d as x,c as q,b5 as R,C as c,D as u,G as s,aI as e,aH as n,aK as D,aJ as E,aE as j,aN as r,b6 as z,f as A,r as G,b7 as H,b8 as J,b9 as K,ba as Q,bb as T,u as C,aM as f,a_ as W,bc as O,bd as X,a$ as Y,be as Z,bf as ee}from"./arco.7f845a67.js";import{F as oe}from"./index.9084fe61.js";import{v as V,_ as k,u as se,I as ae,a as ne}from"./index.d0c9d757.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{g as te,h as re}from"./vue.0bef8fc5.js";import{u as le}from"./loading.1a4e75f4.js";import"./index.e98108d6.js";import"./dep-83cdf63a.1fe6124c.js";import"./useConfig.f1b2a203.js";import"./useDisabled.29f0c6d6.js";import"./index.36386460.js";import"./helper.ab125cae.js";import"./slot.696d5493.js";import"./chart.95d38b48.js";const S=""+new URL("login-banner.426fb77f.png",import.meta.url).href,ie={class:"banner"},ce={class:"banner-inner"},de={class:"carousel-title"},_e={class:"carousel-sub-title"},me=["src"],ue=x({__name:"banner",setup(i){const{t}=V.exports.useI18n(),g=q(()=>[{slogan:t("login.banner.slogan1"),subSlogan:t("login.banner.subSlogan1"),image:S},{slogan:t("login.banner.slogan2"),subSlogan:t("login.banner.subSlogan2"),image:S},{slogan:t("login.banner.slogan3"),subSlogan:t("login.banner.subSlogan3"),image:S}]);return(b,v)=>{const p=z,h=R;return c(),u("div",ie,[s("div",ce,[e(h,{class:"carousel","animation-name":"fade"},{default:n(()=>[(c(!0),u(D,null,E(g.value,a=>(c(),j(p,{key:a.slogan},{default:n(()=>[(c(),u("div",{key:a.slogan,class:"carousel-item"},[s("div",de,r(a.slogan),1),s("div",_e,r(a.subSlogan),1),s("img",{class:"carousel-image",src:a.image},null,8,me)]))]),_:2},1024))),128))]),_:1})])])}}});const ge=k(ue,[["__scopeId","data-v-741ef175"]]),pe={class:"login-form-wrapper"},fe={class:"login-form-title"},be={class:"login-form-sub-title"},ve={class:"login-form-error-msg"},he={class:"login-form-password-actions"},we=x({__name:"login-form",setup(i){const t=te(),{t:g}=V.exports.useI18n(),b=A(""),{loading:v,setLoading:p}=le(),h=se(),a=re("login-config",{rememberPassword:!0,username:"admin",password:"admin"}),d=G({username:a.value.username,password:a.value.password}),F=async({errors:o,values:l})=>{if(!v.value&&!o){p(!0);try{await h.login(l);const{redirect:_,...w}=t.currentRoute.value.query;t.push({name:_||"Workplace",query:{...w}}),W.success(g("login.form.login.success"));const{rememberPassword:m}=a.value,{username:$,password:y}=l;a.value.username=m?$:"",a.value.password=m?y:""}catch(_){b.value=_.message}finally{p(!1)}}},L=o=>{a.value.rememberPassword=o};return(o,l)=>{const _=ae,w=H,m=O,$=ne,y=X,B=J,N=K,P=Y,M=Q,U=T;return c(),u("div",pe,[s("div",fe,r(o.$t("login.form.title")),1),s("div",be,r(o.$t("login.form.title")),1),s("div",ve,r(b.value),1),e(U,{ref:"loginForm",model:d,class:"login-form",layout:"vertical",onSubmit:F},{default:n(()=>[e(m,{field:"username",rules:[{required:!0,message:o.$t("login.form.userName.errMsg")}],"validate-trigger":["change","blur"],"hide-label":""},{default:n(()=>[e(w,{modelValue:d.username,"onUpdate:modelValue":l[0]||(l[0]=I=>d.username=I),placeholder:o.$t("login.form.userName.placeholder")},{prefix:n(()=>[e(_)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["rules"]),e(m,{field:"password",rules:[{required:!0,message:o.$t("login.form.password.errMsg")}],"validate-trigger":["change","blur"],"hide-label":""},{default:n(()=>[e(y,{modelValue:d.password,"onUpdate:modelValue":l[1]||(l[1]=I=>d.password=I),placeholder:o.$t("login.form.password.placeholder"),"allow-clear":""},{prefix:n(()=>[e($)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["rules"]),e(M,{size:16,direction:"vertical"},{default:n(()=>[s("div",he,[e(B,{checked:"rememberPassword","model-value":C(a).rememberPassword,onChange:L},{default:n(()=>[f(r(o.$t("login.form.rememberPassword")),1)]),_:1},8,["model-value","onChange"]),e(N,null,{default:n(()=>[f(r(o.$t("login.form.forgetPassword")),1)]),_:1})]),e(P,{type:"primary","html-type":"submit",long:"",loading:C(v)},{default:n(()=>[f(r(o.$t("login.form.login")),1)]),_:1},8,["loading"]),e(P,{type:"text",long:"",class:"login-form-register-btn"},{default:n(()=>[f(r(o.$t("login.form.register")),1)]),_:1})]),_:1})]),_:1},8,["model"])])}}});const $e=k(we,[["__scopeId","data-v-12db3177"]]),ye=i=>(Z("data-v-24cebde1"),i=i(),ee(),i),Ie={class:"container"},Se=ye(()=>s("div",{class:"logo"},[s("img",{alt:"logo",src:"//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/dfdba5317c0c20ce20e64fac803d52bc.svg~tplv-49unhts6dw-image.image"}),s("div",{class:"logo-text"},"Arco Design Pro")],-1)),xe={class:"content"},ke={class:"content-inner"},Pe={class:"footer"},Ce=x({__name:"index",setup(i){return(t,g)=>(c(),u("div",Ie,[Se,e(ge),s("div",xe,[s("div",ke,[e($e)]),s("div",Pe,[e(oe)])])]))}});const Qe=k(Ce,[["__scopeId","data-v-24cebde1"]]);export{Qe as default};
|
Binary file not shown.
1
assets/index.5a4b78fb.js
Normal file
1
assets/index.5a4b78fb.js
Normal file
@ -0,0 +1 @@
|
||||
import{v as V,ak as j,_ as B}from"./index.c5405c09.js";/* empty css *//* empty css *//* empty css */import{d as C,r as E,w as O,o as U,bT as $,bI as I,C as u,D as h,aI as r,aH as i,u as T,G as H,aM as f,aN as v,aK as x,aJ as y,aE as k,bU as J,a$ as R,bJ as F,bL as G}from"./arco.7f845a67.js";import{g as Y}from"./vue.0bef8fc5.js";import{u as q}from"./loading.1a4e75f4.js";import{L as A}from"./index.f4ca8c3f.js";import{S as K}from"./index.08cc7013.js";import"./chart.3e6cb2f1.js";import"./useConfig.b5d89e07.js";import"./useDisabled.5ccd65e2.js";import"./helper.4ea41844.js";import"./slot.0936fab4.js";const z={class:"container"},P={name:"DIY"},Q=C({...P,setup(W){const M=Y(),{t:S}=V.exports.useI18n(),N=()=>{M.push({path:"/tool/flash",query:{url:"https://k5.vicicode.com/diyapi/LOSEHU"+t.flag.join("")+".bin?v="+new Date().getTime()}})},t=E({versions:[],flag:[],disMatrix:[],disName:[],showSort:[]});O(()=>[...t.flag],()=>{w()});const w=()=>{t.flag.map((a,o)=>{t.disMatrix[o].forEach((l,n)=>{t.versions.indexOf("LOSEHU"+t.flag.join("").substring(0,o)+n+t.flag.join("").substring(o+1)+".bin")==-1?t.disMatrix[o].set(n,!0):t.disMatrix[o].set(n,!1)})})},{loading:L,setLoading:b}=q(!0);return U(async()=>{b(!0);let a=await(await fetch("https://k5.vicicode.com/diyapi/function.json?v="+new Date().getTime())).text();a=JSON.parse(a);let o=[],l=[];a.map(e=>{o[e[e.length-1]-1]=e,l.push(e[e.length-1]-1)}),a=o;let n=[],p=[];a.map(e=>{let _=new Map,c=new Map;for(let s=e[0]*2+1;s<e[0]*3+1;s++)_.set(e[s],!1),S("idea.diy")!=="LOSEHU DIY"?c.set(e[s],e[s-e[0]-e[0]]):c.set(e[s],e[s-e[0]]);n.push(_),p.push(c)}),t.flag=new Array(a.length).fill("0"),t.disName=p,t.disMatrix=n,t.showSort=l;const g=await(await fetch("https://k5.vicicode.com/diyapi/version.json?v="+new Date().getTime())).text();t.versions=JSON.parse(g),w(),b(!1)}),(a,o)=>{const l=j,n=A,p=$,g=J,e=R,_=K,c=I,s=F,D=G;return u(),h("div",z,[r(l,{items:[a.$t("menu.workshop"),a.$t("idea.diy")]},null,8,["items"]),r(D,{gutter:20,align:"stretch"},{default:i(()=>[r(s,{span:24},{default:i(()=>[r(c,{class:"general-card",title:a.$t("idea.diy"),loading:T(L)},{default:i(()=>[r(_,{direction:"vertical"},{default:i(()=>[H("div",null,[f(v(a.$t("oi")),1),r(n,{theme:"primary",href:"https://github.com/losehu/uv-k5-firmware-custom",target:"_blank"},{default:i(()=>[f("https://github.com/losehu/uv-k5-firmware-custom")]),_:1})]),(u(!0),h(x,null,y(t.showSort,m=>(u(),k(g,{modelValue:t.flag[m],"onUpdate:modelValue":d=>t.flag[m]=d,type:"button"},{default:i(()=>[(u(!0),h(x,null,y(t.disMatrix[m],d=>(u(),k(p,{value:d[0],disabled:d[1]},{default:i(()=>[f(v(t.disName[m].get(d[0])),1)]),_:2},1032,["value","disabled"]))),256))]),_:2},1032,["modelValue","onUpdate:modelValue"]))),256)),r(e,{type:"primary",onClick:N},{default:i(()=>[f(v(a.$t("diy.generate")),1)]),_:1})]),_:1})]),_:1},8,["title","loading"])]),_:1})]),_:1})])}}});const pt=B(Q,[["__scopeId","data-v-9368fb4d"]]);export{pt as default};
|
BIN
assets/index.5a4b78fb.js.gz
Normal file
BIN
assets/index.5a4b78fb.js.gz
Normal file
Binary file not shown.
@ -1 +1 @@
|
||||
import{_ as n}from"./index.d0c9d757.js";import{d as c,bH as _,a$ as r,D as u,aI as e,G as p,aH as i,C as d,aM as l}from"./arco.7f845a67.js";import{g as m}from"./vue.0bef8fc5.js";import"./chart.95d38b48.js";const f={class:"content"},x={class:"operation-row"},b=c({__name:"index",setup(k){const t=m(),o=()=>{t.push({name:"Workplace"})};return(h,v)=>{const s=_,a=r;return d(),u("div",f,[e(s,{class:"result",status:"404",subtitle:"\u627E\u4E0D\u5230\u7F51\u9875"}),p("div",x,[e(a,{key:"back",type:"primary",onClick:o},{default:i(()=>[l(" \u8FD4\u56DE ")]),_:1})])])}}});const E=n(b,[["__scopeId","data-v-8bef407f"]]);export{E as default};
|
||||
import{_ as n}from"./index.c5405c09.js";import{d as c,bH as _,a$ as r,D as u,aI as e,G as p,aH as i,C as d,aM as l}from"./arco.7f845a67.js";import{g as m}from"./vue.0bef8fc5.js";import"./chart.3e6cb2f1.js";const f={class:"content"},x={class:"operation-row"},b=c({__name:"index",setup(k){const t=m(),o=()=>{t.push({name:"Workplace"})};return(h,v)=>{const s=_,a=r;return d(),u("div",f,[e(s,{class:"result",status:"404",subtitle:"\u627E\u4E0D\u5230\u7F51\u9875"}),p("div",x,[e(a,{key:"back",type:"primary",onClick:o},{default:i(()=>[l(" \u8FD4\u56DE ")]),_:1})])])}}});const E=n(b,[["__scopeId","data-v-8bef407f"]]);export{E as default};
|
1
assets/index.606eadeb.js
Normal file
1
assets/index.606eadeb.js
Normal file
File diff suppressed because one or more lines are too long
BIN
assets/index.606eadeb.js.gz
Normal file
BIN
assets/index.606eadeb.js.gz
Normal file
Binary file not shown.
1
assets/index.62e4e9d4.css
Normal file
1
assets/index.62e4e9d4.css
Normal file
@ -0,0 +1 @@
|
||||
[data-v-c9314ebc] ::-webkit-scrollbar-thumb{border-radius:0!important}[data-v-c9314ebc] .scrollbar::-webkit-scrollbar{height:10px}[data-v-c9314ebc] .t-table__content::-webkit-scrollbar{height:15px}.container[data-v-c9314ebc]{padding:0 20px 20px}[data-v-c9314ebc] .arco-table-th:last-child .arco-table-th-item-title{margin-left:16px}.action-icon[data-v-c9314ebc]{margin-left:12px;cursor:pointer}.active[data-v-c9314ebc]{color:#0960bd;background-color:#e3f4fc}.setting[data-v-c9314ebc]{display:flex;align-items:center;width:200px}.setting .title[data-v-c9314ebc]{margin-left:12px;cursor:pointer}.ttable[data-v-c9314ebc] .t-table__affixed-header-elm-wrap{height:60px!important}.ttable[data-v-c9314ebc] .t-table__content{scrollbar-width:auto!important}
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@ -1,13 +0,0 @@
|
||||
import{b as v,w as m,_ as g,ak as y}from"./index.d0c9d757.js";/* empty css */import{d as b,aI as o,bI as h,C as O,D as j,aH as u,aM as f,aN as d}from"./arco.7f845a67.js";import{u as w,_ as c}from"./useConfig.f1b2a203.js";import"./chart.95d38b48.js";import"./vue.0bef8fc5.js";/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var P={align:{type:String,default:"center",validator:function(t){return t?["left","right","center"].includes(t):!0}},content:{type:[String,Function]},dashed:Boolean,default:{type:[String,Function]},layout:{type:String,default:"horizontal",validator:function(t){return t?["horizontal","vertical"].includes(t):!0}},theme:{type:String,validator:function(t){return t?["horizontal","vertical"].includes(t):!0}}};/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_(Object(n),!0).forEach(function(r){c(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var $=b({name:"TDivider",props:S({},P),setup:function(t){var n=w("divider"),r=v();return function(){var i=t.layout,p=t.dashed,s=t.align,a=r("default","content"),l=["".concat(n.value),["".concat(n.value,"--").concat(i)],c(c(c({},"".concat(n.value,"--dashed"),!!p),"".concat(n.value,"--with-text"),!!a),"".concat(n.value,"--with-text-").concat(s),!!a)];return o("div",{class:l},[a&&o("span",{class:"".concat(n.value,"__inner-text")},[a])])}}});/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var C=m($);const D={name:"BL"};const x={class:"container"};function N(e,t,n,r,i,p){const s=y,a=C,l=h;return O(),j("div",x,[o(s,{items:[e.$t("menu.list"),e.$t("bl")]},null,8,["items"]),o(l,{class:"general-card"},{title:u(()=>[f(d(e.$t("bl"))+" "+d(e.$t("global.onStart")),1)]),default:u(()=>[o(a,null,{default:u(()=>[f(d(e.$t("cs")),1)]),_:1})]),_:1})])}const T=g(D,[["render",N],["__scopeId","data-v-c8ef48f4"]]);export{T as default};
|
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
assets/index.6e7878ff.js.gz
Normal file
BIN
assets/index.6e7878ff.js.gz
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
import{_ as B}from"./dep-83cdf63a.1fe6124c.js";import{u as A,a as N,_ as d}from"./useConfig.f1b2a203.js";import{f as R,o as I,bt as z,d as D,c as P,aI as k,h as F}from"./arco.7f845a67.js";import{L as M}from"./index.d9aaa170.js";import{P as w,d as X,c as $,b as K,w as U}from"./index.d0c9d757.js";import{u as V}from"./useDisabled.29f0c6d6.js";/**
|
||||
import{u as A,a as B,_ as d,b as N}from"./useConfig.b5d89e07.js";import{f as R,o as I,bt as z,d as D,c as P,aI as k,h as F}from"./arco.7f845a67.js";import{L as M}from"./index.ab8a635e.js";import{M as w,d as X,c as $,b as K,w as U}from"./index.c5405c09.js";import{u as V}from"./useDisabled.5ccd65e2.js";/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
@ -18,8 +18,8 @@ import{_ as B}from"./dep-83cdf63a.1fe6124c.js";import{u as A,a as N,_ as d}from"
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/function L(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function E(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?L(Object(n),!0).forEach(function(a){d(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}var te=D({name:"TButton",props:W,setup:function(e,n){var a=n.attrs,s=n.slots,u=$(),c=K(),r=A("button"),b=N(),i=b.STATUS,h=b.SIZE,m=R();ee(m);var v=V(),y=P(function(){var o=e.theme,l=e.variant;return o||(l==="base"?"primary":"default")}),f=P(function(){return["".concat(r.value),"".concat(r.value,"--variant-").concat(e.variant),"".concat(r.value,"--theme-").concat(y.value),d(d(d(d(d(d({},h.value[e.size],e.size!=="medium"),i.value.disabled,v.value),i.value.loading,e.loading),"".concat(r.value,"--shape-").concat(e.shape),e.shape!=="rectangle"),"".concat(r.value,"--ghost"),e.ghost),h.value.block,e.block)]});return function(){var o=c("default","content"),l=e.loading?k(M,{inheritColor:!0},null):u("icon"),x=l&&!o,C=e.suffix||s.suffix?k("span",{className:"".concat(r.value,"__suffix")},[u("suffix")]):null;o=o?k("span",{class:"".concat(r.value,"__text")},[o]):"",l&&(o=[l,o]),C&&(o=[o].concat(C));var g=function(){return!e.tag&&e.href?"a":e.tag||"button"},p={class:[].concat(B(f.value),[d({},"".concat(r.value,"--icon-only"),x)]),type:e.type,disabled:v.value||e.loading,href:e.href,tabindex:v.value?void 0:"0"};return F(g(),E(E(E({ref:m},a),p),{},{onClick:e.onClick}),[o])}}});/**
|
||||
*/function L(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function E(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?L(Object(n),!0).forEach(function(a){d(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}var te=D({name:"TButton",props:W,setup:function(e,n){var a=n.attrs,s=n.slots,u=$(),c=K(),r=A("button"),b=B(),i=b.STATUS,h=b.SIZE,m=R();ee(m);var v=V(),y=P(function(){var o=e.theme,l=e.variant;return o||(l==="base"?"primary":"default")}),f=P(function(){return["".concat(r.value),"".concat(r.value,"--variant-").concat(e.variant),"".concat(r.value,"--theme-").concat(y.value),d(d(d(d(d(d({},h.value[e.size],e.size!=="medium"),i.value.disabled,v.value),i.value.loading,e.loading),"".concat(r.value,"--shape-").concat(e.shape),e.shape!=="rectangle"),"".concat(r.value,"--ghost"),e.ghost),h.value.block,e.block)]});return function(){var o=c("default","content"),l=e.loading?k(M,{inheritColor:!0},null):u("icon"),x=l&&!o,C=e.suffix||s.suffix?k("span",{className:"".concat(r.value,"__suffix")},[u("suffix")]):null;o=o?k("span",{class:"".concat(r.value,"__text")},[o]):"",l&&(o=[l,o]),C&&(o=[o].concat(C));var g=function(){return!e.tag&&e.href?"a":e.tag||"button"},p={class:[].concat(N(f.value),[d({},"".concat(r.value,"--icon-only"),x)]),type:e.type,disabled:v.value||e.loading,href:e.href,tabindex:v.value?void 0:"0"};return F(g(),E(E(E({ref:m},a),p),{},{onClick:e.onClick}),[o])}}});/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var le=U(te);export{le as B,ee as u};
|
||||
*/var ue=U(te);export{ue as B,ee as u};
|
BIN
assets/index.9447cec4.js.gz
Normal file
BIN
assets/index.9447cec4.js.gz
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
1
assets/index.a32235ff.js
Normal file
1
assets/index.a32235ff.js
Normal file
File diff suppressed because one or more lines are too long
BIN
assets/index.a32235ff.js.gz
Normal file
BIN
assets/index.a32235ff.js.gz
Normal file
Binary file not shown.
1
assets/index.a7992f46.js
Normal file
1
assets/index.a7992f46.js
Normal file
@ -0,0 +1 @@
|
||||
import{d as x,c as q,b5 as R,C as c,D as u,G as s,aI as e,aH as n,aK as D,aJ as E,aE as j,aN as r,b6 as z,f as A,r as G,b7 as H,b8 as J,b9 as K,ba as Q,bb as T,u as C,aM as f,a_ as W,bc as O,bd as X,a$ as Y,be as Z,bf as ee}from"./arco.7f845a67.js";import{F as oe}from"./index.ebb8ae5a.js";import{v as V,_ as k,u as se,I as ae,a as ne}from"./index.c5405c09.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{g as te,h as re}from"./vue.0bef8fc5.js";import{u as le}from"./loading.1a4e75f4.js";import"./index.f4ca8c3f.js";import"./useConfig.b5d89e07.js";import"./useDisabled.5ccd65e2.js";import"./index.08cc7013.js";import"./helper.4ea41844.js";import"./slot.0936fab4.js";import"./chart.3e6cb2f1.js";const S=""+new URL("login-banner.426fb77f.png",import.meta.url).href,ie={class:"banner"},ce={class:"banner-inner"},de={class:"carousel-title"},_e={class:"carousel-sub-title"},me=["src"],ue=x({__name:"banner",setup(i){const{t}=V.exports.useI18n(),g=q(()=>[{slogan:t("login.banner.slogan1"),subSlogan:t("login.banner.subSlogan1"),image:S},{slogan:t("login.banner.slogan2"),subSlogan:t("login.banner.subSlogan2"),image:S},{slogan:t("login.banner.slogan3"),subSlogan:t("login.banner.subSlogan3"),image:S}]);return(b,v)=>{const p=z,h=R;return c(),u("div",ie,[s("div",ce,[e(h,{class:"carousel","animation-name":"fade"},{default:n(()=>[(c(!0),u(D,null,E(g.value,a=>(c(),j(p,{key:a.slogan},{default:n(()=>[(c(),u("div",{key:a.slogan,class:"carousel-item"},[s("div",de,r(a.slogan),1),s("div",_e,r(a.subSlogan),1),s("img",{class:"carousel-image",src:a.image},null,8,me)]))]),_:2},1024))),128))]),_:1})])])}}});const ge=k(ue,[["__scopeId","data-v-741ef175"]]),pe={class:"login-form-wrapper"},fe={class:"login-form-title"},be={class:"login-form-sub-title"},ve={class:"login-form-error-msg"},he={class:"login-form-password-actions"},we=x({__name:"login-form",setup(i){const t=te(),{t:g}=V.exports.useI18n(),b=A(""),{loading:v,setLoading:p}=le(),h=se(),a=re("login-config",{rememberPassword:!0,username:"admin",password:"admin"}),d=G({username:a.value.username,password:a.value.password}),F=async({errors:o,values:l})=>{if(!v.value&&!o){p(!0);try{await h.login(l);const{redirect:_,...w}=t.currentRoute.value.query;t.push({name:_||"Workplace",query:{...w}}),W.success(g("login.form.login.success"));const{rememberPassword:m}=a.value,{username:$,password:y}=l;a.value.username=m?$:"",a.value.password=m?y:""}catch(_){b.value=_.message}finally{p(!1)}}},L=o=>{a.value.rememberPassword=o};return(o,l)=>{const _=ae,w=H,m=O,$=ne,y=X,B=J,N=K,P=Y,M=Q,U=T;return c(),u("div",pe,[s("div",fe,r(o.$t("login.form.title")),1),s("div",be,r(o.$t("login.form.title")),1),s("div",ve,r(b.value),1),e(U,{ref:"loginForm",model:d,class:"login-form",layout:"vertical",onSubmit:F},{default:n(()=>[e(m,{field:"username",rules:[{required:!0,message:o.$t("login.form.userName.errMsg")}],"validate-trigger":["change","blur"],"hide-label":""},{default:n(()=>[e(w,{modelValue:d.username,"onUpdate:modelValue":l[0]||(l[0]=I=>d.username=I),placeholder:o.$t("login.form.userName.placeholder")},{prefix:n(()=>[e(_)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["rules"]),e(m,{field:"password",rules:[{required:!0,message:o.$t("login.form.password.errMsg")}],"validate-trigger":["change","blur"],"hide-label":""},{default:n(()=>[e(y,{modelValue:d.password,"onUpdate:modelValue":l[1]||(l[1]=I=>d.password=I),placeholder:o.$t("login.form.password.placeholder"),"allow-clear":""},{prefix:n(()=>[e($)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["rules"]),e(M,{size:16,direction:"vertical"},{default:n(()=>[s("div",he,[e(B,{checked:"rememberPassword","model-value":C(a).rememberPassword,onChange:L},{default:n(()=>[f(r(o.$t("login.form.rememberPassword")),1)]),_:1},8,["model-value","onChange"]),e(N,null,{default:n(()=>[f(r(o.$t("login.form.forgetPassword")),1)]),_:1})]),e(P,{type:"primary","html-type":"submit",long:"",loading:C(v)},{default:n(()=>[f(r(o.$t("login.form.login")),1)]),_:1},8,["loading"]),e(P,{type:"text",long:"",class:"login-form-register-btn"},{default:n(()=>[f(r(o.$t("login.form.register")),1)]),_:1})]),_:1})]),_:1},8,["model"])])}}});const $e=k(we,[["__scopeId","data-v-12db3177"]]),ye=i=>(Z("data-v-24cebde1"),i=i(),ee(),i),Ie={class:"container"},Se=ye(()=>s("div",{class:"logo"},[s("img",{alt:"logo",src:"//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/dfdba5317c0c20ce20e64fac803d52bc.svg~tplv-49unhts6dw-image.image"}),s("div",{class:"logo-text"},"Arco Design Pro")],-1)),xe={class:"content"},ke={class:"content-inner"},Pe={class:"footer"},Ce=x({__name:"index",setup(i){return(t,g)=>(c(),u("div",Ie,[Se,e(ge),s("div",xe,[s("div",ke,[e($e)]),s("div",Pe,[e(oe)])])]))}});const Ke=k(Ce,[["__scopeId","data-v-24cebde1"]]);export{Ke as default};
|
BIN
assets/index.a7992f46.js.gz
Normal file
BIN
assets/index.a7992f46.js.gz
Normal file
Binary file not shown.
@ -1 +1 @@
|
||||
import{_}from"./index.d0c9d757.js";/* empty css */import{d as F,r as f,o as h,bG as g,a$ as m,D as y,bg as i,bh as c,G as o,aM as s,aI as a,aN as d,aH as v,be as A,bf as b,C as D}from"./arco.7f845a67.js";import"./chart.95d38b48.js";import"./vue.0bef8fc5.js";const l=u=>(A("data-v-9a7d1078"),u=u(),b(),u),S={class:"container"},C={style:{"background-color":"#fff",padding:"10%"}},B=l(()=>o("br",null,null,-1)),E={style:{"background-color":"#fff",padding:"10%"}},x=l(()=>o("p",{style:{"font-size":"1.5rem","font-weight":"bold"}}," \u83B7\u53D6\u4FE1\u606F\uFF08Information\uFF09 ",-1)),k={name:"SatLoc"},w=F({...k,setup(u){const t=f({lat:0,lng:0,alt:0,type:0,uuid:""});h(()=>{t.uuid=new URLSearchParams(location.hash.replace("#/satloc?","")).get("uuid"),navigator.geolocation.getCurrentPosition(e=>{e.coords&&(t.lat=e.coords.latitude,t.lng=e.coords.longitude,e.coords.altitude&&(t.alt=e.coords.altitude))})});const r=async()=>{await fetch("https://k5.vicicode.com/api/lol",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({func:0,uuid:t.uuid,cache:JSON.stringify([t.lng,t.lat,t.alt])})}),t.type=1};return(e,I)=>{const n=g,p=m;return D(),y("div",S,[i(o("div",C,[s(" \u8BF7\u70B9\u51FB\u7F51\u9875\u201C\u5DF2\u626B\u7801\u4E0A\u4F20\u201D\u6309\u94AE "),B,s(' Please click on the "Scanned and Uploaded" button on PC page. ')],512),[[c,t.type!=0]]),i(o("div",E,[x,a(n),o("p",null," \u53F0\u7AD9\u7ECF\u5EA6\uFF08Longitude\uFF09\uFF1A"+d(t.lng),1),a(n),o("p",null," \u53F0\u7AD9\u7EAC\u5EA6\uFF08Latitude\uFF09\uFF1A"+d(t.lat),1),a(n),o("p",null," \u53F0\u7AD9\u6D77\u62D4\uFF08Altitude\uFF09\uFF1A"+d(t.alt),1),a(n),a(p,{type:"primary",onClick:r},{default:v(()=>[s("\u4E0A\u4F20\uFF08Upload\uFF09")]),_:1})],512),[[c,t.type==0]])])}}});const U=_(w,[["__scopeId","data-v-9a7d1078"]]);export{U as default};
|
||||
import{_}from"./index.c5405c09.js";/* empty css */import{d as F,r as f,o as h,bG as g,a$ as m,D as y,bg as i,bh as c,G as o,aM as s,aI as a,aN as d,aH as v,be as A,bf as b,C as D}from"./arco.7f845a67.js";import"./chart.3e6cb2f1.js";import"./vue.0bef8fc5.js";const l=u=>(A("data-v-9a7d1078"),u=u(),b(),u),S={class:"container"},C={style:{"background-color":"#fff",padding:"10%"}},B=l(()=>o("br",null,null,-1)),E={style:{"background-color":"#fff",padding:"10%"}},x=l(()=>o("p",{style:{"font-size":"1.5rem","font-weight":"bold"}}," \u83B7\u53D6\u4FE1\u606F\uFF08Information\uFF09 ",-1)),k={name:"SatLoc"},w=F({...k,setup(u){const t=f({lat:0,lng:0,alt:0,type:0,uuid:""});h(()=>{t.uuid=new URLSearchParams(location.hash.replace("#/satloc?","")).get("uuid"),navigator.geolocation.getCurrentPosition(e=>{e.coords&&(t.lat=e.coords.latitude,t.lng=e.coords.longitude,e.coords.altitude&&(t.alt=e.coords.altitude))})});const r=async()=>{await fetch("https://k5.vicicode.com/api/lol",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({func:0,uuid:t.uuid,cache:JSON.stringify([t.lng,t.lat,t.alt])})}),t.type=1};return(e,I)=>{const n=g,p=m;return D(),y("div",S,[i(o("div",C,[s(" \u8BF7\u70B9\u51FB\u7F51\u9875\u201C\u5DF2\u626B\u7801\u4E0A\u4F20\u201D\u6309\u94AE "),B,s(' Please click on the "Scanned and Uploaded" button on PC page. ')],512),[[c,t.type!=0]]),i(o("div",E,[x,a(n),o("p",null," \u53F0\u7AD9\u7ECF\u5EA6\uFF08Longitude\uFF09\uFF1A"+d(t.lng),1),a(n),o("p",null," \u53F0\u7AD9\u7EAC\u5EA6\uFF08Latitude\uFF09\uFF1A"+d(t.lat),1),a(n),o("p",null," \u53F0\u7AD9\u6D77\u62D4\uFF08Altitude\uFF09\uFF1A"+d(t.alt),1),a(n),a(p,{type:"primary",onClick:r},{default:v(()=>[s("\u4E0A\u4F20\uFF08Upload\uFF09")]),_:1})],512),[[c,t.type==0]])])}}});const U=_(w,[["__scopeId","data-v-9a7d1078"]]);export{U as default};
|
BIN
assets/index.a8cfe5c8.js.gz
Normal file
BIN
assets/index.a8cfe5c8.js.gz
Normal file
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
import{a1 as $e,a2 as en,Q as nn,h as an,a3 as Ae,a4 as rn,a5 as tn,i as N,a6 as sn,a7 as ln,a8 as on,a9 as un,aa as Se,f as Pe,V as cn,K as fn,ab as dn,ac as Ee,O as M,e as Te,ad as se,ae as vn,af as gn,H as Le,ag as hn,ah as xe,ai as mn,aj as pn,w as yn}from"./index.d0c9d757.js";import{_ as F,u as p,a as _n}from"./useConfig.f1b2a203.js";import{d as k,o as ee,g as Cn,n as wn,aI as h,c as m,f as z,w as Ie,t as bn,bC as q,bE as ie,r as On,h as $n,b4 as An}from"./arco.7f845a67.js";import{c as Sn,_ as Pn}from"./helper.ab125cae.js";/**
|
||||
import{a1 as $e,a2 as en,N as nn,h as an,a3 as Ae,a4 as rn,a5 as tn,i as N,a6 as sn,a7 as ln,a8 as on,a9 as un,aa as Se,f as Pe,S as cn,a0 as fn,ab as dn,ac as Ee,J as M,e as Te,ad as se,ae as vn,af as gn,G as Le,ag as hn,ah as xe,ai as mn,aj as pn,w as yn}from"./index.c5405c09.js";import{_ as F,u as p,a as _n}from"./useConfig.b5d89e07.js";import{d as k,o as ee,g as Cn,n as wn,aI as h,c as m,f as z,w as Ie,t as bn,bC as q,bE as ie,r as On,h as $n,b4 as An}from"./arco.7f845a67.js";import{c as Sn,_ as Pn}from"./helper.4ea41844.js";/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
BIN
assets/index.ab8a635e.js.gz
Normal file
BIN
assets/index.ab8a635e.js.gz
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
assets/index.afc6061e.js.gz
Normal file
BIN
assets/index.afc6061e.js.gz
Normal file
Binary file not shown.
@ -1 +0,0 @@
|
||||
import{v as H,m as L,ak as M,_ as N}from"./index.d0c9d757.js";/* empty css *//* empty css *//* empty css */import{d as U,r as y,c as V,bI as O,C as j,D as G,aI as s,aH as r,G as S,aN as f,aM as g,u as h,a6 as J,a$ as W,ba as Z,bJ as q,bL as F}from"./arco.7f845a67.js";import{u as Q}from"./loading.1a4e75f4.js";import{e as v,a as C,u as w,f as X,h as D,s as Y,b,g as ee}from"./serial.c741fbda.js";import{I as P}from"./form-model.48301551.js";import{M as te,T as ae}from"./index.7fee9e88.js";import{B as ne}from"./index.b5a0fec5.js";import"./chart.95d38b48.js";import"./vue.0bef8fc5.js";import"./useConfig.f1b2a203.js";import"./dialog.e118d761.js";import"./index.d9aaa170.js";import"./helper.ab125cae.js";import"./dep-83cdf63a.1fe6124c.js";import"./useDisabled.29f0c6d6.js";import"./dep-6deb4e3a.3e2fa927.js";import"./slot.696d5493.js";const oe={class:"container"},re={name:"Radio"},ie=U({...re,setup(se){const{t:m}=H.exports.useI18n(),o=L(),{loading:I,setLoading:u}=Q(!1),a=y({renderData:Array.from({length:16}).map(e=>({})),pageSize:16,nowPage:1}),z=y({showHide:0}),R=e=>{a.renderData=e.newData},A=V(()=>[{colKey:"drag",title:m("cps.sort"),width:46},{title:"#",colKey:"index",align:"left",width:100},{title:m("cps.contact"),colKey:"name",width:250,align:"left",cell:(e,{row:t})=>t.name?t.name.replace(/[^a-zA-Z0-9_]/g,""):void 0,edit:{component:P,props:{clearable:!0},onEdited:e=>{const t=[...a.renderData];t.splice((a.nowPage-1)*a.pageSize+e.rowIndex,1,e.newRowData),a.renderData=t}}},{title:m("cps.mdcid"),colKey:"mdcid",align:"left",width:200,cell:(e,{row:t})=>parseInt(t.mdcid,16)<=65535?parseInt(t.mdcid,16).toString(16):void 0,edit:{component:P,props:{clearable:!0},onEdited:e=>{e.newRowData.mdcid=e.newRowData.mdcid?e.newRowData.mdcid.toLowerCase():void 0;const t=[...a.renderData];t.splice((a.nowPage-1)*a.pageSize+e.rowIndex,1,e.newRowData),a.renderData=t}}},{title:m("cps.operate"),colKey:"operate",align:"left",width:150}]),$=async()=>{var d,c;if(o.connectState!=!0){alert(sessionStorage.getItem("noticeConnectK5"));return}await v(o.connectPort),u(!0);let e=new Uint8Array(256);for(let n=7424;n<7680;n+=16){const i=await C(o.connectPort,n,16,(d=o.configuration)==null?void 0:d.uart);e.set(i,n-7424)}const t=[];for(let n=0;n<256;n+=16)w(e.subarray(n,n+2))!="ffff"?t.push({name:X(e.subarray(n+2,n+16),(c=o.configuration)==null?void 0:c.charset).trim(),mdcid:w(e.subarray(n,n+1))+w(e.subarray(n+1,n+2))}):t.push({});a.renderData=t,u(!1)},T=async()=>{var t,d,c,n;if(o.connectState!=!0){alert(sessionStorage.getItem("noticeConnectK5"));return}await v(o.connectPort),u(!0);for(let i=0;i<256;i+=16)if(a.renderData[i/16].mdcid){const p=new Uint8Array(16).fill(32);p.set(D(a.renderData[i/16].mdcid.padStart(4,"0").substring(0,2))),p.set(D(a.renderData[i/16].mdcid.padStart(4,"0").substring(2,4)),1),p.set(Y(a.renderData[i/16].name),2),await b(o.connectPort,i+7424,p,16,(t=o.configuration)==null?void 0:t.uart)}else await b(o.connectPort,i+7424,D("ffffffffffffffffffffffffffffffff"),16,(d=o.configuration)==null?void 0:d.uart);const e=await C(o.connectPort,8176,16,(c=o.configuration)==null?void 0:c.uart);e.set([16],16-1),await b(o.connectPort,8176,e,16,(n=o.configuration)==null?void 0:n.uart),await ee(o.connectPort),u(!1)},k=async e=>{const t=[...a.renderData];t.splice(e,1,{scanlist:[]}),a.renderData=t};return(e,t)=>{const d=M,c=J,n=W,i=Z,p=q,B=F,K=ne,x=ae,E=O;return j(),G("div",oe,[s(d,{items:[e.$t("menu.dashboard"),e.$t("menu.cps.mdc")]},null,8,["items"]),s(E,{class:"general-card"},{title:r(()=>[S("span",{onClick:t[0]||(t[0]=()=>{z.showHide+=1})},f(e.$t("menu.cps.mdc")+e.$t("global.onStart")),1)]),default:r(()=>[s(B,{style:{"margin-bottom":"16px"}},{default:r(()=>[s(p,{span:12},{default:r(()=>[s(i,null,{default:r(()=>[s(n,{type:"primary",onClick:$},{icon:r(()=>[s(c)]),default:r(()=>[g(" "+f(e.$t("cps.onDeviceRead")),1)]),_:1}),s(n,{onClick:T},{icon:r(()=>[s(c)]),default:r(()=>[g(" "+f(e.$t("cps.onDeviceWrite")),1)]),_:1})]),_:1})]),_:1})]),_:1}),s(x,{class:"ttable",loading:h(I),size:"medium",columns:A.value,data:a.renderData,pagination:{defaultPageSize:a.pageSize,total:a.renderData.length,defaultCurrent:1,pageSizeOptions:[15,30,50,100,200]},onChange:t[1]||(t[1]=l=>{a.pageSize=l.pagination.pageSize,a.nowPage=l.pagination.current}),bordered:"","lazy-load":"",headerAffixedTop:{offsetTop:60},hover:!0,"drag-sort":"row-handler",onDragSort:R},{drag:r(({row:l,rowIndex:_})=>[S("span",null,[s(h(te))])]),index:r(({row:l,rowIndex:_})=>[g(f((a.nowPage-1)*a.pageSize+_+1),1)]),operate:r(({row:l,rowIndex:_})=>[s(K,{theme:"default",variant:"dashed",onClick:ce=>k((a.nowPage-1)*a.pageSize+_)},{default:r(()=>[g(f(e.$t("cps.clear")),1)]),_:2},1032,["onClick"])]),_:1},8,["loading","columns","data","pagination"])]),_:1})])}}});const Ae=N(ie,[["__scopeId","data-v-dfecd3b2"]]);export{Ae as default};
|
Binary file not shown.
1
assets/index.b08882b7.js
Normal file
1
assets/index.b08882b7.js
Normal file
@ -0,0 +1 @@
|
||||
import{v as K,m as M,ak as H,_ as N}from"./index.c5405c09.js";/* empty css *//* empty css *//* empty css */import{d as F,r as S,c as L,bI as O,C as U,D as V,aI as s,aH as i,G as h,aN as u,aM as _,u as x,a6 as j,a$ as G,ba as J,bJ as W,bL as q}from"./arco.7f845a67.js";import{u as Q}from"./loading.1a4e75f4.js";import{e as b,a as y,u as v,b as g,h as w,g as X}from"./serial.c741fbda.js";import{I as Y}from"./index.3c1bf074.js";import{M as Z,T as ee}from"./index.e0d2d4f4.js";import{B as te}from"./index.9447cec4.js";import"./chart.3e6cb2f1.js";import"./vue.0bef8fc5.js";import"./useConfig.b5d89e07.js";import"./useGlobalIcon.c6c61ccc.js";import"./helper.4ea41844.js";import"./dep-6deb4e3a.355b5fc9.js";import"./dialog.30d78e3d.js";import"./index.ab8a635e.js";import"./form-model.e2f8f96d.js";import"./useDisabled.5ccd65e2.js";import"./slot.0936fab4.js";const ae={class:"container"},oe={name:"Radio"},ne=F({...oe,setup(re){const{t:D}=K.exports.useI18n(),o=M(),{loading:P,setLoading:m}=Q(!1),a=S({renderData:Array.from({length:20}).map(t=>({})),pageSize:50,nowPage:1}),I=S({showHide:0}),C=t=>{a.renderData=t.newData},R=L(()=>[{colKey:"drag",title:D("cps.sort"),width:46},{title:"#",colKey:"index",align:"left",width:100},{title:D("cps.rx"),colKey:"rx",align:"left",width:200,cell:(t,{row:n})=>parseFloat(n.rx)?parseFloat(n.rx).toFixed(2):void 0,edit:{component:Y,props:{clearable:!0},onEdited:t=>{t.newRowData.rx=t.newRowData.rx?t.newRowData.rx:void 0;const n=[...a.renderData];n.splice((a.nowPage-1)*a.pageSize+t.rowIndex,1,t.newRowData),a.renderData=n}}},{title:D("cps.operate"),colKey:"operate",align:"left",width:150}]),z=async()=>{var t,n,l;if(o.connectState!=!0){alert(sessionStorage.getItem("noticeConnectK5"));return}if(await b(o.connectPort),m(!0),(t=o.configuration)!=null&&t.fm30){let c=new Uint8Array(60);for(let e=131008;e<131057;e+=8){const p=await y(o.connectPort,e,8,(n=o.configuration)==null?void 0:n.uart);c.set(p,e-131008)}const r=[];for(let e=0;e<60;e+=2){const p=v(c.subarray(e,e+2));p!="ffff"?r.push({rx:parseInt(p,16)/10}):r.push({})}a.renderData=r}else{let c=new Uint8Array(40);for(let e=3648;e<3681;e+=8){const p=await y(o.connectPort,e,8,(l=o.configuration)==null?void 0:l.uart);c.set(p,e-3648)}const r=[];for(let e=0;e<40;e+=2){const p=v(c.subarray(e,e+2));p!="ffff"?r.push({rx:parseInt(p,16)/10}):r.push({})}a.renderData=r}m(!1)},$=async()=>{var t,n,l,c,r;if(o.connectState!=!0){alert(sessionStorage.getItem("noticeConnectK5"));return}if(await b(o.connectPort),m(!0),(t=o.configuration)!=null&&t.fm30)for(let e=0;e<60;e+=2)a.renderData[e/2].rx?await g(o.connectPort,e+131008,w(parseInt(a.renderData[e/2].rx*10).toString(16).padStart(4,"0")),2,(n=o.configuration)==null?void 0:n.uart):await g(o.connectPort,e+131008,w("0000"),2,(l=o.configuration)==null?void 0:l.uart);else for(let e=0;e<40;e+=2)a.renderData[e/2].rx?await g(o.connectPort,e+3648,w(parseInt(a.renderData[e/2].rx*10).toString(16).padStart(4,"0")),2,(c=o.configuration)==null?void 0:c.uart):await g(o.connectPort,e+3648,w("0000"),2,(r=o.configuration)==null?void 0:r.uart);await X(o.connectPort),m(!1)},k=async t=>{const n=[...a.renderData];n.splice(t,1,{scanlist:[]}),a.renderData=n};return(t,n)=>{const l=H,c=j,r=G,e=J,p=W,A=q,B=te,T=ee,E=O;return U(),V("div",ae,[s(l,{items:[t.$t("menu.dashboard"),t.$t("menu.cps.radio")]},null,8,["items"]),s(E,{class:"general-card"},{title:i(()=>[h("span",{onClick:n[0]||(n[0]=()=>{I.showHide+=1})},u(t.$t("menu.cps.radio")+t.$t("global.onStart")),1)]),default:i(()=>[s(A,{style:{"margin-bottom":"16px"}},{default:i(()=>[s(p,{span:12},{default:i(()=>[s(e,null,{default:i(()=>[s(r,{type:"primary",onClick:z},{icon:i(()=>[s(c)]),default:i(()=>[_(" "+u(t.$t("cps.onDeviceRead")),1)]),_:1}),s(r,{onClick:$},{icon:i(()=>[s(c)]),default:i(()=>[_(" "+u(t.$t("cps.onDeviceWrite")),1)]),_:1})]),_:1})]),_:1})]),_:1}),s(T,{class:"ttable",loading:x(P),size:"medium",columns:R.value,data:a.renderData,pagination:{defaultPageSize:a.pageSize,total:a.renderData.length,defaultCurrent:1,pageSizeOptions:[15,30,50,100,200]},onChange:n[1]||(n[1]=d=>{a.pageSize=d.pagination.pageSize,a.nowPage=d.pagination.current}),bordered:"","lazy-load":"",headerAffixedTop:{offsetTop:60},hover:!0,"drag-sort":"row-handler",onDragSort:C},{drag:i(({row:d,rowIndex:f})=>[h("span",null,[s(x(Z))])]),index:i(({row:d,rowIndex:f})=>[_(u((a.nowPage-1)*a.pageSize+f+1),1)]),operate:i(({row:d,rowIndex:f})=>[s(B,{theme:"default",variant:"dashed",onClick:ie=>k((a.nowPage-1)*a.pageSize+f)},{default:i(()=>[_(u(t.$t("cps.clear")),1)]),_:2},1032,["onClick"])]),_:1},8,["loading","columns","data","pagination"])]),_:1})])}}});const Re=N(ne,[["__scopeId","data-v-be263a43"]]);export{Re as default};
|
BIN
assets/index.b08882b7.js.gz
Normal file
BIN
assets/index.b08882b7.js.gz
Normal file
Binary file not shown.
@ -1,5 +0,0 @@
|
||||
import{b as o}from"./dialog.e118d761.js";import{w as a}from"./index.d0c9d757.js";import"./arco.7f845a67.js";/**
|
||||
* tdesign v1.9.4
|
||||
* (c) 2024 tdesign
|
||||
* @license MIT
|
||||
*/var m=a(o);export{m as D};
|
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user