1
0
Files
build.ems/build/usr/local/omc/htdocs/front/js/DissectionDump.CPacVZry.js
2024-10-25 14:59:47 +08:00

5 lines
1.6 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import v from"./DissectionDumpHigh.B6Ac5qIw.js";import{g as L,r as c,w as x,k as A,D as w,J as f,F as B,t as b}from"./vendor/index.CRpmXtWV.js";import{_ as H}from"../index.D-NvtsOM.js";const M={class:"tbd"},O={class:"tbd-offset"},T={class:"tbd-box"},F={class:"tbd-box"},N=L({__name:"DissectionDump",props:{base64:{type:String,required:!0},select:{type:Function,default:()=>{}},selected:{type:Object,default:{id:"",idx:0,start:0,length:0}}},setup(S){const o=S,p=c([]),m=c([]),g=c([]),u=c([0,0]),h=c([0,0]);x(()=>o.selected,i=>{const{start:t,length:s}=i,l=s*2+s-1,r=t*2+t,n=t+Math.floor(t/16),e=t+s+Math.floor((t+s)/16)-n;u.value=[n,s>0?e:0],h.value=[r,s>0?l:0]},{immediate:!0}),x(()=>o.base64,i=>{const t=atob(i),s=new Uint8Array(t.length);for(let e=0;e<t.length;e++)s[e]=t.charCodeAt(e);let l=[],r=[],n=[];for(let e=0;e<s.length;e+=16){let k=e.toString(16).padStart(8,"0"),C=s.slice(e,e+16),a=[],_=[];for(let d of C)a.push(d.toString(16).padStart(2,"0")),_.push(d>=32&&d<127?String.fromCharCode(d):".");let D=a.length>8?a.slice(0,8).join(" ")+" "+a.slice(8).join(" "):a.join(" "),z=_.join("");l.push(k),r.push(D),n.push(z)}p.value=l,m.value=r,g.value=n},{immediate:!0});const y=i=>{typeof o.select=="function"&&o.select(Math.floor(i/3))},j=i=>{typeof o.select=="function"&&o.select(i-Math.floor(i/17))};return(i,t)=>(A(),w("div",M,[f("div",O,B(p.value.join(`
`)),1),f("div",T,[b(v,{text:m.value.join(`
`),start:h.value[0],size:h.value[1],onOffsetClicked:y},null,8,["text","start","size"])]),f("div",F,[b(v,{text:g.value.join(`
`),start:u.value[0],size:u.value[1],onOffsetClicked:j},null,8,["text","start","size"])])]))}}),E=H(N,[["__scopeId","data-v-3adff580"]]);export{E as default};