| 11 | }); |
| 12 | } |
| 13 | const a = async (o, t) => { |
| 14 | if (!document || !o.content) |
| 15 | throw new Error("exist error json or document not loaded"); |
| 16 | await c(0); |
| 17 | const s = o.content, r = []; |
| 18 | if (s.forEach((d) => { |
| 19 | const e = document.getElementById(d.id); |
| 20 | console.log(e, d.id), e && r.push(e), e == null || e.addEventListener("click", () => { |
| 21 | n.cid = e.id, r.forEach((i) => { |
| 22 | i.style.border = "", i.id === n.cid && (i.style.border = "1px solid #006cff"); |
| 23 | }); |
| 24 | }); |
| 25 | }), t.id) { |
| 26 | let d = document.getElementById(t.id); |
| 27 | d && d.addEventListener("mouseover", (e) => { |
| 28 | n.pageX = e.pageX, n.pageY = e.pageY, console.log("store position", n.pageX, n.pageY); |
| 29 | }); |
| 30 | } |
| 31 | }, l = (o, t) => { |
| 32 | a(o, t); |
| 33 | }; |
| 34 | export { |