@reclack/walletkit 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/element.js CHANGED
@@ -1,20 +1,20 @@
1
- import { DEFAULT_LOGO_BASE as e, applyTheme as t, createWalletKit as n, subscribeHandheld as r, subscribeScheme as i, walletDeepLink as a, walletLogo as o, walletPairingLink as s, walletScans as c, walletsFor as l } from "@reclack/walletkit";
1
+ import { DEFAULT_LOGO_BASE as e, applyTheme as t, createWalletKit as n, networkLabel as r, networkLogo as i, subscribeHandheld as a, subscribeScheme as o, walletDeepLink as s, walletLogo as c, walletPairingLink as l, walletScans as u, walletsFor as d } from "@reclack/walletkit";
2
2
  // node_modules/.pnpm/preact@10.29.8/node_modules/preact/dist/preact.module.js
3
- var u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, T = {}, E = [], D = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, O = Array.isArray;
4
- function k(e, t) {
3
+ var f, p, m, h, g, _, v, y, b, x, S, C, w, T, E, D = {}, O = [], ee = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, k = Array.isArray;
4
+ function A(e, t) {
5
5
  for (var n in t) e[n] = t[n];
6
6
  return e;
7
7
  }
8
- function ee(e) {
8
+ function te(e) {
9
9
  e && e.parentNode && e.parentNode.removeChild(e);
10
10
  }
11
- function A(e, t, n) {
11
+ function j(e, t, n) {
12
12
  var r, i, a, o = {};
13
13
  for (a in t) a == "key" ? r = t[a] : a == "ref" ? i = t[a] : o[a] = t[a];
14
- if (arguments.length > 2 && (o.children = arguments.length > 3 ? u.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null) for (a in e.defaultProps) o[a] === void 0 && (o[a] = e.defaultProps[a]);
15
- return j(e, o, r, i, null);
14
+ if (arguments.length > 2 && (o.children = arguments.length > 3 ? f.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null) for (a in e.defaultProps) o[a] === void 0 && (o[a] = e.defaultProps[a]);
15
+ return ne(e, o, r, i, null);
16
16
  }
17
- function j(e, t, n, r, i) {
17
+ function ne(e, t, n, r, i) {
18
18
  var a = {
19
19
  type: e,
20
20
  props: t,
@@ -26,11 +26,11 @@ function j(e, t, n, r, i) {
26
26
  __e: null,
27
27
  __c: null,
28
28
  constructor: void 0,
29
- __v: i ?? ++f,
29
+ __v: i ?? ++m,
30
30
  __i: -1,
31
31
  __u: 0
32
32
  };
33
- return i == null && d.vnode != null && d.vnode(a), a;
33
+ return i == null && p.vnode != null && p.vnode(a), a;
34
34
  }
35
35
  function M(e) {
36
36
  return e.children;
@@ -43,42 +43,42 @@ function P(e, t) {
43
43
  for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) return n.__e;
44
44
  return typeof e.type == "function" ? P(e) : null;
45
45
  }
46
- function te(e) {
46
+ function re(e) {
47
47
  if (e.__P && e.__d) {
48
- var t = e.__v, n = t.__e, r = [], i = [], a = k({}, t);
49
- a.__v = t.__v + 1, d.vnode && d.vnode(a), ue(e.__P, a, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? P(t), !!(32 & t.__u), i), a.__v = t.__v, a.__.__k[a.__i] = a, fe(r, a, i), t.__e = t.__ = null, a.__e != n && ne(a);
48
+ var t = e.__v, n = t.__e, r = [], i = [], a = A({}, t);
49
+ a.__v = t.__v + 1, p.vnode && p.vnode(a), fe(e.__P, a, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? P(t), !!(32 & t.__u), i), a.__v = t.__v, a.__.__k[a.__i] = a, me(r, a, i), t.__e = t.__ = null, a.__e != n && ie(a);
50
50
  }
51
51
  }
52
- function ne(e) {
52
+ function ie(e) {
53
53
  if ((e = e.__) != null && e.__c != null) return e.__e = e.__c.base = null, e.__k.some(function(t) {
54
54
  if (t != null && t.__e != null) return e.__e = e.__c.base = t.__e;
55
- }), ne(e);
55
+ }), ie(e);
56
56
  }
57
- function re(e) {
58
- (!e.__d && (e.__d = !0) && p.push(e) && !F.__r++ || m != d.debounceRendering) && ((m = d.debounceRendering) || h)(F);
57
+ function ae(e) {
58
+ (!e.__d && (e.__d = !0) && h.push(e) && !F.__r++ || g != p.debounceRendering) && ((g = p.debounceRendering) || _)(F);
59
59
  }
60
60
  function F() {
61
61
  try {
62
- for (var e, t = 1; p.length;) p.length > t && p.sort(g), e = p.shift(), t = p.length, te(e);
62
+ for (var e, t = 1; h.length;) h.length > t && h.sort(v), e = h.shift(), t = h.length, re(e);
63
63
  } finally {
64
- p.length = F.__r = 0;
64
+ h.length = F.__r = 0;
65
65
  }
66
66
  }
67
- function ie(e, t, n, r, i, a, o, s, c, l, u) {
68
- var d, f, p, m, h, g, _ = r && r.__k || E, v = t.length;
69
- for (c = ae(n, t, _, c, v), d = 0; d < v; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && _[p.__i] || T, p.__i = d, g = ue(e, p, f, i, a, o, s, c, l, u), m = p.__e, p.ref && f.ref != p.ref && (f.ref && he(f.ref, null, p), u.push(p.ref, p.__c || m, p)), h == null && m != null && (h = m), 4 & p.__u ? (c = oe(p, c, e), f.__e && (f.__e = null)) : typeof p.type == "function" && g !== void 0 ? c = g : m && (c = m.nextSibling), p.__u &= -7);
67
+ function oe(e, t, n, r, i, a, o, s, c, l, u) {
68
+ var d, f, p, m, h, g, _ = r && r.__k || O, v = t.length;
69
+ for (c = se(n, t, _, c, v), d = 0; d < v; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && _[p.__i] || D, p.__i = d, g = fe(e, p, f, i, a, o, s, c, l, u), m = p.__e, p.ref && f.ref != p.ref && (f.ref && _e(f.ref, null, p), u.push(p.ref, p.__c || m, p)), h == null && m != null && (h = m), 4 & p.__u ? (c = ce(p, c, e), f.__e && (f.__e = null)) : typeof p.type == "function" && g !== void 0 ? c = g : m && (c = m.nextSibling), p.__u &= -7);
70
70
  return n.__e = h, c;
71
71
  }
72
- function ae(e, t, n, r, i) {
72
+ function se(e, t, n, r, i) {
73
73
  var a, o, s, c, l, u = n.length, d = u, f = 0;
74
- for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = j(null, o, null, null, null) : O(o) ? o = e.__k[a] = j(M, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = j(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i = se(o, n, c, d)) != -1 && (d--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (i > u ? f-- : i < u && f++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, o.__u |= 4))) : e.__k[a] = null;
75
- if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = P(s)), ge(s, s));
74
+ for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = ne(null, o, null, null, null) : k(o) ? o = e.__k[a] = ne(M, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = ne(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i = le(o, n, c, d)) != -1 && (d--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (i > u ? f-- : i < u && f++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, o.__u |= 4))) : e.__k[a] = null;
75
+ if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = P(s)), ve(s, s));
76
76
  return r;
77
77
  }
78
- function oe(e, t, n) {
78
+ function ce(e, t, n) {
79
79
  var r, i;
80
80
  if (typeof e.type == "function") {
81
- for (r = e.__k, i = 0; r && i < r.length; i++) r[i] && (r[i].__ = e, t = oe(r[i], t, n));
81
+ for (r = e.__k, i = 0; r && i < r.length; i++) r[i] && (r[i].__ = e, t = ce(r[i], t, n));
82
82
  return t;
83
83
  }
84
84
  e.__e != t && (t && e.type && !t.parentNode && (t = P(e)), t = n.insertBefore(e.__e, t || null));
@@ -87,7 +87,7 @@ function oe(e, t, n) {
87
87
  while (t != null && t.nodeType == 8);
88
88
  return t;
89
89
  }
90
- function se(e, t, n, r) {
90
+ function le(e, t, n, r) {
91
91
  var i, a, o, s = e.key, c = e.type, l = t[n], u = l != null && !(2 & l.__u);
92
92
  if (l === null && s == null || u && s == l.key && c == l.type) return n;
93
93
  if (r > +!!u) {
@@ -95,18 +95,18 @@ function se(e, t, n, r) {
95
95
  }
96
96
  return -1;
97
97
  }
98
- function ce(e, t, n) {
99
- t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || D.test(t) ? n : n + "px";
98
+ function ue(e, t, n) {
99
+ t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || ee.test(t) ? n : n + "px";
100
100
  }
101
101
  function I(e, t, n, r, i) {
102
102
  var a, o;
103
103
  n: if (t == "style") {
104
104
  if (typeof n == "string") e.style.cssText = n;
105
105
  else {
106
- if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || ce(e.style, t, "");
107
- if (n) for (t in n) r && n[t] == r[t] || ce(e.style, t, n[t]);
106
+ if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || ue(e.style, t, "");
107
+ if (n) for (t in n) r && n[t] == r[t] || ue(e.style, t, n[t]);
108
108
  }
109
- } else if (t[0] == "o" && t[1] == "n") a = t != (t = t.replace(b, "$1")), o = t.toLowerCase(), t = o in e || t == "onFocusOut" || t == "onFocusIn" ? o.slice(2) : t.slice(2), e.l ||= {}, e.l[t + a] = n, n ? r ? n[y] = r[y] : (n[y] = x, e.addEventListener(t, a ? C : S, a)) : e.removeEventListener(t, a ? C : S, a);
109
+ } else if (t[0] == "o" && t[1] == "n") a = t != (t = t.replace(S, "$1")), o = t.toLowerCase(), t = o in e || t == "onFocusOut" || t == "onFocusIn" ? o.slice(2) : t.slice(2), e.l ||= {}, e.l[t + a] = n, n ? r ? n[x] = r[x] : (n[x] = C, e.addEventListener(t, a ? T : w, a)) : e.removeEventListener(t, a ? T : w, a);
110
110
  else {
111
111
  if (i == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
112
112
  else if (t != "width" && t != "height" && t != "href" && t != "list" && t != "form" && t != "tabIndex" && t != "download" && t != "rowSpan" && t != "colSpan" && t != "role" && t != "popover" && t in e) try {
@@ -116,72 +116,72 @@ function I(e, t, n, r, i) {
116
116
  typeof n == "function" || (n == null || !1 === n && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && n == 1 ? "" : n));
117
117
  }
118
118
  }
119
- function le(e) {
119
+ function de(e) {
120
120
  return function(t) {
121
121
  if (this.l) {
122
122
  var n = this.l[t.type + e];
123
- if (t[v] == null) t[v] = x++;
124
- else if (t[v] < n[y]) return;
125
- return n(d.event ? d.event(t) : t);
123
+ if (t[b] == null) t[b] = C++;
124
+ else if (t[b] < n[x]) return;
125
+ return n(p.event ? p.event(t) : t);
126
126
  }
127
127
  };
128
128
  }
129
- function ue(e, t, n, r, i, a, o, s, c, l) {
130
- var u, f, p, m, h, g, _, v, y, b, x, S, C, w, T, D, A = t.type;
129
+ function fe(e, t, n, r, i, a, o, s, c, l) {
130
+ var u, d, f, m, h, g, _, v, y, b, x, S, C, w, T, E, D = t.type;
131
131
  if (t.constructor !== void 0) return null;
132
- 128 & n.__u && (c = !!(32 & n.__u), a = [s = t.__e = n.__e]), (u = d.__b) && u(t);
133
- n: if (typeof A == "function") {
134
- f = o.length;
132
+ 128 & n.__u && (c = !!(32 & n.__u), a = [s = t.__e = n.__e]), (u = p.__b) && u(t);
133
+ n: if (typeof D == "function") {
134
+ d = o.length;
135
135
  try {
136
- if (y = t.props, b = A.prototype && A.prototype.render, x = (u = A.contextType) && r[u.__c], S = u ? x ? x.props.value : u.__ : r, n.__c ? v = (p = t.__c = n.__c).__ = p.__E : (b ? t.__c = p = new A(y, S) : (t.__c = p = new N(y, S), p.constructor = A, p.render = _e), x && x.sub(p), p.state || (p.state = {}), p.__n = r, m = p.__d = !0, p.__h = [], p._sb = []), b && p.__s == null && (p.__s = p.state), b && A.getDerivedStateFromProps != null && (p.__s == p.state && (p.__s = k({}, p.__s)), k(p.__s, A.getDerivedStateFromProps(y, p.__s))), h = p.props, g = p.state, p.__v = t, m) b && A.getDerivedStateFromProps == null && p.componentWillMount != null && p.componentWillMount(), b && p.componentDidMount != null && p.__h.push(p.componentDidMount);
136
+ if (y = t.props, b = D.prototype && D.prototype.render, x = (u = D.contextType) && r[u.__c], S = u ? x ? x.props.value : u.__ : r, n.__c ? v = (f = t.__c = n.__c).__ = f.__E : (b ? t.__c = f = new D(y, S) : (t.__c = f = new N(y, S), f.constructor = D, f.render = ye), x && x.sub(f), f.state || (f.state = {}), f.__n = r, m = f.__d = !0, f.__h = [], f._sb = []), b && f.__s == null && (f.__s = f.state), b && D.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = A({}, f.__s)), A(f.__s, D.getDerivedStateFromProps(y, f.__s))), h = f.props, g = f.state, f.__v = t, m) b && D.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), b && f.componentDidMount != null && f.__h.push(f.componentDidMount);
137
137
  else {
138
- if (b && A.getDerivedStateFromProps == null && y !== h && p.componentWillReceiveProps != null && p.componentWillReceiveProps(y, S), t.__v == n.__v || !p.__e && p.shouldComponentUpdate != null && !1 === p.shouldComponentUpdate(y, p.__s, S)) {
139
- t.__v != n.__v && (p.props = y, p.state = p.__s, p.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.some(function(e) {
138
+ if (b && D.getDerivedStateFromProps == null && y !== h && f.componentWillReceiveProps != null && f.componentWillReceiveProps(y, S), t.__v == n.__v || !f.__e && f.shouldComponentUpdate != null && !1 === f.shouldComponentUpdate(y, f.__s, S)) {
139
+ t.__v != n.__v && (f.props = y, f.state = f.__s, f.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.some(function(e) {
140
140
  e && (e.__ = t);
141
- }), E.push.apply(p.__h, p._sb), p._sb = [], p.__h.length && o.push(p), s = P(n);
141
+ }), O.push.apply(f.__h, f._sb), f._sb = [], f.__h.length && o.push(f), s = P(n);
142
142
  break n;
143
143
  }
144
- p.componentWillUpdate != null && p.componentWillUpdate(y, p.__s, S), b && p.componentDidUpdate != null && p.__h.push(function() {
145
- p.componentDidUpdate(h, g, _);
144
+ f.componentWillUpdate != null && f.componentWillUpdate(y, f.__s, S), b && f.componentDidUpdate != null && f.__h.push(function() {
145
+ f.componentDidUpdate(h, g, _);
146
146
  });
147
147
  }
148
- if (p.context = S, p.props = y, p.__P = e, p.__e = !1, C = d.__r, w = 0, b) p.state = p.__s, p.__d = !1, C && C(t), u = p.render(p.props, p.state, p.context), E.push.apply(p.__h, p._sb), p._sb = [];
148
+ if (f.context = S, f.props = y, f.__P = e, f.__e = !1, C = p.__r, w = 0, b) f.state = f.__s, f.__d = !1, C && C(t), u = f.render(f.props, f.state, f.context), O.push.apply(f.__h, f._sb), f._sb = [];
149
149
  else do
150
- p.__d = !1, C && C(t), u = p.render(p.props, p.state, p.context), p.state = p.__s;
151
- while (p.__d && ++w < 25);
152
- p.state = p.__s, p.getChildContext != null && (r = k(k({}, r), p.getChildContext())), b && !m && p.getSnapshotBeforeUpdate != null && (_ = p.getSnapshotBeforeUpdate(h, g)), T = u != null && u.type === M && u.key == null ? pe(u.props.children) : u, s = ie(e, O(T) ? T : [T], t, n, r, i, a, o, s, c, l), p.base = t.__e, t.__u &= -161, p.__h.length && o.push(p), v && (p.__E = p.__ = null);
150
+ f.__d = !1, C && C(t), u = f.render(f.props, f.state, f.context), f.state = f.__s;
151
+ while (f.__d && ++w < 25);
152
+ f.state = f.__s, f.getChildContext != null && (r = A(A({}, r), f.getChildContext())), b && !m && f.getSnapshotBeforeUpdate != null && (_ = f.getSnapshotBeforeUpdate(h, g)), T = u != null && u.type === M && u.key == null ? he(u.props.children) : u, s = oe(e, k(T) ? T : [T], t, n, r, i, a, o, s, c, l), f.base = t.__e, t.__u &= -161, f.__h.length && o.push(f), v && (f.__E = f.__ = null);
153
153
  } catch (e) {
154
- if (o.length = f, t.__v = null, c || a != null) {
154
+ if (o.length = d, t.__v = null, c || a != null) {
155
155
  if (e.then) {
156
156
  for (t.__u |= c ? 160 : 128; s && s.nodeType == 8 && s.nextSibling;) s = s.nextSibling;
157
157
  a != null && (a[a.indexOf(s)] = null), t.__e = s;
158
- } else if (a != null) for (D = a.length; D--;) ee(a[D]);
158
+ } else if (a != null) for (E = a.length; E--;) te(a[E]);
159
159
  } else t.__e = n.__e;
160
- t.__k ??= n.__k || [], e.then || de(t), d.__e(e, t, n);
160
+ t.__k ??= n.__k || [], e.then || pe(t), p.__e(e, t, n);
161
161
  }
162
- } else a == null && t.__v == n.__v ? (t.__k = n.__k, t.__e = n.__e) : s = t.__e = me(n.__e, t, n, r, i, a, o, c, l);
163
- return (u = d.diffed) && u(t), 128 & t.__u ? void 0 : s;
162
+ } else a == null && t.__v == n.__v ? (t.__k = n.__k, t.__e = n.__e) : s = t.__e = ge(n.__e, t, n, r, i, a, o, c, l);
163
+ return (u = p.diffed) && u(t), 128 & t.__u ? void 0 : s;
164
164
  }
165
- function de(e) {
166
- e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(de));
165
+ function pe(e) {
166
+ e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(pe));
167
167
  }
168
- function fe(e, t, n) {
169
- for (var r = 0; r < n.length; r++) he(n[r], n[++r], n[++r]);
170
- d.__c && d.__c(t, e), e.some(function(t) {
168
+ function me(e, t, n) {
169
+ for (var r = 0; r < n.length; r++) _e(n[r], n[++r], n[++r]);
170
+ p.__c && p.__c(t, e), e.some(function(t) {
171
171
  try {
172
172
  e = t.__h, t.__h = [], e.some(function(e) {
173
173
  e.call(t);
174
174
  });
175
175
  } catch (e) {
176
- d.__e(e, t.__v);
176
+ p.__e(e, t.__v);
177
177
  }
178
178
  });
179
179
  }
180
- function pe(e) {
181
- return typeof e != "object" || !e || e.__b > 0 ? e : O(e) ? e.map(pe) : e.constructor === void 0 ? k({}, e) : null;
180
+ function he(e) {
181
+ return typeof e != "object" || !e || e.__b > 0 ? e : k(e) ? e.map(he) : e.constructor === void 0 ? A({}, e) : null;
182
182
  }
183
- function me(e, t, n, r, i, a, o, s, c) {
184
- var l, f, p, m, h, g, _, v = n.props || T, y = t.props, b = t.type;
183
+ function ge(e, t, n, r, i, a, o, s, c) {
184
+ var l, u, d, m, h, g, _, v = n.props || D, y = t.props, b = t.type;
185
185
  if (b == "svg" ? i = "http://www.w3.org/2000/svg" : b == "math" ? i = "http://www.w3.org/1998/Math/MathML" : i ||= "http://www.w3.org/1999/xhtml", a != null) {
186
186
  for (l = 0; l < a.length; l++) if ((h = a[l]) && "setAttribute" in h == !!b && (b ? h.localName == b : h.nodeType == 3)) {
187
187
  e = h, a[l] = null;
@@ -190,50 +190,50 @@ function me(e, t, n, r, i, a, o, s, c) {
190
190
  }
191
191
  if (e == null) {
192
192
  if (b == null) return document.createTextNode(y);
193
- e = document.createElementNS(i, b, y.is && y), s &&= (d.__m && d.__m(t, a), !1), a = null;
193
+ e = document.createElementNS(i, b, y.is && y), s &&= (p.__m && p.__m(t, a), !1), a = null;
194
194
  }
195
195
  if (b == null) v === y || s && e.data == y || (e.data = y);
196
196
  else {
197
- if (a = b == "textarea" && y.defaultValue != null ? null : a && u.call(e.childNodes), !s && a != null) for (v = {}, l = 0; l < e.attributes.length; l++) v[(h = e.attributes[l]).name] = h.value;
198
- for (l in v) h = v[l], l == "dangerouslySetInnerHTML" ? p = h : l == "children" || l in y || l == "value" && "defaultValue" in y || l == "checked" && "defaultChecked" in y || I(e, l, null, h, i);
199
- for (l in y) h = y[l], l == "children" ? m = h : l == "dangerouslySetInnerHTML" ? f = h : l == "value" ? g = h : l == "checked" ? _ = h : s && typeof h != "function" || v[l] === h || I(e, l, h, v[l], i);
200
- if (f) s || p && (f.__html == p.__html || f.__html == e.innerHTML) || (e.innerHTML = f.__html), t.__k = [];
201
- else if (p && (e.innerHTML = ""), ie(t.type == "template" ? e.content : e, O(m) ? m : [m], t, n, r, b == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, a, o, a ? a[0] : n.__k && P(n, 0), s, c), a != null) for (l = a.length; l--;) ee(a[l]);
197
+ if (a = b == "textarea" && y.defaultValue != null ? null : a && f.call(e.childNodes), !s && a != null) for (v = {}, l = 0; l < e.attributes.length; l++) v[(h = e.attributes[l]).name] = h.value;
198
+ for (l in v) h = v[l], l == "dangerouslySetInnerHTML" ? d = h : l == "children" || l in y || l == "value" && "defaultValue" in y || l == "checked" && "defaultChecked" in y || I(e, l, null, h, i);
199
+ for (l in y) h = y[l], l == "children" ? m = h : l == "dangerouslySetInnerHTML" ? u = h : l == "value" ? g = h : l == "checked" ? _ = h : s && typeof h != "function" || v[l] === h || I(e, l, h, v[l], i);
200
+ if (u) s || d && (u.__html == d.__html || u.__html == e.innerHTML) || (e.innerHTML = u.__html), t.__k = [];
201
+ else if (d && (e.innerHTML = ""), oe(t.type == "template" ? e.content : e, k(m) ? m : [m], t, n, r, b == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, a, o, a ? a[0] : n.__k && P(n, 0), s, c), a != null) for (l = a.length; l--;) te(a[l]);
202
202
  s && b != "textarea" || (l = "value", b == "progress" && g == null ? e.removeAttribute("value") : g != null && (g !== e[l] || b == "progress" && !g || b == "option" && g != v[l]) && I(e, l, g, v[l], i), l = "checked", _ != null && _ != e[l] && I(e, l, _, v[l], i));
203
203
  }
204
204
  return e;
205
205
  }
206
- function he(e, t, n) {
206
+ function _e(e, t, n) {
207
207
  try {
208
208
  if (typeof e == "function") {
209
209
  var r = typeof e.__u == "function";
210
210
  r && e.__u(), r && t == null || (e.__u = e(t));
211
211
  } else e.current = t;
212
212
  } catch (e) {
213
- d.__e(e, n);
213
+ p.__e(e, n);
214
214
  }
215
215
  }
216
- function ge(e, t, n) {
216
+ function ve(e, t, n) {
217
217
  var r, i;
218
- if (d.unmount && d.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || he(r, null, t)), (r = e.__c) != null) {
218
+ if (p.unmount && p.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || _e(r, null, t)), (r = e.__c) != null) {
219
219
  if (r.componentWillUnmount) try {
220
220
  r.componentWillUnmount();
221
221
  } catch (e) {
222
- d.__e(e, t);
222
+ p.__e(e, t);
223
223
  }
224
224
  r.base = r.__P = r.__n = null;
225
225
  }
226
- if (r = e.__k) for (i = 0; i < r.length; i++) r[i] && ge(r[i], t, n || typeof e.type != "function");
227
- n || ee(e.__e), e.__c = e.__ = e.__e = void 0;
226
+ if (r = e.__k) for (i = 0; i < r.length; i++) r[i] && ve(r[i], t, n || typeof e.type != "function");
227
+ n || te(e.__e), e.__c = e.__ = e.__e = void 0;
228
228
  }
229
- function _e(e, t, n) {
229
+ function ye(e, t, n) {
230
230
  return this.constructor(e, n);
231
231
  }
232
- function ve(e, t, n) {
232
+ function L(e, t, n) {
233
233
  var r, i, a, o;
234
- t == document && (t = document.documentElement), d.__ && d.__(e, t), i = (r = typeof n == "function") ? null : n && n.__k || t.__k, a = [], o = [], ue(t, e = (!r && n || t).__k = A(M, null, [e]), i || T, T, t.namespaceURI, !r && n ? [n] : i ? null : t.firstChild ? u.call(t.childNodes) : null, a, !r && n ? n : i ? i.__e : t.firstChild, r, o), fe(a, e, o), e.props.children = null;
234
+ t == document && (t = document.documentElement), p.__ && p.__(e, t), i = (r = typeof n == "function") ? null : n && n.__k || t.__k, a = [], o = [], fe(t, e = (!r && n || t).__k = j(M, null, [e]), i || D, D, t.namespaceURI, !r && n ? [n] : i ? null : t.firstChild ? f.call(t.childNodes) : null, a, !r && n ? n : i ? i.__e : t.firstChild, r, o), me(a, e, o), e.props.children = null;
235
235
  }
236
- function ye(e) {
236
+ function be(e) {
237
237
  function t(e) {
238
238
  var n, r;
239
239
  return this.getChildContext || (n = /* @__PURE__ */ new Set(), (r = {})[t.__c] = this, this.getChildContext = function() {
@@ -242,7 +242,7 @@ function ye(e) {
242
242
  n = null;
243
243
  }, this.shouldComponentUpdate = function(e) {
244
244
  this.props.value != e.value && n.forEach(function(e) {
245
- e.__e = !0, re(e);
245
+ e.__e = !0, ae(e);
246
246
  });
247
247
  }, this.sub = function(e) {
248
248
  n.add(e);
@@ -252,44 +252,44 @@ function ye(e) {
252
252
  };
253
253
  }), e.children;
254
254
  }
255
- return t.__c = "__cC" + w++, t.__ = e, t.Provider = t.__l = (t.Consumer = function(e, t) {
255
+ return t.__c = "__cC" + E++, t.__ = e, t.Provider = t.__l = (t.Consumer = function(e, t) {
256
256
  return e.children(t);
257
257
  }).contextType = t, t;
258
258
  }
259
- u = E.slice, d = { __e: function(e, t, n, r) {
259
+ f = O.slice, p = { __e: function(e, t, n, r) {
260
260
  for (var i, a, o; t = t.__;) if ((i = t.__c) && !i.__) try {
261
261
  if ((a = i.constructor) && a.getDerivedStateFromError != null && (i.setState(a.getDerivedStateFromError(e)), o = i.__d), i.componentDidCatch != null && (i.componentDidCatch(e, r || {}), o = i.__d), o) return i.__E = i;
262
262
  } catch (t) {
263
263
  e = t;
264
264
  }
265
265
  throw e;
266
- } }, f = 0, N.prototype.setState = function(e, t) {
267
- var n = this.__s != null && this.__s != this.state ? this.__s : this.__s = k({}, this.state);
268
- typeof e == "function" && (e = e(k({}, n), this.props)), e && k(n, e), e != null && this.__v && (t && this._sb.push(t), re(this));
266
+ } }, m = 0, N.prototype.setState = function(e, t) {
267
+ var n = this.__s != null && this.__s != this.state ? this.__s : this.__s = A({}, this.state);
268
+ typeof e == "function" && (e = e(A({}, n), this.props)), e && A(n, e), e != null && this.__v && (t && this._sb.push(t), ae(this));
269
269
  }, N.prototype.forceUpdate = function(e) {
270
- this.__v && (this.__e = !0, e && this.__h.push(e), re(this));
271
- }, N.prototype.render = M, p = [], h = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, g = function(e, t) {
270
+ this.__v && (this.__e = !0, e && this.__h.push(e), ae(this));
271
+ }, N.prototype.render = M, h = [], _ = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, v = function(e, t) {
272
272
  return e.__v.__b - t.__v.__b;
273
- }, F.__r = 0, _ = Math.random().toString(8), v = "__d" + _, y = "__a" + _, b = /(PointerCapture)$|Capture$/i, x = 0, S = le(!1), C = le(!0), w = 0;
273
+ }, F.__r = 0, y = Math.random().toString(8), b = "__d" + y, x = "__a" + y, S = /(PointerCapture)$|Capture$/i, C = 0, w = de(!1), T = de(!0), E = 0;
274
274
  // src/element/styles.css?inline
275
- var be = ":host{--rkw-surface:#fff;--rkw-ground:#f6f7f9;--rkw-plate:#f6f7f9;--rkw-ink:#101014;--rkw-ink-muted:#6b6b76;--rkw-line:#e5e5ea;--rkw-brand:#533afd;--rkw-brand-ink:#fff;--rkw-danger:#b42318;--rkw-ok:#12a150;--rkw-installed:#16a34a;--rkw-installed-ink:#15803d;--rkw-radius:10px;--rkw-hover:color-mix(in srgb, var(--rkw-ink-muted) 12%, transparent);--rkw-cross:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round'%3E%3Cpath d='M6 6 18 18M18 6 6 18'/%3E%3C/svg%3E\");color-scheme:var(--rkw-color-scheme,light);scrollbar-width:thin;color:var(--rkw-ink);font-family:var(--rkw-font,inherit);-webkit-font-smoothing:antialiased;font-size:16px;line-height:1.5;display:block}:host([hidden]){display:none}*,:before,:after{box-sizing:border-box}button{font:inherit;color:inherit}.wallets{gap:.5rem;display:grid}.wallet{border:1px solid var(--rkw-line);border-radius:var(--rkw-radius);background:var(--rkw-surface);width:100%;font:inherit;color:inherit;cursor:pointer;text-align:left;align-items:center;gap:.625rem;padding:.625rem .75rem;font-size:.875rem;display:flex}.wallet:hover:not(:disabled){border-color:var(--rkw-brand)}.wallet:disabled{opacity:.6;cursor:progress}.wallet-mark{background:var(--rkw-plate);border-radius:7px;flex:none;place-items:center;width:1.75rem;height:1.75rem;font-size:.75rem;font-weight:700;display:grid;overflow:hidden}.wallet-mark img{object-fit:contain;width:100%;height:100%}.wallet-name{flex:1;font-weight:500}.wallet-tag{color:var(--rkw-ink-muted);font-size:.6875rem}.connected{border:1px solid var(--rkw-line);border-radius:var(--rkw-radius);align-items:center;gap:.625rem;padding:.625rem .75rem;display:flex}.connected-meta{flex:1;min-width:0;display:grid}.connected-meta strong{font-size:.875rem}.connected-meta code{color:var(--rkw-ink-muted);font-size:.75rem}.primary,.secondary{font:inherit;border-radius:var(--rkw-radius);cursor:pointer;border:1px solid #0000;width:100%;padding:.75rem 1rem;font-size:.9375rem;font-weight:600}.primary{background:var(--rkw-brand);color:var(--rkw-brand-ink)}.primary:disabled{opacity:.45;cursor:not-allowed}.secondary{background:var(--rkw-surface);border-color:var(--rkw-line);color:inherit;justify-self:start;width:auto;padding:.5rem .75rem;font-size:.8125rem}.link-button{font:inherit;color:var(--rkw-brand);cursor:pointer;background:0 0;border:0;padding:0;font-size:.8125rem}.plan-terms{color:var(--rkw-ink);margin:.625rem 0 0;font-size:.8125rem;line-height:1.5}.pending{color:var(--rkw-ink-muted);margin:0;font-size:.75rem}.error{color:var(--rkw-danger);margin:0;font-size:.8125rem}.muted{color:var(--rkw-ink-muted);margin:0;font-size:.875rem}.wallet-dialog{border:1px solid var(--rkw-line);background:var(--rkw-surface);width:min(22.5rem,100vw - 2rem);max-height:min(40rem,100dvh - 4rem);color:inherit;border-radius:24px;margin:auto;padding:0;transition:height .3s cubic-bezier(.22,1,.36,1),width .3s cubic-bezier(.22,1,.36,1);overflow:hidden;box-shadow:0 24px 60px -20px #10101447,0 2px 6px #1010140d}.wallet-dialog[open]{display:flex}.wallet-dialog::backdrop{background:color-mix(in srgb, var(--rkw-ground) 55%, transparent);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.wallet-list{gap:.25rem;display:grid}.wallet-row{width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:12px;align-items:center;gap:.75rem;padding:.75rem .5rem;transition:background .15s;display:flex}.wallet-row:hover:not(:disabled),.wallet-row:focus-visible{background:var(--rkw-hover)}.wallet-row .wallet-mark-lg{border-radius:12px;width:2.5rem;height:2.5rem}.wallet-row-name{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;font-size:.9375rem;font-weight:500;overflow:hidden}.wallet-row-tag{background:color-mix(in srgb, var(--rkw-brand) 9%, transparent);color:var(--rkw-brand);letter-spacing:.02em;text-transform:uppercase;border-radius:6px;flex:none;padding:.125rem .4375rem;font-size:.625rem;font-weight:700;line-height:1}.wallet-row-tag.is-installed{background:color-mix(in srgb, var(--rkw-installed) 12%, transparent);color:var(--rkw-installed-ink)}.wallet-row-tag.is-muted{background:color-mix(in srgb, var(--rkw-ink-muted) 10%, transparent);color:var(--rkw-ink-muted)}.wallet-search-row{background:var(--rkw-plate);flex:none;margin-top:.375rem;padding-top:.5rem;padding-bottom:.5rem}.wallet-search-row .wallet-search-icon{height:1.5rem}.wallet-search-row:hover:not(:disabled),.wallet-search-row:focus-visible{background:var(--rkw-hover)}.wallet-search-icon{width:2.5rem;height:2.5rem;color:var(--rkw-ink-muted);flex:none;place-items:center;display:grid}.wallet-search-icon svg{width:1.25rem;height:1.25rem}.wallet-row-count{color:var(--rkw-ink-muted);font-variant-numeric:tabular-nums;flex:none;font-size:.8125rem}.wallet-row-chevron{color:var(--rkw-ink-muted);flex:none;font-size:1rem;line-height:1}.wallet-dialog-body{flex-direction:column;width:100%;min-height:0;padding:1rem 1rem .875rem;display:flex}.wallet-dialog-head{flex:none;justify-content:space-between;align-items:center;gap:.5rem;margin-bottom:1.125rem;display:flex}.wallet-dialog-head h2{margin:0;font-size:.9375rem;font-weight:600}.icon-button{font:inherit;width:1.75rem;height:1.75rem;color:var(--rkw-ink-muted);cursor:pointer;background:0 0;border:0;border-radius:7px;place-items:center;font-size:1.25rem;line-height:1;display:grid}.icon-button:hover{background:var(--rkw-hover);color:var(--rkw-ink)}.wallet-search{font:inherit;border:1px solid var(--rkw-line);border-radius:var(--rkw-radius);background:var(--rkw-surface);width:100%;color:inherit;flex:none;margin-bottom:.875rem;padding:.5rem .75rem;font-size:.875rem}.wallet-search::-webkit-search-cancel-button{appearance:none;cursor:pointer;background-color:var(--rkw-ink-muted);width:1.125rem;height:1.125rem;-webkit-mask:var(--rkw-cross) center / contain no-repeat;-webkit-mask:var(--rkw-cross) center / contain no-repeat;mask:var(--rkw-cross) center / contain no-repeat}.wallet-search::-webkit-search-cancel-button:hover{background-color:var(--rkw-ink)}.wallet-grid,.wallet-list{overscroll-behavior:contain;min-height:0;margin-right:-1rem;padding-right:1rem;overflow-y:auto}.wallet-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:.625rem;max-height:24rem;margin-bottom:-.625rem;display:grid}.wallet-tile{background:var(--rkw-plate);font:inherit;color:inherit;cursor:pointer;text-align:center;border:0;border-radius:16px;justify-items:center;gap:.5rem;padding:.875rem .5rem;text-decoration:none;transition:background .15s;display:grid;position:relative}.wallet-tile:hover:not(:disabled),.wallet-tile:focus-visible{background:var(--rkw-hover)}.wallet-tile .wallet-mark-lg{background:var(--rkw-surface);border-radius:14px;width:3.25rem;height:3.25rem}.wallet-tile:disabled{opacity:.6;cursor:progress}.wallet-mark-lg{border-radius:12px;width:2.75rem;height:2.75rem;font-size:1rem}.wallet-tile-name{text-overflow:ellipsis;white-space:nowrap;width:100%;max-width:100%;font-size:.75rem;font-weight:500;line-height:1.2;overflow:hidden}.wallet-tile-badge{background:var(--rkw-surface);border:1.5px solid var(--rkw-installed);width:.9375rem;height:.9375rem;color:var(--rkw-installed);box-shadow:0 0 0 2px var(--rkw-plate);border-radius:999px;place-items:center;display:grid;position:absolute;top:.4375rem;right:.4375rem}.wallet-tile-badge svg{stroke-width:4px;width:.5rem;height:.5rem}.wallet-stack{flex:none;justify-content:center;align-items:center;width:1.75rem;height:1.75rem;display:flex}.wallet-stack img{object-fit:cover;width:1rem;height:1rem;box-shadow:0 0 0 2px var(--rkw-surface);border-radius:50%}.wallet-stack img+img{margin-left:-.4375rem}.wallet-more-button .wallet-mark{letter-spacing:.05em;color:var(--rkw-ink-muted)}.wallet-empty{text-align:center;padding:1rem 0 0}.icon-button-spacer{width:1.75rem;height:1.75rem}.connect-status{align-content:center;gap:.625rem;min-height:17rem;padding:1.25rem 0 1.5rem}.connect-status .connect-retry{justify-self:center;margin-top:.5rem}.connect-open{text-align:center;text-decoration:none;display:block}.connect-handoff{align-content:center;gap:1rem;min-height:16rem}.connect-status-mark{place-items:center;width:5.5rem;height:5.5rem;display:grid;position:relative}.connect-status-mark .wallet-mark-lg{background:var(--rkw-surface);border-radius:18px;width:4rem;height:4rem}.connect-spinner{width:100%;height:100%;color:var(--rkw-brand);animation:1.1s linear infinite connect-spin;position:absolute;inset:0}@keyframes connect-spin{to{transform:rotate(360deg)}}.connect-retry,.connect-copy{align-items:center;gap:.375rem;display:inline-flex}.connect-retry-icon{width:.875rem;height:.875rem}@media (prefers-reduced-motion:reduce){.connect-spinner,.qr-spinner,.state-loading-spinner{animation:none}}.connect-status-title{margin:.5rem 0 0;font-size:.9375rem;font-weight:600}.connect-status-title.is-error{color:var(--rkw-danger)}.connect-status-note{max-width:30ch;color:var(--rkw-ink-muted);text-align:center;margin:0;font-size:.8125rem;line-height:1.5}@keyframes wallet-view-in{0%{opacity:0;transform:translateY(6px)scale(.985)}to{opacity:1;transform:none}}.connect-panel,.wallet-list,.wallet-grid{animation:.24s cubic-bezier(.22,1,.36,1) both wallet-view-in}@media (prefers-reduced-motion:reduce){.connect-panel,.wallet-list,.wallet-grid{animation:none}}.connect-panel{justify-items:center;gap:.875rem;min-height:0;padding:.5rem 0 0;display:grid;overflow-y:auto}.portal-tabs{border:1px solid var(--rkw-line);border-radius:var(--rkw-radius);background:var(--rkw-plate);gap:.25rem;padding:.3125rem;display:flex}.portal-tab{color:var(--rkw-ink-muted);cursor:pointer;font:inherit;background:0 0;border:0;border-radius:7px;flex:1;justify-content:center;align-items:center;gap:.375rem;padding:.4375rem .5rem;font-size:.8125rem;font-weight:500;transition:background .15s,color .15s;display:inline-flex}.portal-tab:hover{color:var(--rkw-ink)}.portal-tab.is-active{background:color-mix(in srgb, var(--rkw-brand) 16%, var(--rkw-surface));color:var(--rkw-ink);box-shadow:none}.portal-tabs.qr-tabs{border-radius:9px;gap:0;width:auto;padding:0;overflow:hidden}.qr-tabs .portal-tab{border-radius:0;flex:none;padding:.4375rem .875rem;font-size:.75rem}.qr-tabs .portal-tab.is-active{box-shadow:none}.qr-frame{border:1px solid var(--rkw-line);background:var(--rkw-surface);border-radius:22px;place-items:center;width:100%;padding:0;display:grid;position:relative;overflow:hidden}.qr{aspect-ratio:1;place-items:center;width:100%;max-width:none;display:grid}.qr svg{width:100%;height:100%}.qr-fallback{border:1px dashed var(--rkw-line);background:var(--rkw-ground);border-radius:10px;padding:1rem}.qr-fallback code{word-break:break-all;text-align:center;color:var(--rkw-ink-muted);font-size:.6875rem;line-height:1.5}.qr .qr-spinner{width:2.5rem;height:2.5rem;color:var(--rkw-brand);animation:1.1s linear infinite connect-spin}.qr-badge{background:var(--rkw-surface);border-radius:12px;place-items:center;padding:.25rem;display:grid;position:absolute}.qr-caption{text-align:center;margin:0;font-size:.8125rem}.qr-copy{font-size:.8125rem}.install-row{border:1px solid var(--rkw-line);border-radius:var(--rkw-radius);background:var(--rkw-ground);justify-content:space-between;align-items:center;gap:.75rem;width:100%;padding:.625rem .75rem;font-size:.8125rem;display:flex}.install-row .secondary{text-decoration:none;display:inline-block}", L, R, xe, Se, z = 0, Ce = [], B = d, we = B.__b, Te = B.__r, Ee = B.diffed, De = B.__c, Oe = B.unmount, ke = B.__;
276
- function V(e, t) {
277
- B.__h && B.__h(R, e, z || t), z = 0;
278
- var n = R.__H || (R.__H = {
275
+ var xe = ":host{--rkw-surface:#fff;--rkw-ground:#f6f7f9;--rkw-plate:#f6f7f9;--rkw-ink:#101014;--rkw-ink-muted:#6b6b76;--rkw-line:#e5e5ea;--rkw-brand:#533afd;--rkw-brand-ink:#fff;--rkw-danger:#b42318;--rkw-ok:#12a150;--rkw-installed:#16a34a;--rkw-installed-ink:#15803d;--rkw-radius:10px;--rkw-hover:color-mix(in srgb, var(--rkw-ink-muted) 12%, transparent);--rkw-cross:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round'%3E%3Cpath d='M6 6 18 18M18 6 6 18'/%3E%3C/svg%3E\");color-scheme:var(--rkw-color-scheme,light);scrollbar-width:thin;color:var(--rkw-ink);font-family:var(--rkw-font,inherit);-webkit-font-smoothing:antialiased;font-size:16px;line-height:1.5;display:block}:host([hidden]){display:none}*,:before,:after{box-sizing:border-box}button{font:inherit;color:inherit}.wallets{gap:.5rem;display:grid}.wallet{border:1px solid var(--rkw-line);border-radius:var(--rkw-radius);background:var(--rkw-surface);width:100%;font:inherit;color:inherit;cursor:pointer;text-align:left;align-items:center;gap:.625rem;padding:.625rem .75rem;font-size:.875rem;display:flex}.wallet:hover:not(:disabled){border-color:var(--rkw-brand)}.wallet:disabled{opacity:.6;cursor:progress}.wallet-mark{background:var(--rkw-plate);border-radius:7px;flex:none;place-items:center;width:1.75rem;height:1.75rem;font-size:.75rem;font-weight:700;display:grid;overflow:hidden}.wallet-mark img{object-fit:contain;width:100%;height:100%}.wallet-name{flex:1;font-weight:500}.wallet-tag{color:var(--rkw-ink-muted);font-size:.6875rem}.connected{border:1px solid var(--rkw-line);border-radius:var(--rkw-radius);align-items:center;gap:.625rem;padding:.625rem .75rem;display:flex}.connected-meta{flex:1;min-width:0;display:grid}.connected-meta strong{font-size:.875rem}.connected-meta code{color:var(--rkw-ink-muted);font-size:.75rem}.primary,.secondary{font:inherit;border-radius:var(--rkw-radius);cursor:pointer;border:1px solid #0000;width:100%;padding:.75rem 1rem;font-size:.9375rem;font-weight:600}.primary{background:var(--rkw-brand);color:var(--rkw-brand-ink)}.primary:disabled{opacity:.45;cursor:not-allowed}.secondary{background:var(--rkw-surface);border-color:var(--rkw-line);color:inherit;justify-self:start;width:auto;padding:.5rem .75rem;font-size:.8125rem}.link-button{font:inherit;color:var(--rkw-brand);cursor:pointer;background:0 0;border:0;padding:0;font-size:.8125rem}.plan-terms{color:var(--rkw-ink);margin:.625rem 0 0;font-size:.8125rem;line-height:1.5}.pending{color:var(--rkw-ink-muted);margin:0;font-size:.75rem}.error{color:var(--rkw-danger);margin:0;font-size:.8125rem}.muted{color:var(--rkw-ink-muted);margin:0;font-size:.875rem}.wallet-dialog{border:1px solid var(--rkw-line);background:var(--rkw-surface);width:min(22.5rem,100vw - 2rem);max-height:min(40rem,100dvh - 4rem);color:inherit;border-radius:24px;margin:auto;padding:0;transition:height .3s cubic-bezier(.22,1,.36,1),width .3s cubic-bezier(.22,1,.36,1);overflow:hidden;box-shadow:0 24px 60px -20px #10101447,0 2px 6px #1010140d}.wallet-dialog[open]{display:flex}.wallet-dialog::backdrop{background:color-mix(in srgb, var(--rkw-ground) 55%, transparent);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.wallet-list{gap:.25rem;display:grid}.wallet-row{width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:12px;align-items:center;gap:.75rem;padding:.75rem .5rem;transition:background .15s;display:flex}.wallet-row:hover:not(:disabled),.wallet-row:focus-visible{background:var(--rkw-hover)}.wallet-row .wallet-mark-lg{border-radius:12px;width:2.5rem;height:2.5rem}.wallet-row-name{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;font-size:.9375rem;font-weight:500;overflow:hidden}.wallet-row-tag{background:color-mix(in srgb, var(--rkw-brand) 9%, transparent);color:var(--rkw-brand);letter-spacing:.02em;text-transform:uppercase;border-radius:6px;flex:none;padding:.125rem .4375rem;font-size:.625rem;font-weight:700;line-height:1}.wallet-row-tag.is-installed{background:color-mix(in srgb, var(--rkw-installed) 12%, transparent);color:var(--rkw-installed-ink)}.wallet-row-tag.is-muted{background:color-mix(in srgb, var(--rkw-ink-muted) 10%, transparent);color:var(--rkw-ink-muted)}.wallet-search-row{background:var(--rkw-plate);flex:none;margin-top:.375rem;padding-top:.5rem;padding-bottom:.5rem}.wallet-search-row .wallet-search-icon{height:1.5rem}.wallet-search-row:hover:not(:disabled),.wallet-search-row:focus-visible{background:var(--rkw-hover)}.wallet-search-icon{width:2.5rem;height:2.5rem;color:var(--rkw-ink-muted);flex:none;place-items:center;display:grid}.wallet-search-icon svg{width:1.25rem;height:1.25rem}.wallet-row-count{color:var(--rkw-ink-muted);font-variant-numeric:tabular-nums;flex:none;font-size:.8125rem}.wallet-row-chevron{color:var(--rkw-ink-muted);flex:none;font-size:1rem;line-height:1}.wallet-dialog-body{flex-direction:column;width:100%;min-height:0;padding:1rem 1rem .875rem;display:flex}.wallet-dialog-head{flex:none;justify-content:space-between;align-items:center;gap:.5rem;margin-bottom:1.125rem;display:flex}.wallet-dialog-head h2{margin:0;font-size:.9375rem;font-weight:600}.icon-button{font:inherit;width:1.75rem;height:1.75rem;color:var(--rkw-ink-muted);cursor:pointer;background:0 0;border:0;border-radius:7px;place-items:center;font-size:1.25rem;line-height:1;display:grid}.icon-button:hover{background:var(--rkw-hover);color:var(--rkw-ink)}.wallet-search{font:inherit;border:1px solid var(--rkw-line);border-radius:var(--rkw-radius);background:var(--rkw-surface);width:100%;color:inherit;flex:none;margin-bottom:.875rem;padding:.5rem .75rem;font-size:.875rem}.wallet-search::-webkit-search-cancel-button{appearance:none;cursor:pointer;background-color:var(--rkw-ink-muted);width:1.125rem;height:1.125rem;-webkit-mask:var(--rkw-cross) center / contain no-repeat;-webkit-mask:var(--rkw-cross) center / contain no-repeat;mask:var(--rkw-cross) center / contain no-repeat}.wallet-search::-webkit-search-cancel-button:hover{background-color:var(--rkw-ink)}.wallet-grid,.wallet-list{overscroll-behavior:contain;min-height:0;margin-right:-1rem;padding-right:1rem;overflow-y:auto}.wallet-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:.625rem;max-height:24rem;margin-bottom:-.625rem;display:grid}.wallet-tile{background:var(--rkw-plate);font:inherit;color:inherit;cursor:pointer;text-align:center;border:0;border-radius:16px;justify-items:center;gap:.5rem;padding:.875rem .5rem;text-decoration:none;transition:background .15s;display:grid;position:relative}.wallet-tile:hover:not(:disabled),.wallet-tile:focus-visible{background:var(--rkw-hover)}.wallet-tile .wallet-mark-lg{background:var(--rkw-surface);border-radius:14px;width:3.25rem;height:3.25rem}.wallet-tile:disabled{opacity:.6;cursor:progress}.wallet-mark-lg{border-radius:12px;width:2.75rem;height:2.75rem;font-size:1rem}.wallet-tile-name{text-overflow:ellipsis;white-space:nowrap;width:100%;max-width:100%;font-size:.75rem;font-weight:500;line-height:1.2;overflow:hidden}.wallet-tile-badge{background:var(--rkw-surface);border:1.5px solid var(--rkw-installed);width:.9375rem;height:.9375rem;color:var(--rkw-installed);box-shadow:0 0 0 2px var(--rkw-plate);border-radius:999px;place-items:center;display:grid;position:absolute;top:.4375rem;right:.4375rem}.wallet-tile-badge svg{stroke-width:4px;width:.5rem;height:.5rem}.wallet-stack{flex:none;justify-content:center;align-items:center;width:1.75rem;height:1.75rem;display:flex}.wallet-stack img{object-fit:cover;width:1rem;height:1rem;box-shadow:0 0 0 2px var(--rkw-surface);border-radius:50%}.wallet-stack img+img{margin-left:-.4375rem}.wallet-more-button .wallet-mark{letter-spacing:.05em;color:var(--rkw-ink-muted)}.wallet-empty{text-align:center;padding:1rem 0 0}.icon-button-spacer{width:1.75rem;height:1.75rem}.connect-status{align-content:center;gap:.625rem;min-height:17rem;padding:1.25rem 0 1.5rem}.connect-status .connect-retry{justify-self:center;margin-top:.5rem}.connect-open{text-align:center;text-decoration:none;display:block}.connect-handoff{align-content:center;gap:1rem;min-height:16rem}.connect-status-mark{place-items:center;width:5.5rem;height:5.5rem;display:grid;position:relative}.connect-status-mark .wallet-mark-lg{background:var(--rkw-surface);border-radius:18px;width:4rem;height:4rem}.connect-spinner{width:100%;height:100%;color:var(--rkw-brand);animation:1.1s linear infinite connect-spin;position:absolute;inset:0}@keyframes connect-spin{to{transform:rotate(360deg)}}.connect-retry,.connect-copy{align-items:center;gap:.375rem;display:inline-flex}.connect-retry-icon{width:.875rem;height:.875rem}@media (prefers-reduced-motion:reduce){.connect-spinner,.qr-spinner,.state-loading-spinner{animation:none}}.connect-status-title{margin:.5rem 0 0;font-size:.9375rem;font-weight:600}.connect-status-title.is-error{color:var(--rkw-danger)}.connect-status-note{max-width:30ch;color:var(--rkw-ink-muted);text-align:center;margin:0;font-size:.8125rem;line-height:1.5}@keyframes wallet-view-in{0%{opacity:0;transform:translateY(6px)scale(.985)}to{opacity:1;transform:none}}.connect-panel,.wallet-list,.wallet-grid{animation:.24s cubic-bezier(.22,1,.36,1) both wallet-view-in}@media (prefers-reduced-motion:reduce){.connect-panel,.wallet-list,.wallet-grid{animation:none}}.connect-panel{justify-items:center;gap:.875rem;min-height:0;padding:.5rem 0 0;display:grid;overflow-y:auto}.portal-tabs{border:1px solid var(--rkw-line);border-radius:var(--rkw-radius);background:var(--rkw-plate);gap:.25rem;padding:.3125rem;display:flex}.portal-tab{color:var(--rkw-ink-muted);cursor:pointer;font:inherit;background:0 0;border:0;border-radius:7px;flex:1;justify-content:center;align-items:center;gap:.375rem;padding:.4375rem .5rem;font-size:.8125rem;font-weight:500;transition:background .15s,color .15s;display:inline-flex}.portal-tab:hover{color:var(--rkw-ink)}.portal-tab.is-active{background:color-mix(in srgb, var(--rkw-brand) 16%, var(--rkw-surface));color:var(--rkw-ink);box-shadow:none}.portal-tabs.qr-tabs{border-radius:9px;gap:0;width:auto;padding:0;overflow:hidden}.qr-tabs .portal-tab{border-radius:0;flex:none;padding:.4375rem .875rem;font-size:.75rem}.qr-tabs .portal-tab.is-active{box-shadow:none}.qr-frame{border:1px solid var(--rkw-line);background:var(--rkw-surface);border-radius:22px;place-items:center;width:100%;padding:0;display:grid;position:relative;overflow:hidden}.qr{aspect-ratio:1;place-items:center;width:100%;max-width:none;display:grid}.qr svg{width:100%;height:100%}.qr-fallback{border:1px dashed var(--rkw-line);background:var(--rkw-ground);border-radius:10px;padding:1rem}.qr-fallback code{word-break:break-all;text-align:center;color:var(--rkw-ink-muted);font-size:.6875rem;line-height:1.5}.qr .qr-spinner{width:2.5rem;height:2.5rem;color:var(--rkw-brand);animation:1.1s linear infinite connect-spin}.qr-badge{background:var(--rkw-surface);border-radius:12px;place-items:center;padding:.25rem;display:grid;position:absolute}.qr-caption{text-align:center;margin:0;font-size:.8125rem}.qr-copy{font-size:.8125rem}.install-row{border:1px solid var(--rkw-line);border-radius:var(--rkw-radius);background:var(--rkw-ground);justify-content:space-between;align-items:center;gap:.75rem;width:100%;padding:.625rem .75rem;font-size:.8125rem;display:flex}.install-row .secondary{text-decoration:none;display:inline-block}.network-select{position:relative}.network-trigger{border:1px solid var(--rkw-line);border-radius:var(--rkw-radius);background:var(--rkw-surface);width:100%;font:inherit;color:inherit;cursor:pointer;text-align:left;align-items:center;gap:.75rem;padding:.625rem .75rem;font-size:.875rem;display:flex}.network-trigger:hover:not(:disabled),.network-trigger[aria-expanded=true]{border-color:var(--rkw-brand)}.network-trigger:disabled{opacity:.6;cursor:not-allowed}.network-trigger-name{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.network-caret{border-right:1.5px solid var(--rkw-ink-muted);border-bottom:1.5px solid var(--rkw-ink-muted);flex:none;width:.45rem;height:.45rem;transform:translateY(-2px)rotate(45deg)}.network-trigger[aria-expanded=true] .network-caret{transform:translateY(2px)rotate(-135deg)}.network-panel{z-index:20;border:1px solid var(--rkw-line);border-radius:var(--rkw-radius);background:var(--rkw-surface);padding:.5rem;position:absolute;top:calc(100% + .375rem);left:0;right:0;box-shadow:0 12px 28px #1010141f}.network-search{font:inherit;border:1px solid var(--rkw-line);background:var(--rkw-surface);width:100%;color:inherit;appearance:none;border-radius:6px;margin-bottom:.5rem;padding:.5rem .75rem;font-size:.875rem}.network-search:focus,.network-search:focus-visible{border-color:var(--rkw-ink-muted);outline:none}.network-list{max-height:13rem;margin:0;padding:0;list-style:none;overflow-y:auto}.network-item{cursor:pointer;border-radius:7px;justify-content:space-between;align-items:center;gap:.75rem;padding:.5rem .625rem;font-size:.875rem;display:flex}.network-item-active{background:var(--rkw-ground)}.network-item-name{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.network-item[aria-selected=true] .network-item-name{color:var(--rkw-brand);font-weight:600}.network-mark{background:var(--rkw-ground);border-radius:50%;flex:none;place-items:center;width:1.25rem;height:1.25rem;font-size:.625rem;font-weight:700;display:grid;overflow:hidden}.network-mark img{object-fit:contain;width:100%;height:100%}.network-empty{padding:.5rem .625rem .25rem}.rkw-field{gap:.375rem;display:grid}.rkw-field-label{color:var(--rkw-ink-muted);font-size:.8125rem}", R, z, Se, Ce, B = 0, we = [], V = p, Te = V.__b, Ee = V.__r, De = V.diffed, Oe = V.__c, ke = V.unmount, Ae = V.__;
276
+ function H(e, t) {
277
+ V.__h && V.__h(z, e, B || t), B = 0;
278
+ var n = z.__H || (z.__H = {
279
279
  __: [],
280
280
  __h: []
281
281
  });
282
282
  return e >= n.__.length && n.__.push({}), n.__[e];
283
283
  }
284
- function H(e) {
285
- return z = 1, Ae(ze, e);
284
+ function U(e) {
285
+ return B = 1, je(Be, e);
286
286
  }
287
- function Ae(e, t, n) {
288
- var r = V(L++, 2);
289
- if (r.t = e, !r.__c && (r.__ = [n ? n(t) : ze(void 0, t), function(e) {
287
+ function je(e, t, n) {
288
+ var r = H(R++, 2);
289
+ if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Be(void 0, t), function(e) {
290
290
  var t = r.__N ? r.__N[0] : r.__[0], n = r.t(t, e);
291
291
  t !== n && (r.__N = [n, r.__[1]], r.__c.setState({}));
292
- }], r.__c = R, !R.__f)) {
292
+ }], r.__c = z, !z.__f)) {
293
293
  var i = function(e, t, n) {
294
294
  if (!r.__c.__H) return !0;
295
295
  var i = !1, o = r.__c.props !== e;
@@ -305,116 +305,125 @@ function Ae(e, t, n) {
305
305
  }
306
306
  return !i || o;
307
307
  };
308
- R.__f = !0;
309
- var a = R.shouldComponentUpdate, o = R.componentWillUpdate;
310
- R.componentWillUpdate = function(e, t, n) {
308
+ z.__f = !0;
309
+ var a = z.shouldComponentUpdate, o = z.componentWillUpdate;
310
+ z.componentWillUpdate = function(e, t, n) {
311
311
  if (this.__e) {
312
312
  var r = a;
313
313
  a = void 0, i(e, t, n), a = r;
314
314
  }
315
315
  o && o.call(this, e, t, n);
316
- }, R.shouldComponentUpdate = i;
316
+ }, z.shouldComponentUpdate = i;
317
317
  }
318
318
  return r.__N || r.__;
319
319
  }
320
- function U(e, t) {
321
- var n = V(L++, 3);
322
- !B.__s && Re(n.__H, t) && (n.__ = e, n.u = t, R.__H.__h.push(n));
320
+ function W(e, t) {
321
+ var n = H(R++, 3);
322
+ !V.__s && ze(n.__H, t) && (n.__ = e, n.u = t, z.__H.__h.push(n));
323
323
  }
324
- function je(e) {
325
- return z = 5, W(function() {
324
+ function G(e) {
325
+ return B = 5, K(function() {
326
326
  return { current: e };
327
327
  }, []);
328
328
  }
329
- function W(e, t) {
330
- var n = V(L++, 7);
331
- return Re(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
329
+ function K(e, t) {
330
+ var n = H(R++, 7);
331
+ return ze(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
332
332
  }
333
333
  function Me(e, t) {
334
- return z = 8, W(function() {
334
+ return B = 8, K(function() {
335
335
  return e;
336
336
  }, t);
337
337
  }
338
338
  function Ne(e) {
339
- var t = R.context[e.__c], n = V(L++, 9);
340
- return n.c = e, t ? (n.__ ?? (n.__ = !0, t.sub(R)), t.props.value) : e.__;
339
+ var t = z.context[e.__c], n = H(R++, 9);
340
+ return n.c = e, t ? (n.__ ?? (n.__ = !0, t.sub(z)), t.props.value) : e.__;
341
341
  }
342
342
  function Pe() {
343
- for (var e; e = Ce.shift();) {
343
+ var e = H(R++, 11);
344
+ if (!e.__) {
345
+ for (var t = z.__v; t !== null && !t.__m && t.__ !== null;) t = t.__;
346
+ var n = t.__m || (t.__m = [0, 0]);
347
+ e.__ = "P" + n[0] + "-" + n[1]++;
348
+ }
349
+ return e.__;
350
+ }
351
+ function Fe() {
352
+ for (var e; e = we.shift();) {
344
353
  var t = e.__H;
345
354
  if (e.__P && t) try {
346
- t.__h.some(G), t.__h.some(Le), t.__h = [];
355
+ t.__h.some(q), t.__h.some(Re), t.__h = [];
347
356
  } catch (n) {
348
- t.__h = [], B.__e(n, e.__v);
357
+ t.__h = [], V.__e(n, e.__v);
349
358
  }
350
359
  }
351
360
  }
352
- B.__b = function(e) {
353
- R = null, we && we(e);
354
- }, B.__ = function(e, t) {
355
- e && t.__k && t.__k.__m && (e.__m = t.__k.__m), ke && ke(e, t);
356
- }, B.__r = function(e) {
357
- Te && Te(e), L = 0;
358
- var t = (R = e.__c).__H;
359
- t && (xe === R ? (t.__h = [], R.__h = [], t.__.some(function(e) {
361
+ V.__b = function(e) {
362
+ z = null, Te && Te(e);
363
+ }, V.__ = function(e, t) {
364
+ e && t.__k && t.__k.__m && (e.__m = t.__k.__m), Ae && Ae(e, t);
365
+ }, V.__r = function(e) {
366
+ Ee && Ee(e), R = 0;
367
+ var t = (z = e.__c).__H;
368
+ t && (Se === z ? (t.__h = [], z.__h = [], t.__.some(function(e) {
360
369
  e.__N && (e.__ = e.__N), e.u = e.__N = void 0;
361
- })) : (t.__h.some(G), t.__h.some(Le), t.__h = [], L = 0)), xe = R;
362
- }, B.diffed = function(e) {
363
- Ee && Ee(e);
370
+ })) : (t.__h.some(q), t.__h.some(Re), t.__h = [], R = 0)), Se = z;
371
+ }, V.diffed = function(e) {
372
+ De && De(e);
364
373
  var t = e.__c;
365
- t && t.__H && (t.__H.__h.length && (Ce.push(t) !== 1 && Se === B.requestAnimationFrame || ((Se = B.requestAnimationFrame) || Ie)(Pe)), t.__H.__.some(function(e) {
374
+ t && t.__H && (t.__H.__h.length && (we.push(t) !== 1 && Ce === V.requestAnimationFrame || ((Ce = V.requestAnimationFrame) || Le)(Fe)), t.__H.__.some(function(e) {
366
375
  e.u &&= (e.__H = e.u, void 0);
367
- })), xe = R = null;
368
- }, B.__c = function(e, t) {
376
+ })), Se = z = null;
377
+ }, V.__c = function(e, t) {
369
378
  t.some(function(e) {
370
379
  try {
371
- e.__h.some(G), e.__h = e.__h.filter(function(e) {
372
- return !e.__ || Le(e);
380
+ e.__h.some(q), e.__h = e.__h.filter(function(e) {
381
+ return !e.__ || Re(e);
373
382
  });
374
383
  } catch (n) {
375
384
  t.some(function(e) {
376
385
  e.__h &&= [];
377
- }), t = [], B.__e(n, e.__v);
386
+ }), t = [], V.__e(n, e.__v);
378
387
  }
379
- }), De && De(e, t);
380
- }, B.unmount = function(e) {
381
- Oe && Oe(e);
388
+ }), Oe && Oe(e, t);
389
+ }, V.unmount = function(e) {
390
+ ke && ke(e);
382
391
  var t, n = e.__c;
383
392
  n && n.__H && (n.__H.__.some(function(e) {
384
393
  try {
385
- G(e);
394
+ q(e);
386
395
  } catch (e) {
387
396
  t = e;
388
397
  }
389
- }), n.__H = void 0, t && B.__e(t, n.__v));
398
+ }), n.__H = void 0, t && V.__e(t, n.__v));
390
399
  };
391
- var Fe = typeof requestAnimationFrame == "function";
392
- function Ie(e) {
400
+ var Ie = typeof requestAnimationFrame == "function";
401
+ function Le(e) {
393
402
  var t, n = function() {
394
- clearTimeout(r), Fe && cancelAnimationFrame(t), setTimeout(e);
403
+ clearTimeout(r), Ie && cancelAnimationFrame(t), setTimeout(e);
395
404
  }, r = setTimeout(n, 35);
396
- Fe && (t = requestAnimationFrame(n));
405
+ Ie && (t = requestAnimationFrame(n));
397
406
  }
398
- function G(e) {
399
- var t = R, n = e.__c;
400
- typeof n == "function" && (e.__c = void 0, n()), R = t;
407
+ function q(e) {
408
+ var t = z, n = e.__c;
409
+ typeof n == "function" && (e.__c = void 0, n()), z = t;
401
410
  }
402
- function Le(e) {
403
- var t = R;
404
- e.__c = e.__(), R = t;
411
+ function Re(e) {
412
+ var t = z;
413
+ e.__c = e.__(), z = t;
405
414
  }
406
- function Re(e, t) {
415
+ function ze(e, t) {
407
416
  return !e || e.length !== t.length || t.some(function(t, n) {
408
417
  return t !== e[n];
409
418
  });
410
419
  }
411
- function ze(e, t) {
420
+ function Be(e, t) {
412
421
  return typeof t == "function" ? t(e) : t;
413
422
  }
414
423
  // node_modules/.pnpm/preact@10.29.8/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
415
- var Be = 0;
424
+ var Ve = 0;
416
425
  Array.isArray;
417
- function K(e, t, n, r, i, a) {
426
+ function J(e, t, n, r, i, a) {
418
427
  t ||= {};
419
428
  var o, s, c = t;
420
429
  if ("ref" in c) for (s in c = {}, t) s == "ref" ? o = t[s] : c[s] = t[s];
@@ -429,39 +438,42 @@ function K(e, t, n, r, i, a) {
429
438
  __e: null,
430
439
  __c: null,
431
440
  constructor: void 0,
432
- __v: --Be,
441
+ __v: --Ve,
433
442
  __i: -1,
434
443
  __u: 0,
435
444
  __source: i,
436
445
  __self: a
437
446
  };
438
447
  if (typeof e == "function" && (o = e.defaultProps)) for (s in o) c[s] === void 0 && (c[s] = o[s]);
439
- return d.vnode && d.vnode(l), l;
448
+ return p.vnode && p.vnode(l), l;
440
449
  }
441
450
  // src/element/ui/assets.tsx
442
- var Ve = ye(e);
443
- function He({ base: e, children: t }) {
444
- return /* @__PURE__ */ K(Ve.Provider, {
451
+ var He = be(e);
452
+ function Ue({ base: e, children: t }) {
453
+ return /* @__PURE__ */ J(He.Provider, {
445
454
  value: e,
446
455
  children: t
447
456
  });
448
457
  }
449
- function Ue() {
450
- let e = Ne(Ve);
451
- return W(() => (t) => o(t, e), [e]);
458
+ function We() {
459
+ return Ne(He);
460
+ }
461
+ function Ge() {
462
+ let e = Ne(He);
463
+ return K(() => (t) => c(t, e), [e]);
452
464
  }
453
465
  // src/element/ui/use-handheld.ts
454
- function We() {
455
- let [e, t] = H(!1);
456
- return U(() => r(t), []), e;
466
+ function Ke() {
467
+ let [e, t] = U(!1);
468
+ return W(() => a(t), []), e;
457
469
  }
458
470
  // src/element/ui/wallet-mark.tsx
459
- function q({ id: e, name: t, icon: n, size: r = "sm" }) {
460
- let i = Ue(), a = n ?? i(e), o = r === "lg" ? 32 : 20;
461
- return /* @__PURE__ */ K("span", {
471
+ function Y({ id: e, name: t, icon: n, size: r = "sm" }) {
472
+ let i = Ge(), a = n ?? i(e), o = r === "lg" ? 32 : 20;
473
+ return /* @__PURE__ */ J("span", {
462
474
  class: r === "lg" ? "wallet-mark wallet-mark-lg" : "wallet-mark",
463
475
  "aria-hidden": "true",
464
- children: a ? /* @__PURE__ */ K("img", {
476
+ children: a ? /* @__PURE__ */ J("img", {
465
477
  src: a,
466
478
  alt: "",
467
479
  width: o,
@@ -472,12 +484,12 @@ function q({ id: e, name: t, icon: n, size: r = "sm" }) {
472
484
  });
473
485
  }
474
486
  // node_modules/.pnpm/uqr@0.1.3/node_modules/uqr/dist/index.mjs
475
- var J = /* @__PURE__ */ ((e) => (e[e.Border = -1] = "Border", e[e.Data = 0] = "Data", e[e.Function = 1] = "Function", e[e.Position = 2] = "Position", e[e.Timing = 3] = "Timing", e[e.Alignment = 4] = "Alignment", e))(J || {}), Ge = [0, 1], Ke = [1, 0], qe = [2, 3], Je = [3, 2], Ye = {
476
- L: Ge,
477
- M: Ke,
478
- Q: qe,
479
- H: Je
480
- }, Xe = /^\d*$/, Ze = /^[A-Z0-9 $%*+./:-]*$/, Qe = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:", $e = 1, et = 40, tt = 3, nt = 3, Y = 40, rt = 10, it = [
487
+ var X = /* @__PURE__ */ ((e) => (e[e.Border = -1] = "Border", e[e.Data = 0] = "Data", e[e.Function = 1] = "Function", e[e.Position = 2] = "Position", e[e.Timing = 3] = "Timing", e[e.Alignment = 4] = "Alignment", e))(X || {}), qe = [0, 1], Je = [1, 0], Ye = [2, 3], Xe = [3, 2], Ze = {
488
+ L: qe,
489
+ M: Je,
490
+ Q: Ye,
491
+ H: Xe
492
+ }, Qe = /^\d*$/, $e = /^[A-Z0-9 $%*+./:-]*$/, et = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:", tt = 1, nt = 40, rt = 3, it = 3, Z = 40, at = 10, ot = [
481
493
  [
482
494
  -1,
483
495
  7,
@@ -650,7 +662,7 @@ var J = /* @__PURE__ */ ((e) => (e[e.Border = -1] = "Border", e[e.Data = 0] = "D
650
662
  30,
651
663
  30
652
664
  ]
653
- ], at = [
665
+ ], st = [
654
666
  [
655
667
  -1,
656
668
  1,
@@ -823,9 +835,9 @@ var J = /* @__PURE__ */ ((e) => (e[e.Border = -1] = "Border", e[e.Data = 0] = "D
823
835
  77,
824
836
  81
825
837
  ]
826
- ], ot = class {
838
+ ], ct = class {
827
839
  constructor(e, t, n, r) {
828
- if (this.version = e, this.ecc = t, e < $e || e > et) throw RangeError("Version value out of range");
840
+ if (this.version = e, this.ecc = t, e < tt || e > nt) throw RangeError("Version value out of range");
829
841
  if (r < -1 || r > 7) throw RangeError("Mask value out of range");
830
842
  this.size = e * 4 + 17;
831
843
  let i = Array.from({ length: this.size }).fill(!1);
@@ -850,7 +862,7 @@ var J = /* @__PURE__ */ ((e) => (e[e.Border = -1] = "Border", e[e.Data = 0] = "D
850
862
  return e >= 0 && e < this.size && t >= 0 && t < this.size && this.modules[t][e];
851
863
  }
852
864
  drawFunctionPatterns() {
853
- for (let e = 0; e < this.size; e++) this.setFunctionModule(6, e, e % 2 == 0, J.Timing), this.setFunctionModule(e, 6, e % 2 == 0, J.Timing);
865
+ for (let e = 0; e < this.size; e++) this.setFunctionModule(6, e, e % 2 == 0, X.Timing), this.setFunctionModule(e, 6, e % 2 == 0, X.Timing);
854
866
  this.drawFinderPattern(3, 3), this.drawFinderPattern(this.size - 4, 3), this.drawFinderPattern(3, this.size - 4);
855
867
  let e = this.getAlignmentPatternPositions(), t = e.length;
856
868
  for (let n = 0; n < t; n++) for (let r = 0; r < t; r++) n === 0 && r === 0 || n === 0 && r === t - 1 || n === t - 1 && r === 0 || this.drawAlignmentPattern(e[n], e[r]);
@@ -860,11 +872,11 @@ var J = /* @__PURE__ */ ((e) => (e[e.Border = -1] = "Border", e[e.Data = 0] = "D
860
872
  let t = this.ecc[1] << 3 | e, n = t;
861
873
  for (let e = 0; e < 10; e++) n = n << 1 ^ (n >>> 9) * 1335;
862
874
  let r = (t << 10 | n) ^ 21522;
863
- for (let e = 0; e <= 5; e++) this.setFunctionModule(8, e, Z(r, e));
864
- this.setFunctionModule(8, 7, Z(r, 6)), this.setFunctionModule(8, 8, Z(r, 7)), this.setFunctionModule(7, 8, Z(r, 8));
865
- for (let e = 9; e < 15; e++) this.setFunctionModule(14 - e, 8, Z(r, e));
866
- for (let e = 0; e < 8; e++) this.setFunctionModule(this.size - 1 - e, 8, Z(r, e));
867
- for (let e = 8; e < 15; e++) this.setFunctionModule(8, this.size - 15 + e, Z(r, e));
875
+ for (let e = 0; e <= 5; e++) this.setFunctionModule(8, e, $(r, e));
876
+ this.setFunctionModule(8, 7, $(r, 6)), this.setFunctionModule(8, 8, $(r, 7)), this.setFunctionModule(7, 8, $(r, 8));
877
+ for (let e = 9; e < 15; e++) this.setFunctionModule(14 - e, 8, $(r, e));
878
+ for (let e = 0; e < 8; e++) this.setFunctionModule(this.size - 1 - e, 8, $(r, e));
879
+ for (let e = 8; e < 15; e++) this.setFunctionModule(8, this.size - 15 + e, $(r, e));
868
880
  this.setFunctionModule(8, this.size - 8, !0);
869
881
  }
870
882
  drawVersion() {
@@ -873,30 +885,30 @@ var J = /* @__PURE__ */ ((e) => (e[e.Border = -1] = "Border", e[e.Data = 0] = "D
873
885
  for (let t = 0; t < 12; t++) e = e << 1 ^ (e >>> 11) * 7973;
874
886
  let t = this.version << 12 | e;
875
887
  for (let e = 0; e < 18; e++) {
876
- let n = Z(t, e), r = this.size - 11 + e % 3, i = Math.floor(e / 3);
888
+ let n = $(t, e), r = this.size - 11 + e % 3, i = Math.floor(e / 3);
877
889
  this.setFunctionModule(r, i, n), this.setFunctionModule(i, r, n);
878
890
  }
879
891
  }
880
892
  drawFinderPattern(e, t) {
881
893
  for (let n = -4; n <= 4; n++) for (let r = -4; r <= 4; r++) {
882
894
  let i = Math.max(Math.abs(r), Math.abs(n)), a = e + r, o = t + n;
883
- a >= 0 && a < this.size && o >= 0 && o < this.size && this.setFunctionModule(a, o, i !== 2 && i !== 4, J.Position);
895
+ a >= 0 && a < this.size && o >= 0 && o < this.size && this.setFunctionModule(a, o, i !== 2 && i !== 4, X.Position);
884
896
  }
885
897
  }
886
898
  drawAlignmentPattern(e, t) {
887
- for (let n = -2; n <= 2; n++) for (let r = -2; r <= 2; r++) this.setFunctionModule(e + r, t + n, Math.max(Math.abs(r), Math.abs(n)) !== 1, J.Alignment);
899
+ for (let n = -2; n <= 2; n++) for (let r = -2; r <= 2; r++) this.setFunctionModule(e + r, t + n, Math.max(Math.abs(r), Math.abs(n)) !== 1, X.Alignment);
888
900
  }
889
- setFunctionModule(e, t, n, r = J.Function) {
901
+ setFunctionModule(e, t, n, r = X.Function) {
890
902
  this.modules[t][e] = n, this.types[t][e] = r;
891
903
  }
892
904
  addEccAndInterleave(e) {
893
905
  let t = this.version, n = this.ecc;
894
- if (e.length !== Q(t, n)) throw RangeError("Invalid argument");
895
- let r = at[n[0]][t], i = it[n[0]][t], a = Math.floor(bt(t) / 8), o = r - a % r, s = Math.floor(a / r), c = [], l = xt(i);
906
+ if (e.length !== Ct(t, n)) throw RangeError("Invalid argument");
907
+ let r = st[n[0]][t], i = ot[n[0]][t], a = Math.floor(St(t) / 8), o = r - a % r, s = Math.floor(a / r), c = [], l = wt(i);
896
908
  for (let t = 0, n = 0; t < r; t++) {
897
909
  let r = e.slice(n, n + s - i + (t < o ? 0 : 1));
898
910
  n += r.length;
899
- let a = St(r, l);
911
+ let a = Tt(r, l);
900
912
  t < o && r.push(0), c.push(r.concat(a));
901
913
  }
902
914
  let u = [];
@@ -906,13 +918,13 @@ var J = /* @__PURE__ */ ((e) => (e[e.Border = -1] = "Border", e[e.Data = 0] = "D
906
918
  return u;
907
919
  }
908
920
  drawCodewords(e) {
909
- if (e.length !== Math.floor(bt(this.version) / 8)) throw RangeError("Invalid argument");
921
+ if (e.length !== Math.floor(St(this.version) / 8)) throw RangeError("Invalid argument");
910
922
  let t = 0;
911
923
  for (let n = this.size - 1; n >= 1; n -= 2) {
912
924
  n === 6 && (n = 5);
913
925
  for (let r = 0; r < this.size; r++) for (let i = 0; i < 2; i++) {
914
926
  let a = n - i, o = n + 1 & 2 ? r : this.size - 1 - r;
915
- !this.types[o][a] && t < e.length * 8 && (this.modules[o][a] = Z(e[t >>> 3], 7 - (t & 7)), t++);
927
+ !this.types[o][a] && t < e.length * 8 && (this.modules[o][a] = $(e[t >>> 3], 7 - (t & 7)), t++);
916
928
  }
917
929
  }
918
930
  }
@@ -962,8 +974,8 @@ var J = /* @__PURE__ */ ((e) => (e[e.Border = -1] = "Border", e[e.Data = 0] = "D
962
974
  0,
963
975
  0
964
976
  ];
965
- for (let a = 0; a < this.size; a++) this.modules[t][a] === n ? (r++, r === 5 ? e += tt : r > 5 && e++) : (this.finderPenaltyAddHistory(r, i), n || (e += this.finderPenaltyCountPatterns(i) * Y), n = this.modules[t][a], r = 1);
966
- e += this.finderPenaltyTerminateAndCount(n, r, i) * Y;
977
+ for (let a = 0; a < this.size; a++) this.modules[t][a] === n ? (r++, r === 5 ? e += rt : r > 5 && e++) : (this.finderPenaltyAddHistory(r, i), n || (e += this.finderPenaltyCountPatterns(i) * Z), n = this.modules[t][a], r = 1);
978
+ e += this.finderPenaltyTerminateAndCount(n, r, i) * Z;
967
979
  }
968
980
  for (let t = 0; t < this.size; t++) {
969
981
  let n = !1, r = 0, i = [
@@ -975,17 +987,17 @@ var J = /* @__PURE__ */ ((e) => (e[e.Border = -1] = "Border", e[e.Data = 0] = "D
975
987
  0,
976
988
  0
977
989
  ];
978
- for (let a = 0; a < this.size; a++) this.modules[a][t] === n ? (r++, r === 5 ? e += tt : r > 5 && e++) : (this.finderPenaltyAddHistory(r, i), n || (e += this.finderPenaltyCountPatterns(i) * Y), n = this.modules[a][t], r = 1);
979
- e += this.finderPenaltyTerminateAndCount(n, r, i) * Y;
990
+ for (let a = 0; a < this.size; a++) this.modules[a][t] === n ? (r++, r === 5 ? e += rt : r > 5 && e++) : (this.finderPenaltyAddHistory(r, i), n || (e += this.finderPenaltyCountPatterns(i) * Z), n = this.modules[a][t], r = 1);
991
+ e += this.finderPenaltyTerminateAndCount(n, r, i) * Z;
980
992
  }
981
993
  for (let t = 0; t < this.size - 1; t++) for (let n = 0; n < this.size - 1; n++) {
982
994
  let r = this.modules[t][n];
983
- r === this.modules[t][n + 1] && r === this.modules[t + 1][n] && r === this.modules[t + 1][n + 1] && (e += nt);
995
+ r === this.modules[t][n + 1] && r === this.modules[t + 1][n] && r === this.modules[t + 1][n + 1] && (e += it);
984
996
  }
985
997
  let t = 0;
986
998
  for (let e of this.modules) t = e.reduce((e, t) => e + +!!t, t);
987
999
  let n = this.size * this.size, r = Math.ceil(Math.abs(t * 20 - n * 10) / n) - 1;
988
- return e += r * rt, e;
1000
+ return e += r * at, e;
989
1001
  }
990
1002
  getAlignmentPatternPositions() {
991
1003
  if (this.version === 1) return [];
@@ -1006,14 +1018,14 @@ var J = /* @__PURE__ */ ((e) => (e[e.Border = -1] = "Border", e[e.Data = 0] = "D
1006
1018
  t[0] === 0 && (e += this.size), t.pop(), t.unshift(e);
1007
1019
  }
1008
1020
  };
1009
- function X(e, t, n) {
1021
+ function Q(e, t, n) {
1010
1022
  if (t < 0 || t > 31 || e >>> t) throw RangeError("Value out of range");
1011
1023
  for (let r = t - 1; r >= 0; r--) n.push(e >>> r & 1);
1012
1024
  }
1013
- function Z(e, t) {
1025
+ function $(e, t) {
1014
1026
  return !!(e >>> t & 1);
1015
1027
  }
1016
- var st = class {
1028
+ var lt = class {
1017
1029
  constructor(e, t, n) {
1018
1030
  if (this.mode = e, this.numChars = t, this.bitData = n, t < 0) throw RangeError("Invalid argument");
1019
1031
  this.bitData = n.slice();
@@ -1021,74 +1033,74 @@ var st = class {
1021
1033
  getData() {
1022
1034
  return this.bitData.slice();
1023
1035
  }
1024
- }, ct = [
1036
+ }, ut = [
1025
1037
  1,
1026
1038
  10,
1027
1039
  12,
1028
1040
  14
1029
- ], lt = [
1041
+ ], dt = [
1030
1042
  2,
1031
1043
  9,
1032
1044
  11,
1033
1045
  13
1034
- ], ut = [
1046
+ ], ft = [
1035
1047
  4,
1036
1048
  8,
1037
1049
  16,
1038
1050
  16
1039
1051
  ];
1040
- function dt(e, t) {
1052
+ function pt(e, t) {
1041
1053
  return e[Math.floor((t + 7) / 17) + 1];
1042
1054
  }
1043
- function ft(e) {
1055
+ function mt(e) {
1044
1056
  let t = [];
1045
- for (let n of e) X(n, 8, t);
1046
- return new st(ut, e.length, t);
1057
+ for (let n of e) Q(n, 8, t);
1058
+ return new lt(ft, e.length, t);
1047
1059
  }
1048
- function pt(e) {
1049
- if (!gt(e)) throw RangeError("String contains non-numeric characters");
1060
+ function ht(e) {
1061
+ if (!vt(e)) throw RangeError("String contains non-numeric characters");
1050
1062
  let t = [];
1051
1063
  for (let n = 0; n < e.length;) {
1052
1064
  let r = Math.min(e.length - n, 3);
1053
- X(Number.parseInt(e.substring(n, n + r), 10), r * 3 + 1, t), n += r;
1065
+ Q(Number.parseInt(e.substring(n, n + r), 10), r * 3 + 1, t), n += r;
1054
1066
  }
1055
- return new st(ct, e.length, t);
1067
+ return new lt(ut, e.length, t);
1056
1068
  }
1057
- function mt(e) {
1058
- if (!_t(e)) throw RangeError("String contains unencodable characters in alphanumeric mode");
1069
+ function gt(e) {
1070
+ if (!yt(e)) throw RangeError("String contains unencodable characters in alphanumeric mode");
1059
1071
  let t = [], n = 0;
1060
1072
  for (; n + 2 <= e.length; n += 2) {
1061
- let r = Qe.indexOf(e.charAt(n)) * 45;
1062
- r += Qe.indexOf(e.charAt(n + 1)), X(r, 11, t);
1073
+ let r = et.indexOf(e.charAt(n)) * 45;
1074
+ r += et.indexOf(e.charAt(n + 1)), Q(r, 11, t);
1063
1075
  }
1064
- return n < e.length && X(Qe.indexOf(e.charAt(n)), 6, t), new st(lt, e.length, t);
1076
+ return n < e.length && Q(et.indexOf(e.charAt(n)), 6, t), new lt(dt, e.length, t);
1065
1077
  }
1066
- function ht(e) {
1067
- return e === "" ? [] : gt(e) ? [pt(e)] : _t(e) ? [mt(e)] : [ft(yt(e))];
1078
+ function _t(e) {
1079
+ return e === "" ? [] : vt(e) ? [ht(e)] : yt(e) ? [gt(e)] : [mt(xt(e))];
1068
1080
  }
1069
- function gt(e) {
1070
- return Xe.test(e);
1081
+ function vt(e) {
1082
+ return Qe.test(e);
1071
1083
  }
1072
- function _t(e) {
1073
- return Ze.test(e);
1084
+ function yt(e) {
1085
+ return $e.test(e);
1074
1086
  }
1075
- function vt(e, t) {
1087
+ function bt(e, t) {
1076
1088
  let n = 0;
1077
1089
  for (let r of e) {
1078
- let e = dt(r.mode, t);
1090
+ let e = pt(r.mode, t);
1079
1091
  if (r.numChars >= 1 << e) return Infinity;
1080
1092
  n += 4 + e + r.bitData.length;
1081
1093
  }
1082
1094
  return n;
1083
1095
  }
1084
- function yt(e) {
1096
+ function xt(e) {
1085
1097
  e = encodeURI(e);
1086
1098
  let t = [];
1087
1099
  for (let n = 0; n < e.length; n++) e.charAt(n) === "%" ? (t.push(Number.parseInt(e.substring(n + 1, n + 3), 16)), n += 2) : t.push(e.charCodeAt(n));
1088
1100
  return t;
1089
1101
  }
1090
- function bt(e) {
1091
- if (e < $e || e > et) throw RangeError("Version number out of range");
1102
+ function St(e) {
1103
+ if (e < tt || e > nt) throw RangeError("Version number out of range");
1092
1104
  let t = (16 * e + 128) * e + 64;
1093
1105
  if (e >= 2) {
1094
1106
  let n = Math.floor(e / 7) + 2;
@@ -1096,40 +1108,40 @@ function bt(e) {
1096
1108
  }
1097
1109
  return t;
1098
1110
  }
1099
- function Q(e, t) {
1100
- return Math.floor(bt(e) / 8) - it[t[0]][e] * at[t[0]][e];
1111
+ function Ct(e, t) {
1112
+ return Math.floor(St(e) / 8) - ot[t[0]][e] * st[t[0]][e];
1101
1113
  }
1102
- function xt(e) {
1114
+ function wt(e) {
1103
1115
  if (e < 1 || e > 255) throw RangeError("Degree out of range");
1104
1116
  let t = [];
1105
1117
  for (let n = 0; n < e - 1; n++) t.push(0);
1106
1118
  t.push(1);
1107
1119
  let n = 1;
1108
1120
  for (let r = 0; r < e; r++) {
1109
- for (let e = 0; e < t.length; e++) t[e] = Ct(t[e], n), e + 1 < t.length && (t[e] ^= t[e + 1]);
1110
- n = Ct(n, 2);
1121
+ for (let e = 0; e < t.length; e++) t[e] = Et(t[e], n), e + 1 < t.length && (t[e] ^= t[e + 1]);
1122
+ n = Et(n, 2);
1111
1123
  }
1112
1124
  return t;
1113
1125
  }
1114
- function St(e, t) {
1126
+ function Tt(e, t) {
1115
1127
  let n = t.map((e) => 0);
1116
1128
  for (let r of e) {
1117
1129
  let e = r ^ n.shift();
1118
- n.push(0), t.forEach((t, r) => n[r] ^= Ct(t, e));
1130
+ n.push(0), t.forEach((t, r) => n[r] ^= Et(t, e));
1119
1131
  }
1120
1132
  return n;
1121
1133
  }
1122
- function Ct(e, t) {
1134
+ function Et(e, t) {
1123
1135
  if (e >>> 8 || t >>> 8) throw RangeError("Byte out of range");
1124
1136
  let n = 0;
1125
1137
  for (let r = 7; r >= 0; r--) n = n << 1 ^ (n >>> 7) * 285, n ^= (t >>> r & 1) * e;
1126
1138
  return n;
1127
1139
  }
1128
- function wt(e, t, n = 1, r = 40, i = -1, a = !0) {
1129
- if (!($e <= n && n <= r && r <= et) || i < -1 || i > 7) throw RangeError("Invalid value");
1140
+ function Dt(e, t, n = 1, r = 40, i = -1, a = !0) {
1141
+ if (!(tt <= n && n <= r && r <= nt) || i < -1 || i > 7) throw RangeError("Invalid value");
1130
1142
  let o, s;
1131
1143
  for (o = n;; o++) {
1132
- let n = Q(o, t) * 8, i = vt(e, o);
1144
+ let n = Ct(o, t) * 8, i = bt(e, o);
1133
1145
  if (i <= n) {
1134
1146
  s = i;
1135
1147
  break;
@@ -1137,25 +1149,25 @@ function wt(e, t, n = 1, r = 40, i = -1, a = !0) {
1137
1149
  if (o >= r) throw RangeError("Data too long");
1138
1150
  }
1139
1151
  for (let e of [
1140
- Ke,
1141
- qe,
1142
- Je
1143
- ]) a && s <= Q(o, e) * 8 && (t = e);
1152
+ Je,
1153
+ Ye,
1154
+ Xe
1155
+ ]) a && s <= Ct(o, e) * 8 && (t = e);
1144
1156
  let c = [];
1145
1157
  for (let t of e) {
1146
- X(t.mode[0], 4, c), X(t.numChars, dt(t.mode, o), c);
1158
+ Q(t.mode[0], 4, c), Q(t.numChars, pt(t.mode, o), c);
1147
1159
  for (let e of t.getData()) c.push(e);
1148
1160
  }
1149
- let l = Q(o, t) * 8;
1150
- X(0, Math.min(4, l - c.length), c), X(0, (8 - c.length % 8) % 8, c);
1151
- for (let e = 236; c.length < l; e ^= 253) X(e, 8, c);
1161
+ let l = Ct(o, t) * 8;
1162
+ Q(0, Math.min(4, l - c.length), c), Q(0, (8 - c.length % 8) % 8, c);
1163
+ for (let e = 236; c.length < l; e ^= 253) Q(e, 8, c);
1152
1164
  let u = Array.from({ length: Math.ceil(c.length / 8) }, () => 0);
1153
- return c.forEach((e, t) => u[t >>> 3] |= e << 7 - (t & 7)), new ot(o, t, u, i);
1165
+ return c.forEach((e, t) => u[t >>> 3] |= e << 7 - (t & 7)), new ct(o, t, u, i);
1154
1166
  }
1155
- function Tt(e, t) {
1156
- let { ecc: n = "L", boostEcc: r = !1, minVersion: i = 1, maxVersion: a = 40, maskPattern: o = -1, border: s = 1 } = t || {}, c = typeof e == "string" ? ht(e) : Array.isArray(e) ? [ft(e)] : void 0;
1167
+ function Ot(e, t) {
1168
+ let { ecc: n = "L", boostEcc: r = !1, minVersion: i = 1, maxVersion: a = 40, maskPattern: o = -1, border: s = 1 } = t || {}, c = typeof e == "string" ? _t(e) : Array.isArray(e) ? [mt(e)] : void 0;
1157
1169
  if (!c) throw Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);
1158
- let l = wt(c, Ye[n], i, a, o, r), u = Et({
1170
+ let l = Dt(c, Ze[n], i, a, o, r), u = kt({
1159
1171
  version: l.version,
1160
1172
  maskPattern: l.mask,
1161
1173
  size: l.size,
@@ -1164,35 +1176,35 @@ function Tt(e, t) {
1164
1176
  }, s);
1165
1177
  return t?.invert && (u.data = u.data.map((e) => e.map((e) => !e))), t?.onEncoded?.(u), u;
1166
1178
  }
1167
- function Et(e, t = 1) {
1179
+ function kt(e, t = 1) {
1168
1180
  if (!t) return e;
1169
1181
  let { size: n } = e, r = n + t * 2;
1170
1182
  e.size = r, e.data.forEach((e) => {
1171
1183
  for (let n = 0; n < t; n++) e.unshift(!1), e.push(!1);
1172
1184
  });
1173
1185
  for (let n = 0; n < t; n++) e.data.unshift(Array.from({ length: r }, (e) => !1)), e.data.push(Array.from({ length: r }, (e) => !1));
1174
- let i = J.Border;
1186
+ let i = X.Border;
1175
1187
  e.types.forEach((e) => {
1176
1188
  for (let n = 0; n < t; n++) e.unshift(i), e.push(i);
1177
1189
  });
1178
1190
  for (let n = 0; n < t; n++) e.types.unshift(Array.from({ length: r }, (e) => i)), e.types.push(Array.from({ length: r }, (e) => i));
1179
1191
  return e;
1180
1192
  }
1181
- function Dt(e) {
1193
+ function At(e) {
1182
1194
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1183
1195
  }
1184
- function Ot(e, t = {}) {
1185
- let n = Tt(e, t), { pixelSize: r = 10, whiteColor: i = "white", blackColor: a = "black" } = t, o = n.size * r, s = n.size * r, c = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${s} ${o}">`, l = [];
1196
+ function jt(e, t = {}) {
1197
+ let n = Ot(e, t), { pixelSize: r = 10, whiteColor: i = "white", blackColor: a = "black" } = t, o = n.size * r, s = n.size * r, c = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${s} ${o}">`, l = [];
1186
1198
  for (let e = 0; e < n.size; e++) for (let t = 0; t < n.size; t++) {
1187
1199
  let i = t * r, a = e * r;
1188
1200
  n.data[e][t] && l.push(`M${i},${a}h${r}v${r}h-${r}z`);
1189
1201
  }
1190
- return c += `<rect fill="${Dt(i)}" width="${s}" height="${o}"/>`, c += `<path fill="${Dt(a)}" d="${l.join("")}"/>`, c += "</svg>", c;
1202
+ return c += `<rect fill="${At(i)}" width="${s}" height="${o}"/>`, c += `<path fill="${At(a)}" d="${l.join("")}"/>`, c += "</svg>", c;
1191
1203
  }
1192
1204
  // src/element/ui/qr.ts
1193
- function kt(e) {
1205
+ function Mt(e) {
1194
1206
  if (e) try {
1195
- return Ot(e, {
1207
+ return jt(e, {
1196
1208
  border: 2,
1197
1209
  ecc: "H"
1198
1210
  });
@@ -1201,18 +1213,18 @@ function kt(e) {
1201
1213
  }
1202
1214
  }
1203
1215
  // src/element/ui/wallet-connect-panel.tsx
1204
- function At({ id: e, name: t, icon: n, detected: r, installUrl: i, connecting: o, error: c, onRemote: l, onConnect: u }) {
1205
- let [d, f] = H(!1), p = We(), [m, h] = H(""), [g, _] = H(0);
1206
- U(() => {
1207
- if (!l) return;
1216
+ function Nt({ id: e, name: t, icon: n, detected: r, installUrl: i, connecting: a, error: o, onRemote: c, onConnect: u }) {
1217
+ let [d, f] = U(!1), p = Ke(), [m, h] = U(""), [g, _] = U(0);
1218
+ W(() => {
1219
+ if (!c) return;
1208
1220
  let e = !0;
1209
- return h(""), l((t) => {
1221
+ return h(""), c((t) => {
1210
1222
  e && h(t);
1211
1223
  }), () => {
1212
1224
  e = !1;
1213
1225
  };
1214
1226
  }, [e, g]);
1215
- let v = window.location.href, y = a(e, v), [b, x] = H(y || l ? "wallet" : "camera"), S = p ? "" : kt(b === "wallet" && y ? y : v), C = p || !m ? "" : kt(m), w = m ? s(e, m) : void 0;
1227
+ let v = window.location.href, y = s(e, v), [b, x] = U(y || c ? "wallet" : "camera"), S = p ? "" : Mt(b === "wallet" && y ? y : v), C = p || !m ? "" : Mt(m), w = m ? l(e, m) : void 0;
1216
1228
  async function T() {
1217
1229
  try {
1218
1230
  await navigator.clipboard.writeText(m), f(!0), window.setTimeout(() => f(!1), 1600);
@@ -1227,21 +1239,21 @@ function At({ id: e, name: t, icon: n, detected: r, installUrl: i, connecting: o
1227
1239
  window.prompt("Copy this payment link", v);
1228
1240
  }
1229
1241
  }
1230
- return r ? /* @__PURE__ */ K("div", {
1242
+ return r ? /* @__PURE__ */ J("div", {
1231
1243
  class: "connect-panel connect-status",
1232
1244
  children: [
1233
- /* @__PURE__ */ K("span", {
1245
+ /* @__PURE__ */ J("span", {
1234
1246
  class: "connect-status-mark",
1235
- children: [/* @__PURE__ */ K(q, {
1247
+ children: [/* @__PURE__ */ J(Y, {
1236
1248
  id: e,
1237
1249
  name: t,
1238
1250
  icon: n,
1239
1251
  size: "lg"
1240
- }), o ? /* @__PURE__ */ K("svg", {
1252
+ }), a ? /* @__PURE__ */ J("svg", {
1241
1253
  class: "connect-spinner",
1242
1254
  viewBox: "0 0 100 100",
1243
1255
  "aria-hidden": "true",
1244
- children: /* @__PURE__ */ K("circle", {
1256
+ children: /* @__PURE__ */ J("circle", {
1245
1257
  cx: "50",
1246
1258
  cy: "50",
1247
1259
  r: "46",
@@ -1253,19 +1265,19 @@ function At({ id: e, name: t, icon: n, detected: r, installUrl: i, connecting: o
1253
1265
  })
1254
1266
  }) : null]
1255
1267
  }),
1256
- /* @__PURE__ */ K("p", {
1257
- class: `connect-status-title${c ? " is-error" : ""}`,
1258
- children: c ? "Connection declined" : `Continue in ${t}`
1268
+ /* @__PURE__ */ J("p", {
1269
+ class: `connect-status-title${o ? " is-error" : ""}`,
1270
+ children: o ? "Connection declined" : `Continue in ${t}`
1259
1271
  }),
1260
- /* @__PURE__ */ K("p", {
1272
+ /* @__PURE__ */ J("p", {
1261
1273
  class: "connect-status-note",
1262
- children: c || `Accept the connection request in ${t}.`
1274
+ children: o || `Accept the connection request in ${t}.`
1263
1275
  }),
1264
- /* @__PURE__ */ K("button", {
1276
+ /* @__PURE__ */ J("button", {
1265
1277
  type: "button",
1266
1278
  class: "secondary connect-retry",
1267
1279
  onClick: () => u(r),
1268
- children: [/* @__PURE__ */ K("svg", {
1280
+ children: [/* @__PURE__ */ J("svg", {
1269
1281
  class: "connect-retry-icon",
1270
1282
  viewBox: "0 0 24 24",
1271
1283
  fill: "none",
@@ -1274,41 +1286,41 @@ function At({ id: e, name: t, icon: n, detected: r, installUrl: i, connecting: o
1274
1286
  "stroke-linecap": "round",
1275
1287
  "stroke-linejoin": "round",
1276
1288
  "aria-hidden": "true",
1277
- children: [/* @__PURE__ */ K("path", { d: "M21 12a9 9 0 1 1-2.64-6.36" }), /* @__PURE__ */ K("path", { d: "M21 3v6h-6" })]
1289
+ children: [/* @__PURE__ */ J("path", { d: "M21 12a9 9 0 1 1-2.64-6.36" }), /* @__PURE__ */ J("path", { d: "M21 3v6h-6" })]
1278
1290
  }), "Try again"]
1279
1291
  })
1280
1292
  ]
1281
- }) : l ? /* @__PURE__ */ K("div", {
1293
+ }) : c ? /* @__PURE__ */ J("div", {
1282
1294
  class: `connect-panel${p ? " connect-handoff" : ""}`,
1283
- children: [p ? /* @__PURE__ */ K(M, { children: [c ? /* @__PURE__ */ K("button", {
1295
+ children: [p ? /* @__PURE__ */ J(M, { children: [o ? /* @__PURE__ */ J("button", {
1284
1296
  type: "button",
1285
1297
  class: "secondary connect-retry",
1286
1298
  onClick: () => _((e) => e + 1),
1287
1299
  children: "Try again"
1288
- }) : w ? /* @__PURE__ */ K("a", {
1300
+ }) : w ? /* @__PURE__ */ J("a", {
1289
1301
  class: "primary connect-open",
1290
1302
  href: w,
1291
1303
  children: ["Open in ", t]
1292
- }) : m ? /* @__PURE__ */ K("button", {
1304
+ }) : m ? /* @__PURE__ */ J("button", {
1293
1305
  type: "button",
1294
1306
  class: "secondary connect-copy",
1295
1307
  onClick: T,
1296
1308
  children: d ? "Copied" : "Copy connection code"
1297
- }) : null, /* @__PURE__ */ K("p", {
1309
+ }) : null, /* @__PURE__ */ J("p", {
1298
1310
  class: "qr-caption",
1299
- children: c || (m ? w ? `Approve the connection in ${t}, then come back here.` : `Copy this code and paste it into ${t} to connect.` : "Preparing a connection…")
1300
- })] }) : /* @__PURE__ */ K(M, { children: [
1301
- /* @__PURE__ */ K("div", {
1311
+ children: o || (m ? w ? `Approve the connection in ${t}, then come back here.` : `Copy this code and paste it into ${t} to connect.` : "Preparing a connection…")
1312
+ })] }) : /* @__PURE__ */ J(M, { children: [
1313
+ /* @__PURE__ */ J("div", {
1302
1314
  class: "portal-tabs qr-tabs",
1303
1315
  role: "tablist",
1304
- children: [/* @__PURE__ */ K("button", {
1316
+ children: [/* @__PURE__ */ J("button", {
1305
1317
  type: "button",
1306
1318
  role: "tab",
1307
1319
  "aria-selected": b === "wallet",
1308
1320
  class: `portal-tab${b === "wallet" ? " is-active" : ""}`,
1309
1321
  onClick: () => x("wallet"),
1310
1322
  children: "Wallet app"
1311
- }), /* @__PURE__ */ K("button", {
1323
+ }), /* @__PURE__ */ J("button", {
1312
1324
  type: "button",
1313
1325
  role: "tab",
1314
1326
  "aria-selected": b === "camera",
@@ -1317,27 +1329,27 @@ function At({ id: e, name: t, icon: n, detected: r, installUrl: i, connecting: o
1317
1329
  children: "Phone camera"
1318
1330
  })]
1319
1331
  }),
1320
- /* @__PURE__ */ K("div", {
1332
+ /* @__PURE__ */ J("div", {
1321
1333
  class: "qr-frame",
1322
- children: [b === "camera" ? S ? /* @__PURE__ */ K("div", {
1334
+ children: [b === "camera" ? S ? /* @__PURE__ */ J("div", {
1323
1335
  class: "qr",
1324
1336
  dangerouslySetInnerHTML: { __html: S }
1325
- }) : /* @__PURE__ */ K("div", {
1337
+ }) : /* @__PURE__ */ J("div", {
1326
1338
  class: "qr qr-fallback",
1327
- children: /* @__PURE__ */ K("code", { children: v })
1328
- }) : C ? /* @__PURE__ */ K("div", {
1339
+ children: /* @__PURE__ */ J("code", { children: v })
1340
+ }) : C ? /* @__PURE__ */ J("div", {
1329
1341
  class: "qr",
1330
1342
  dangerouslySetInnerHTML: { __html: C }
1331
- }) : c ? /* @__PURE__ */ K("div", {
1343
+ }) : o ? /* @__PURE__ */ J("div", {
1332
1344
  class: "qr qr-fallback",
1333
- children: /* @__PURE__ */ K("code", { children: "Connection failed" })
1334
- }) : /* @__PURE__ */ K("div", {
1345
+ children: /* @__PURE__ */ J("code", { children: "Connection failed" })
1346
+ }) : /* @__PURE__ */ J("div", {
1335
1347
  class: "qr",
1336
- children: /* @__PURE__ */ K("svg", {
1348
+ children: /* @__PURE__ */ J("svg", {
1337
1349
  class: "qr-spinner",
1338
1350
  viewBox: "0 0 100 100",
1339
1351
  "aria-hidden": "true",
1340
- children: /* @__PURE__ */ K("circle", {
1352
+ children: /* @__PURE__ */ J("circle", {
1341
1353
  cx: "50",
1342
1354
  cy: "50",
1343
1355
  r: "46",
@@ -1348,9 +1360,9 @@ function At({ id: e, name: t, icon: n, detected: r, installUrl: i, connecting: o
1348
1360
  "stroke-dasharray": "72 217"
1349
1361
  })
1350
1362
  })
1351
- }), b === "wallet" && (C || c) ? /* @__PURE__ */ K("span", {
1363
+ }), b === "wallet" && (C || o) ? /* @__PURE__ */ J("span", {
1352
1364
  class: "qr-badge",
1353
- children: /* @__PURE__ */ K(q, {
1365
+ children: /* @__PURE__ */ J(Y, {
1354
1366
  id: e,
1355
1367
  name: t,
1356
1368
  icon: n,
@@ -1358,33 +1370,33 @@ function At({ id: e, name: t, icon: n, detected: r, installUrl: i, connecting: o
1358
1370
  })
1359
1371
  }) : null]
1360
1372
  }),
1361
- /* @__PURE__ */ K("p", {
1373
+ /* @__PURE__ */ J("p", {
1362
1374
  class: "qr-caption",
1363
- children: b === "camera" ? "Scan with your phone’s camera to open this checkout on your phone" : c || (m ? `Scan this from inside ${t} to connect` : "Preparing a connection…")
1375
+ children: b === "camera" ? "Scan with your phone’s camera to open this checkout on your phone" : o || (m ? `Scan this from inside ${t} to connect` : "Preparing a connection…")
1364
1376
  }),
1365
- b === "camera" ? /* @__PURE__ */ K("button", {
1377
+ b === "camera" ? /* @__PURE__ */ J("button", {
1366
1378
  type: "button",
1367
1379
  class: "link-button qr-copy",
1368
1380
  onClick: E,
1369
1381
  children: d ? "Copied" : "Copy link"
1370
- }) : c ? /* @__PURE__ */ K("button", {
1382
+ }) : o ? /* @__PURE__ */ J("button", {
1371
1383
  type: "button",
1372
1384
  class: "link-button qr-copy",
1373
1385
  onClick: () => _((e) => e + 1),
1374
1386
  children: "Try again"
1375
- }) : m ? /* @__PURE__ */ K("button", {
1387
+ }) : m ? /* @__PURE__ */ J("button", {
1376
1388
  type: "button",
1377
1389
  class: "link-button qr-copy",
1378
1390
  onClick: T,
1379
1391
  children: d ? "Copied" : "Copy to clipboard"
1380
1392
  }) : null
1381
- ] }), /* @__PURE__ */ K("div", {
1393
+ ] }), /* @__PURE__ */ J("div", {
1382
1394
  class: "install-row",
1383
- children: [/* @__PURE__ */ K("span", { children: [
1395
+ children: [/* @__PURE__ */ J("span", { children: [
1384
1396
  "Don’t have ",
1385
1397
  t,
1386
1398
  "?"
1387
- ] }), i ? /* @__PURE__ */ K("a", {
1399
+ ] }), i ? /* @__PURE__ */ J("a", {
1388
1400
  class: "secondary",
1389
1401
  href: i,
1390
1402
  target: "_blank",
@@ -1392,27 +1404,27 @@ function At({ id: e, name: t, icon: n, detected: r, installUrl: i, connecting: o
1392
1404
  children: "Get"
1393
1405
  }) : null]
1394
1406
  })]
1395
- }) : /* @__PURE__ */ K("div", {
1407
+ }) : /* @__PURE__ */ J("div", {
1396
1408
  class: `connect-panel${p ? " connect-handoff" : ""}`,
1397
- children: [p ? /* @__PURE__ */ K(M, { children: [y ? /* @__PURE__ */ K("a", {
1409
+ children: [p ? /* @__PURE__ */ J(M, { children: [y ? /* @__PURE__ */ J("a", {
1398
1410
  class: "primary connect-open",
1399
1411
  href: y,
1400
1412
  children: ["Open in ", t]
1401
- }) : null, /* @__PURE__ */ K("p", {
1413
+ }) : null, /* @__PURE__ */ J("p", {
1402
1414
  class: "qr-caption",
1403
1415
  children: y ? `${t} opens with this checkout loaded.` : `Open ${t} and browse to this page to pay.`
1404
- })] }) : /* @__PURE__ */ K(M, { children: [
1405
- y ? /* @__PURE__ */ K("div", {
1416
+ })] }) : /* @__PURE__ */ J(M, { children: [
1417
+ y ? /* @__PURE__ */ J("div", {
1406
1418
  class: "portal-tabs qr-tabs",
1407
1419
  role: "tablist",
1408
- children: [/* @__PURE__ */ K("button", {
1420
+ children: [/* @__PURE__ */ J("button", {
1409
1421
  type: "button",
1410
1422
  role: "tab",
1411
1423
  "aria-selected": b === "wallet",
1412
1424
  class: `portal-tab${b === "wallet" ? " is-active" : ""}`,
1413
1425
  onClick: () => x("wallet"),
1414
1426
  children: "Wallet app"
1415
- }), /* @__PURE__ */ K("button", {
1427
+ }), /* @__PURE__ */ J("button", {
1416
1428
  type: "button",
1417
1429
  role: "tab",
1418
1430
  "aria-selected": b === "camera",
@@ -1421,17 +1433,17 @@ function At({ id: e, name: t, icon: n, detected: r, installUrl: i, connecting: o
1421
1433
  children: "Phone camera"
1422
1434
  })]
1423
1435
  }) : null,
1424
- /* @__PURE__ */ K("div", {
1436
+ /* @__PURE__ */ J("div", {
1425
1437
  class: "qr-frame",
1426
- children: [S ? /* @__PURE__ */ K("div", {
1438
+ children: [S ? /* @__PURE__ */ J("div", {
1427
1439
  class: "qr",
1428
1440
  dangerouslySetInnerHTML: { __html: S }
1429
- }) : /* @__PURE__ */ K("div", {
1441
+ }) : /* @__PURE__ */ J("div", {
1430
1442
  class: "qr qr-fallback",
1431
- children: /* @__PURE__ */ K("code", { children: v })
1432
- }), b === "wallet" && y ? /* @__PURE__ */ K("span", {
1443
+ children: /* @__PURE__ */ J("code", { children: v })
1444
+ }), b === "wallet" && y ? /* @__PURE__ */ J("span", {
1433
1445
  class: "qr-badge",
1434
- children: /* @__PURE__ */ K(q, {
1446
+ children: /* @__PURE__ */ J(Y, {
1435
1447
  id: e,
1436
1448
  name: t,
1437
1449
  icon: n,
@@ -1439,23 +1451,23 @@ function At({ id: e, name: t, icon: n, detected: r, installUrl: i, connecting: o
1439
1451
  })
1440
1452
  }) : null]
1441
1453
  }),
1442
- /* @__PURE__ */ K("p", {
1454
+ /* @__PURE__ */ J("p", {
1443
1455
  class: "qr-caption",
1444
1456
  children: S ? b === "wallet" ? `Scan from inside the ${t} app to pay there` : "Scan with your phone’s camera to open this checkout on your phone" : "Open this link on your phone to pay from a mobile wallet"
1445
1457
  }),
1446
- b === "camera" ? /* @__PURE__ */ K("button", {
1458
+ b === "camera" ? /* @__PURE__ */ J("button", {
1447
1459
  type: "button",
1448
1460
  class: "link-button qr-copy",
1449
1461
  onClick: E,
1450
1462
  children: d ? "Copied" : "Copy link"
1451
1463
  }) : null
1452
- ] }), /* @__PURE__ */ K("div", {
1464
+ ] }), /* @__PURE__ */ J("div", {
1453
1465
  class: "install-row",
1454
- children: [/* @__PURE__ */ K("span", { children: [
1466
+ children: [/* @__PURE__ */ J("span", { children: [
1455
1467
  "Don’t have ",
1456
1468
  t,
1457
1469
  "?"
1458
- ] }), i ? /* @__PURE__ */ K("a", {
1470
+ ] }), i ? /* @__PURE__ */ J("a", {
1459
1471
  class: "secondary",
1460
1472
  href: i,
1461
1473
  target: "_blank",
@@ -1466,13 +1478,13 @@ function At({ id: e, name: t, icon: n, detected: r, installUrl: i, connecting: o
1466
1478
  });
1467
1479
  }
1468
1480
  // src/element/ui/wallet-dialog.tsx
1469
- var jt = 5;
1470
- function Mt({ open: e, wallets: t, registry: n = [], connecting: r, connected: i, error: a, initialWalletId: o, remotePairing: s, onSelect: c, onClose: l }) {
1471
- let u = je(null), [d, f] = H(""), [p, m] = H(), [h, g] = H(!1);
1472
- U(() => {
1481
+ var Pt = 5;
1482
+ function Ft({ open: e, wallets: t, registry: n = [], connecting: r, connected: i, error: a, initialWalletId: o, remotePairing: s, onSelect: c, onClose: l }) {
1483
+ let u = G(null), [d, f] = U(""), [p, m] = U(), [h, g] = U(!1);
1484
+ W(() => {
1473
1485
  let t = u.current;
1474
1486
  t && (e && !t.open ? (t.showModal(), f(""), m(o ? _.find((e) => e.id === o) : void 0), g(!1)) : !e && t.open && t.close());
1475
- }, [e, o]), U(() => {
1487
+ }, [e, o]), W(() => {
1476
1488
  if (!e) return;
1477
1489
  let t = document.documentElement, n = {
1478
1490
  overflow: t.style.overflow,
@@ -1481,13 +1493,13 @@ function Mt({ open: e, wallets: t, registry: n = [], connecting: r, connected: i
1481
1493
  return t.style.overflow = "hidden", r > 0 && (t.style.paddingRight = `${r}px`), () => {
1482
1494
  t.style.overflow = n.overflow, t.style.paddingRight = n.padding;
1483
1495
  };
1484
- }, [e]), U(() => {
1496
+ }, [e]), W(() => {
1485
1497
  let e = u.current;
1486
1498
  if (!e) return;
1487
1499
  let t = () => l();
1488
1500
  return e.addEventListener("close", t), () => e.removeEventListener("close", t);
1489
1501
  }, [l]);
1490
- let _ = W(() => {
1502
+ let _ = K(() => {
1491
1503
  let e = new Map(t.map((e) => [e.id, e])), r = n.map((t) => {
1492
1504
  let n = e.get(t.id);
1493
1505
  return {
@@ -1505,31 +1517,31 @@ function Mt({ open: e, wallets: t, registry: n = [], connecting: r, connected: i
1505
1517
  detected: e
1506
1518
  });
1507
1519
  return r.sort((e, t) => Number(!!t.detected) - Number(!!e.detected));
1508
- }, [t, n]), v = We();
1509
- U(() => {
1520
+ }, [t, n]), v = Ke();
1521
+ W(() => {
1510
1522
  i && l();
1511
1523
  }, [i, l]);
1512
- let y = W(() => {
1524
+ let y = K(() => {
1513
1525
  let e = d.trim().toLowerCase();
1514
1526
  return e ? _.filter((t) => t.name.toLowerCase().includes(e)) : _;
1515
- }, [_, d]), b = W(() => h ? y : _.slice(0, jt), [
1527
+ }, [_, d]), b = K(() => h ? y : _.slice(0, Pt), [
1516
1528
  h,
1517
1529
  y,
1518
1530
  _
1519
1531
  ]);
1520
- return /* @__PURE__ */ K("dialog", {
1532
+ return /* @__PURE__ */ J("dialog", {
1521
1533
  ref: u,
1522
1534
  class: "wallet-dialog",
1523
1535
  "aria-label": "All wallets",
1524
1536
  onClick: (e) => {
1525
1537
  e.target === u.current && l();
1526
1538
  },
1527
- children: /* @__PURE__ */ K("div", {
1539
+ children: /* @__PURE__ */ J("div", {
1528
1540
  class: "wallet-dialog-body",
1529
- children: [/* @__PURE__ */ K("div", {
1541
+ children: [/* @__PURE__ */ J("div", {
1530
1542
  class: "wallet-dialog-head",
1531
1543
  children: [
1532
- p || h ? /* @__PURE__ */ K("button", {
1544
+ p || h ? /* @__PURE__ */ J("button", {
1533
1545
  type: "button",
1534
1546
  class: "icon-button",
1535
1547
  "aria-label": "Back",
@@ -1537,9 +1549,9 @@ function Mt({ open: e, wallets: t, registry: n = [], connecting: r, connected: i
1537
1549
  p ? m(void 0) : (g(!1), f(""));
1538
1550
  },
1539
1551
  children: "‹"
1540
- }) : /* @__PURE__ */ K("span", { class: "icon-button-spacer" }),
1541
- /* @__PURE__ */ K("h2", { children: p ? p.name : h ? "All wallets" : "Connect wallet" }),
1542
- /* @__PURE__ */ K("button", {
1552
+ }) : /* @__PURE__ */ J("span", { class: "icon-button-spacer" }),
1553
+ /* @__PURE__ */ J("h2", { children: p ? p.name : h ? "All wallets" : "Connect wallet" }),
1554
+ /* @__PURE__ */ J("button", {
1543
1555
  type: "button",
1544
1556
  class: "icon-button",
1545
1557
  "aria-label": "Close",
@@ -1547,7 +1559,7 @@ function Mt({ open: e, wallets: t, registry: n = [], connecting: r, connected: i
1547
1559
  children: "×"
1548
1560
  })
1549
1561
  ]
1550
- }), p ? /* @__PURE__ */ K(At, {
1562
+ }), p ? /* @__PURE__ */ J(Nt, {
1551
1563
  id: p.id,
1552
1564
  name: p.name,
1553
1565
  icon: p.icon,
@@ -1557,8 +1569,8 @@ function Mt({ open: e, wallets: t, registry: n = [], connecting: r, connected: i
1557
1569
  error: a,
1558
1570
  onRemote: p.detected ? void 0 : s?.(p.id),
1559
1571
  onConnect: c
1560
- }) : /* @__PURE__ */ K(M, { children: [
1561
- h ? /* @__PURE__ */ K("input", {
1572
+ }) : /* @__PURE__ */ J(M, { children: [
1573
+ h ? /* @__PURE__ */ J("input", {
1562
1574
  type: "search",
1563
1575
  class: "wallet-search",
1564
1576
  placeholder: "Search wallet",
@@ -1566,9 +1578,9 @@ function Mt({ open: e, wallets: t, registry: n = [], connecting: r, connected: i
1566
1578
  value: d,
1567
1579
  onInput: (e) => f(e.target.value)
1568
1580
  }) : null,
1569
- h ? /* @__PURE__ */ K("div", {
1581
+ h ? /* @__PURE__ */ J("div", {
1570
1582
  class: "wallet-grid",
1571
- children: b.map((e) => /* @__PURE__ */ K("button", {
1583
+ children: b.map((e) => /* @__PURE__ */ J("button", {
1572
1584
  type: "button",
1573
1585
  class: "wallet-tile",
1574
1586
  "aria-label": e.detected ? `${e.name}, installed` : e.name,
@@ -1576,58 +1588,58 @@ function Mt({ open: e, wallets: t, registry: n = [], connecting: r, connected: i
1576
1588
  m(e), e.detected && c(e.detected);
1577
1589
  },
1578
1590
  children: [
1579
- /* @__PURE__ */ K(q, {
1591
+ /* @__PURE__ */ J(Y, {
1580
1592
  id: e.id,
1581
1593
  name: e.name,
1582
1594
  icon: e.icon,
1583
1595
  size: "lg"
1584
1596
  }),
1585
- /* @__PURE__ */ K("span", {
1597
+ /* @__PURE__ */ J("span", {
1586
1598
  class: "wallet-tile-name",
1587
1599
  children: e.name
1588
1600
  }),
1589
- e.detected ? /* @__PURE__ */ K("span", {
1601
+ e.detected ? /* @__PURE__ */ J("span", {
1590
1602
  class: "wallet-tile-badge",
1591
1603
  "aria-hidden": "true",
1592
- children: /* @__PURE__ */ K("svg", {
1604
+ children: /* @__PURE__ */ J("svg", {
1593
1605
  viewBox: "0 0 24 24",
1594
1606
  fill: "none",
1595
1607
  stroke: "currentColor",
1596
1608
  "stroke-width": "3",
1597
1609
  "stroke-linecap": "round",
1598
1610
  "stroke-linejoin": "round",
1599
- children: /* @__PURE__ */ K("path", { d: "m5 13 4 4L19 7" })
1611
+ children: /* @__PURE__ */ J("path", { d: "m5 13 4 4L19 7" })
1600
1612
  })
1601
1613
  }) : null
1602
1614
  ]
1603
1615
  }, e.id))
1604
- }) : /* @__PURE__ */ K("div", {
1616
+ }) : /* @__PURE__ */ J("div", {
1605
1617
  class: "wallet-list",
1606
- children: b.map((e) => /* @__PURE__ */ K("button", {
1618
+ children: b.map((e) => /* @__PURE__ */ J("button", {
1607
1619
  type: "button",
1608
1620
  class: "wallet-row",
1609
1621
  onClick: () => {
1610
1622
  m(e), e.detected && c(e.detected);
1611
1623
  },
1612
1624
  children: [
1613
- /* @__PURE__ */ K(q, {
1625
+ /* @__PURE__ */ J(Y, {
1614
1626
  id: e.id,
1615
1627
  name: e.name,
1616
1628
  icon: e.icon,
1617
1629
  size: "lg"
1618
1630
  }),
1619
- /* @__PURE__ */ K("span", {
1631
+ /* @__PURE__ */ J("span", {
1620
1632
  class: "wallet-row-name",
1621
1633
  children: e.name
1622
1634
  }),
1623
- e.detected ? /* @__PURE__ */ K("span", {
1635
+ e.detected ? /* @__PURE__ */ J("span", {
1624
1636
  class: "wallet-row-tag is-installed",
1625
1637
  children: "Installed"
1626
- }) : v ? /* @__PURE__ */ K("span", {
1638
+ }) : v ? /* @__PURE__ */ J("span", {
1627
1639
  class: "wallet-row-tag is-muted",
1628
1640
  children: "Get"
1629
1641
  }) : null,
1630
- /* @__PURE__ */ K("span", {
1642
+ /* @__PURE__ */ J("span", {
1631
1643
  class: "wallet-row-chevron",
1632
1644
  "aria-hidden": "true",
1633
1645
  children: "›"
@@ -1635,43 +1647,43 @@ function Mt({ open: e, wallets: t, registry: n = [], connecting: r, connected: i
1635
1647
  ]
1636
1648
  }, e.id))
1637
1649
  }),
1638
- !h && _.length > jt ? /* @__PURE__ */ K("button", {
1650
+ !h && _.length > Pt ? /* @__PURE__ */ J("button", {
1639
1651
  type: "button",
1640
1652
  class: "wallet-row wallet-search-row",
1641
1653
  onClick: () => g(!0),
1642
1654
  children: [
1643
- /* @__PURE__ */ K("span", {
1655
+ /* @__PURE__ */ J("span", {
1644
1656
  class: "wallet-search-icon",
1645
1657
  "aria-hidden": "true",
1646
- children: /* @__PURE__ */ K("svg", {
1658
+ children: /* @__PURE__ */ J("svg", {
1647
1659
  viewBox: "0 0 24 24",
1648
1660
  fill: "none",
1649
1661
  stroke: "currentColor",
1650
1662
  "stroke-width": "2",
1651
1663
  "stroke-linecap": "round",
1652
- children: [/* @__PURE__ */ K("circle", {
1664
+ children: [/* @__PURE__ */ J("circle", {
1653
1665
  cx: "11",
1654
1666
  cy: "11",
1655
1667
  r: "7"
1656
- }), /* @__PURE__ */ K("path", { d: "m20 20-3.5-3.5" })]
1668
+ }), /* @__PURE__ */ J("path", { d: "m20 20-3.5-3.5" })]
1657
1669
  })
1658
1670
  }),
1659
- /* @__PURE__ */ K("span", {
1671
+ /* @__PURE__ */ J("span", {
1660
1672
  class: "wallet-row-name",
1661
1673
  children: "Search wallet"
1662
1674
  }),
1663
- /* @__PURE__ */ K("span", {
1675
+ /* @__PURE__ */ J("span", {
1664
1676
  class: "wallet-row-count",
1665
1677
  children: _.length
1666
1678
  }),
1667
- /* @__PURE__ */ K("span", {
1679
+ /* @__PURE__ */ J("span", {
1668
1680
  class: "wallet-row-chevron",
1669
1681
  "aria-hidden": "true",
1670
1682
  children: "›"
1671
1683
  })
1672
1684
  ]
1673
1685
  }) : null,
1674
- h && b.length === 0 ? /* @__PURE__ */ K("p", {
1686
+ h && b.length === 0 ? /* @__PURE__ */ J("p", {
1675
1687
  class: "muted wallet-empty",
1676
1688
  children: [
1677
1689
  "No wallet matches “",
@@ -1684,63 +1696,63 @@ function Mt({ open: e, wallets: t, registry: n = [], connecting: r, connected: i
1684
1696
  });
1685
1697
  }
1686
1698
  // src/element/ui/wallet-list.tsx
1687
- var Nt = 3, Pt = ["metamask", "coinbase"], Ft = 2;
1688
- function It({ wallets: e, registry: t = [], connecting: n, connected: r, error: i, remotePairing: a, onSelect: o }) {
1689
- let s = Ue(), [c, l] = H(!1), [u, d] = H(), f = e.slice(0, Nt), p = e.length > f.length || t.length > f.length, m = e.length === 0 ? [...Pt.map((e) => t.find((t) => t.id === e)), ...t].filter((e) => e !== void 0).filter((e, t, n) => n.findIndex((t) => t.id === e.id) === t).slice(0, Ft) : [], h = new Set(f.map((e) => e.id)), g = t.filter((e) => !h.has(e.id)).map((e) => ({
1699
+ var It = 3, Lt = ["metamask", "coinbase"], Rt = 2;
1700
+ function zt({ wallets: e, registry: t = [], connecting: n, connected: r, error: i, remotePairing: a, onSelect: o }) {
1701
+ let s = Ge(), [c, l] = U(!1), [u, d] = U(), f = e.slice(0, It), p = e.length > f.length || t.length > f.length, m = e.length === 0 ? [...Lt.map((e) => t.find((t) => t.id === e)), ...t].filter((e) => e !== void 0).filter((e, t, n) => n.findIndex((t) => t.id === e.id) === t).slice(0, Rt) : [], h = new Set(f.map((e) => e.id)), g = t.filter((e) => !h.has(e.id)).map((e) => ({
1690
1702
  id: e.id,
1691
1703
  src: s(e.id)
1692
1704
  })).filter((e) => e.src).slice(0, 3);
1693
- return /* @__PURE__ */ K("div", {
1705
+ return /* @__PURE__ */ J("div", {
1694
1706
  class: "wallets",
1695
1707
  children: [
1696
- f.map((e) => /* @__PURE__ */ K("button", {
1708
+ f.map((e) => /* @__PURE__ */ J("button", {
1697
1709
  type: "button",
1698
1710
  class: "wallet",
1699
1711
  onClick: () => o(e),
1700
1712
  children: [
1701
- /* @__PURE__ */ K(q, {
1713
+ /* @__PURE__ */ J(Y, {
1702
1714
  id: e.id,
1703
1715
  name: e.name,
1704
1716
  icon: e.icon
1705
1717
  }),
1706
- /* @__PURE__ */ K("span", {
1718
+ /* @__PURE__ */ J("span", {
1707
1719
  class: "wallet-name",
1708
1720
  children: e.name
1709
1721
  }),
1710
- /* @__PURE__ */ K("span", {
1722
+ /* @__PURE__ */ J("span", {
1711
1723
  class: "wallet-tag",
1712
1724
  children: "Detected"
1713
1725
  })
1714
1726
  ]
1715
1727
  }, e.id)),
1716
- m.map((e) => /* @__PURE__ */ K("button", {
1728
+ m.map((e) => /* @__PURE__ */ J("button", {
1717
1729
  type: "button",
1718
1730
  class: "wallet",
1719
1731
  onClick: () => {
1720
1732
  d(e.id), l(!0);
1721
1733
  },
1722
- children: [/* @__PURE__ */ K(q, {
1734
+ children: [/* @__PURE__ */ J(Y, {
1723
1735
  id: e.id,
1724
1736
  name: e.name
1725
- }), /* @__PURE__ */ K("span", {
1737
+ }), /* @__PURE__ */ J("span", {
1726
1738
  class: "wallet-name",
1727
1739
  children: e.name
1728
1740
  })]
1729
1741
  }, e.id)),
1730
- f.length === 0 && m.length === 0 && !p ? /* @__PURE__ */ K("p", {
1742
+ f.length === 0 && m.length === 0 && !p ? /* @__PURE__ */ J("p", {
1731
1743
  class: "muted",
1732
1744
  children: "Loading wallets…"
1733
1745
  }) : null,
1734
- p ? /* @__PURE__ */ K("button", {
1746
+ p ? /* @__PURE__ */ J("button", {
1735
1747
  type: "button",
1736
1748
  class: "wallet wallet-more-button",
1737
1749
  onClick: () => {
1738
1750
  d(void 0), l(!0);
1739
1751
  },
1740
- children: [g.length > 0 ? /* @__PURE__ */ K("span", {
1752
+ children: [g.length > 0 ? /* @__PURE__ */ J("span", {
1741
1753
  class: "wallet-stack",
1742
1754
  "aria-hidden": "true",
1743
- children: g.map((e) => /* @__PURE__ */ K("img", {
1755
+ children: g.map((e) => /* @__PURE__ */ J("img", {
1744
1756
  src: e.src,
1745
1757
  alt: "",
1746
1758
  width: 16,
@@ -1748,16 +1760,16 @@ function It({ wallets: e, registry: t = [], connecting: n, connected: r, error:
1748
1760
  loading: "lazy",
1749
1761
  decoding: "async"
1750
1762
  }, e.id))
1751
- }) : /* @__PURE__ */ K("span", {
1763
+ }) : /* @__PURE__ */ J("span", {
1752
1764
  class: "wallet-mark",
1753
1765
  "aria-hidden": "true",
1754
1766
  children: "···"
1755
- }), /* @__PURE__ */ K("span", {
1767
+ }), /* @__PURE__ */ J("span", {
1756
1768
  class: "wallet-name",
1757
1769
  children: "Other wallets"
1758
1770
  })]
1759
1771
  }) : null,
1760
- /* @__PURE__ */ K(Mt, {
1772
+ /* @__PURE__ */ J(Ft, {
1761
1773
  open: c,
1762
1774
  wallets: e,
1763
1775
  registry: t,
@@ -1773,63 +1785,63 @@ function It({ wallets: e, registry: t = [], connecting: n, connected: r, error:
1773
1785
  });
1774
1786
  }
1775
1787
  // src/element/ui/app.tsx
1776
- var Lt = 1;
1777
- function Rt(e) {
1778
- let [t, n] = H(e.getState);
1779
- return U(() => (n(e.getState()), e.subscribe(() => n(e.getState()))), [e]), t;
1788
+ var Bt = 1;
1789
+ function Vt(e) {
1790
+ let [t, n] = U(e.getState);
1791
+ return W(() => (n(e.getState()), e.subscribe(() => n(e.getState()))), [e]), t;
1780
1792
  }
1781
- function zt({ kit: e, request: t, variant: n, onResult: r, onError: i, onClose: o }) {
1782
- let s = Rt(e), u = We(), d = je(!1), [f, p] = H(), m = t.family ? [t.family] : ["evm", "svm"], h = W(() => {
1793
+ function Ht({ kit: e, request: t, variant: n, onResult: r, onError: i, onClose: a }) {
1794
+ let o = Vt(e), c = Ke(), l = G(!1), [f, p] = U(), m = t.family ? [t.family] : ["evm", "svm"], h = K(() => {
1783
1795
  let e = [], t = /* @__PURE__ */ new Set(), n = (n) => {
1784
1796
  let r = n.name.trim().toLowerCase();
1785
1797
  t.has(n.id) || t.has(r) || (t.add(n.id), t.add(r), e.push(n));
1786
1798
  };
1787
- if (m.includes("evm")) for (let e of s.evm.available) n({
1799
+ if (m.includes("evm")) for (let e of o.evm.available) n({
1788
1800
  ...e,
1789
1801
  family: "evm",
1790
1802
  evm: e
1791
1803
  });
1792
- if (m.includes("svm")) for (let e of s.svm.available) n({
1804
+ if (m.includes("svm")) for (let e of o.svm.available) n({
1793
1805
  ...e,
1794
1806
  family: "svm",
1795
1807
  svm: e
1796
1808
  });
1797
1809
  return e;
1798
1810
  }, [
1799
- s.evm.available,
1800
- s.svm.available,
1811
+ o.evm.available,
1812
+ o.svm.available,
1801
1813
  t.family
1802
- ]), g = W(() => {
1814
+ ]), g = K(() => {
1803
1815
  let e = /* @__PURE__ */ new Set(), t = [];
1804
- for (let n of m) for (let r of l(s.catalog, n)) e.has(r.id) || (e.add(r.id), t.push(r));
1816
+ for (let n of m) for (let r of d(o.catalog, n)) e.has(r.id) || (e.add(r.id), t.push(r));
1805
1817
  let n = new Set(h.map((e) => e.id)), r = new Set(h.map((e) => e.name.trim().toLowerCase()));
1806
1818
  return t.filter((e) => n.has(e.id) || !r.has(e.name.trim().toLowerCase()));
1807
1819
  }, [
1808
- s.catalog,
1820
+ o.catalog,
1809
1821
  t.family,
1810
1822
  h
1811
- ]), _ = s.evm.connecting || s.svm.connecting, v = f === "svm" ? s.svm.error : s.evm.error, y = Me((t) => {
1823
+ ]), _ = o.evm.connecting || o.svm.connecting, v = f === "svm" ? o.svm.error : o.evm.error, y = Me((t) => {
1812
1824
  p(t.family), t.evm ? e.connectEvm(t.evm) : t.svm && e.connectSvm(t.svm);
1813
1825
  }, [e]), b = Me((n) => {
1814
1826
  if (!e.canPairRemotely() || m.length === 1 && m[0] === "svm") return;
1815
1827
  let r = g.find((e) => e.id === n);
1816
- if (r && !a(r.id, window.location.href) && (u || c(r.id))) return (n) => {
1817
- p("evm"), e.connectRemote(r, t.chainId ?? Lt, n);
1828
+ if (r && !s(r.id, window.location.href) && (c || u(r.id))) return (n) => {
1829
+ p("evm"), e.connectRemote(r, t.chainId ?? Bt, n);
1818
1830
  };
1819
1831
  }, [
1820
1832
  e,
1821
- u,
1833
+ c,
1822
1834
  g,
1823
1835
  t.chainId,
1824
1836
  t.family
1825
- ]), x = f === "svm" ? s.svm.connected : s.evm.connected;
1826
- return f && x && (d.current = !0), U(() => {
1837
+ ]), x = f === "svm" ? o.svm.connected : o.evm.connected;
1838
+ return f && x && (l.current = !0), W(() => {
1827
1839
  if (!f || !x) return;
1828
1840
  let n = !0;
1829
1841
  return (async () => {
1830
1842
  try {
1831
1843
  if (f === "evm" && t.chainId !== void 0 && !await e.ensureChain(t.chainId)) {
1832
- d.current = !1, n && i(e.getState().evm.error || "The wallet stayed on another network.");
1844
+ l.current = !1, n && i(e.getState().evm.error || "The wallet stayed on another network.");
1833
1845
  return;
1834
1846
  }
1835
1847
  let a = await e.resolveIntent(f, t);
@@ -1845,9 +1857,9 @@ function zt({ kit: e, request: t, variant: n, onResult: r, onError: i, onClose:
1845
1857
  f,
1846
1858
  x?.address,
1847
1859
  x?.walletId
1848
- ]), n === "modal" ? /* @__PURE__ */ K(He, {
1849
- base: s.assetBase,
1850
- children: /* @__PURE__ */ K(Mt, {
1860
+ ]), n === "modal" ? /* @__PURE__ */ J(Ue, {
1861
+ base: o.assetBase,
1862
+ children: /* @__PURE__ */ J(Ft, {
1851
1863
  open: !0,
1852
1864
  wallets: h,
1853
1865
  registry: g,
@@ -1857,12 +1869,12 @@ function zt({ kit: e, request: t, variant: n, onResult: r, onError: i, onClose:
1857
1869
  remotePairing: b,
1858
1870
  onSelect: y,
1859
1871
  onClose: () => {
1860
- d.current || o();
1872
+ l.current || a();
1861
1873
  }
1862
1874
  })
1863
- }) : /* @__PURE__ */ K(He, {
1864
- base: s.assetBase,
1865
- children: /* @__PURE__ */ K(It, {
1875
+ }) : /* @__PURE__ */ J(Ue, {
1876
+ base: o.assetBase,
1877
+ children: /* @__PURE__ */ J(zt, {
1866
1878
  wallets: h,
1867
1879
  registry: g,
1868
1880
  connecting: _,
@@ -1874,7 +1886,7 @@ function zt({ kit: e, request: t, variant: n, onResult: r, onError: i, onClose:
1874
1886
  });
1875
1887
  }
1876
1888
  // src/element/element.ts
1877
- var $ = class extends HTMLElement {
1889
+ var Ut = class extends HTMLElement {
1878
1890
  static tagName = "reclack-connect";
1879
1891
  static get observedAttributes() {
1880
1892
  return [
@@ -1926,7 +1938,7 @@ var $ = class extends HTMLElement {
1926
1938
  return this.#s;
1927
1939
  }
1928
1940
  constructor() {
1929
- super(), this.#i = this.attachShadow({ mode: "open" }), Vt(this.#i), Wt(this.#i);
1941
+ super(), this.#i = this.attachShadow({ mode: "open" }), Gt(this.#i), Jt(this.#i);
1930
1942
  }
1931
1943
  connectedCallback() {
1932
1944
  this.#a = !0, queueMicrotask(() => {
@@ -1937,7 +1949,7 @@ var $ = class extends HTMLElement {
1937
1949
  this.#o = this.kit.subscribe(() => this.#f()), this.#p(), this.#_();
1938
1950
  }
1939
1951
  disconnectedCallback() {
1940
- this.#a = !1, this.#o?.(), this.#o = void 0, this.#c?.(), this.#c = void 0, ve(null, this.#i), this.#t && !this.#h().keepAlive && this.kit.destroy();
1952
+ this.#a = !1, this.#o?.(), this.#o = void 0, this.#c?.(), this.#c = void 0, L(null, this.#i), this.#t && !this.#h().keepAlive && this.kit.destroy();
1941
1953
  }
1942
1954
  attributeChangedCallback() {
1943
1955
  this.#a && (this.#p(), this.#_());
@@ -1952,7 +1964,7 @@ var $ = class extends HTMLElement {
1952
1964
  #p() {
1953
1965
  this.#c?.();
1954
1966
  let e = this.#m();
1955
- this.#d = this.#r ?? this.#e?.getState().theme, this.#c = i(e?.mode, (n) => {
1967
+ this.#d = this.#r ?? this.#e?.getState().theme, this.#c = o(e?.mode, (n) => {
1956
1968
  this.#s = n, t(this, e, n);
1957
1969
  });
1958
1970
  }
@@ -1987,7 +1999,7 @@ var $ = class extends HTMLElement {
1987
1999
  }));
1988
2000
  }
1989
2001
  #v() {
1990
- ve(A(zt, {
2002
+ L(j(Ht, {
1991
2003
  kit: this.kit,
1992
2004
  request: this.#h(),
1993
2005
  variant: this.#g(),
@@ -2003,23 +2015,23 @@ var $ = class extends HTMLElement {
2003
2015
  composed: !0
2004
2016
  }));
2005
2017
  }
2006
- }, Bt;
2007
- function Vt(e) {
2018
+ }, Wt;
2019
+ function Gt(e) {
2008
2020
  if (typeof CSSStyleSheet < "u" && "adoptedStyleSheets" in e) {
2009
- Bt || (Bt = new CSSStyleSheet(), Bt.replaceSync(be)), e.adoptedStyleSheets = [Bt];
2021
+ Wt || (Wt = new CSSStyleSheet(), Wt.replaceSync(xe)), e.adoptedStyleSheets = [Wt];
2010
2022
  return;
2011
2023
  }
2012
2024
  let t = document.createElement("style");
2013
- t.textContent = be, e.append(t);
2025
+ t.textContent = xe, e.append(t);
2014
2026
  }
2015
- function Ht(e = $.tagName) {
2016
- typeof customElements > "u" || customElements.get(e) || customElements.define(e, $);
2027
+ function Kt(e = Ut.tagName) {
2028
+ typeof customElements > "u" || customElements.get(e) || customElements.define(e, Ut);
2017
2029
  }
2018
- function Ut(e = { intent: ["address"] }) {
2019
- Ht();
2030
+ function qt(e = { intent: ["address"] }) {
2031
+ Kt();
2020
2032
  let { kit: t, kitOptions: r, theme: i, container: a, ...o } = e;
2021
2033
  if (o.keepAlive && !t && !r) throw Error("connectWallet with keepAlive needs a kit of your own to keep the connection on.");
2022
- let s = document.createElement($.tagName);
2034
+ let s = document.createElement(Ut.tagName);
2023
2035
  return t ? s.useKit(t) : r && s.useKit(n(r)), s.request = o, s.theme = i, s.setAttribute("variant", "modal"), (a ?? document.body).append(s), new Promise((e, t) => {
2024
2036
  let n = (e) => {
2025
2037
  s.remove(), e();
@@ -2034,13 +2046,13 @@ function Ut(e = { intent: ["address"] }) {
2034
2046
  });
2035
2047
  });
2036
2048
  }
2037
- function Wt(e) {
2049
+ function Jt(e) {
2038
2050
  let t = (e) => {
2039
- Gt(e) && e.stopPropagation();
2051
+ Yt(e) && e.stopPropagation();
2040
2052
  };
2041
2053
  e.addEventListener("wheel", t), e.addEventListener("touchmove", t);
2042
2054
  }
2043
- function Gt(e) {
2055
+ function Yt(e) {
2044
2056
  for (let t of e.composedPath()) {
2045
2057
  if (!(t instanceof Element)) return !1;
2046
2058
  if (t.scrollHeight <= t.clientHeight) continue;
@@ -2050,7 +2062,7 @@ function Gt(e) {
2050
2062
  return !1;
2051
2063
  }
2052
2064
  // src/element/props.ts
2053
- var Kt = {
2065
+ var Xt = {
2054
2066
  variant: "variant",
2055
2067
  family: "family",
2056
2068
  chainId: "chain-id",
@@ -2061,19 +2073,257 @@ var Kt = {
2061
2073
  assetBase: "asset-base",
2062
2074
  apiUrl: "api-url"
2063
2075
  };
2064
- function qt(e) {
2076
+ function Zt(e) {
2065
2077
  let t = {};
2066
- for (let [n, r] of Object.entries(Kt)) {
2078
+ for (let [n, r] of Object.entries(Xt)) {
2067
2079
  let i = e[n];
2068
2080
  i !== void 0 && (t[r] = String(i));
2069
2081
  }
2070
2082
  return e.intent?.length && (t.intent = e.intent.join(",")), e.keepAlive && (t["keep-alive"] = ""), t;
2071
2083
  }
2072
- var Jt = {
2084
+ var Qt = {
2073
2085
  connect: "onConnect",
2074
2086
  cancel: "onCancel",
2075
2087
  "connect-error": "onError"
2076
2088
  };
2077
- // src/element/index.ts
2078
- Ht();
2079
- export { Kt as ATTRIBUTES, Jt as EVENTS, $ as ReclackConnectElement, qt as attributesOf, Ut as connectWallet, Ht as defineWalletElement };
2089
+ // src/element/ui/network-select.tsx
2090
+ function $t({ networks: e, value: t, disabled: n, label: i, onChange: a }) {
2091
+ let [o, s] = U(!1), [c, l] = U(""), [u, d] = U(0), f = G(null), p = G(null), m = G(null), h = Pe(), g = e.includes(t) ? t : e[0] ?? "", _ = K(() => {
2092
+ let t = c.trim().toLowerCase();
2093
+ return t ? e.filter((e) => r(e).toLowerCase().includes(t) || e.toLowerCase().includes(t)) : e;
2094
+ }, [e, c]);
2095
+ W(() => {
2096
+ if (!o) return;
2097
+ let e = (e) => {
2098
+ let t = f.current;
2099
+ t && !e.composedPath().includes(t) && s(!1);
2100
+ };
2101
+ return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
2102
+ }, [o]), W(() => {
2103
+ o && m.current?.focus();
2104
+ }, [o]), W(() => {
2105
+ n && s(!1);
2106
+ }, [n]), W(() => {
2107
+ o && f.current?.querySelector(`#${CSS.escape(`${h}-${u}`)}`)?.scrollIntoView({ block: "nearest" });
2108
+ }, [
2109
+ o,
2110
+ u,
2111
+ h
2112
+ ]);
2113
+ function v() {
2114
+ l("");
2115
+ let t = e.indexOf(g);
2116
+ d(t < 0 ? 0 : t), s(!0);
2117
+ }
2118
+ function y() {
2119
+ s(!1), p.current?.focus();
2120
+ }
2121
+ function b(e) {
2122
+ a(e), s(!1), p.current?.focus();
2123
+ }
2124
+ function x(e) {
2125
+ if (e.key === "Escape") e.preventDefault(), y();
2126
+ else if (!o) (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && (e.preventDefault(), v());
2127
+ else switch (e.key) {
2128
+ case "ArrowDown":
2129
+ e.preventDefault(), d((e) => Math.min(e + 1, _.length - 1));
2130
+ break;
2131
+ case "ArrowUp":
2132
+ e.preventDefault(), d((e) => Math.max(e - 1, 0));
2133
+ break;
2134
+ case "Home":
2135
+ e.preventDefault(), d(0);
2136
+ break;
2137
+ case "End":
2138
+ e.preventDefault(), d(_.length - 1);
2139
+ break;
2140
+ case "Enter": {
2141
+ e.preventDefault();
2142
+ let t = _[u];
2143
+ t && b(t);
2144
+ break;
2145
+ }
2146
+ case "Tab": s(!1);
2147
+ }
2148
+ }
2149
+ return /* @__PURE__ */ J("div", {
2150
+ class: "rkw-field",
2151
+ children: [i === "" ? null : /* @__PURE__ */ J("span", {
2152
+ class: "rkw-field-label",
2153
+ id: `${h}-label`,
2154
+ children: i ?? "Network"
2155
+ }), /* @__PURE__ */ J("div", {
2156
+ class: "network-select",
2157
+ ref: f,
2158
+ onKeyDown: x,
2159
+ children: [/* @__PURE__ */ J("button", {
2160
+ ref: p,
2161
+ type: "button",
2162
+ class: "network-trigger",
2163
+ "aria-expanded": o,
2164
+ "aria-haspopup": "listbox",
2165
+ "aria-labelledby": `${h}-label`,
2166
+ disabled: n,
2167
+ onClick: () => o ? s(!1) : v(),
2168
+ children: [
2169
+ /* @__PURE__ */ J(en, { network: g }),
2170
+ /* @__PURE__ */ J("span", {
2171
+ class: "network-trigger-name",
2172
+ children: r(g)
2173
+ }),
2174
+ /* @__PURE__ */ J("span", {
2175
+ class: "network-caret",
2176
+ "aria-hidden": "true"
2177
+ })
2178
+ ]
2179
+ }), o ? /* @__PURE__ */ J("div", {
2180
+ class: "network-panel",
2181
+ children: [
2182
+ /* @__PURE__ */ J("input", {
2183
+ ref: m,
2184
+ type: "search",
2185
+ class: "network-search",
2186
+ placeholder: "Search network",
2187
+ "aria-label": "Search network",
2188
+ autocomplete: "off",
2189
+ role: "combobox",
2190
+ "aria-expanded": !0,
2191
+ "aria-controls": h,
2192
+ "aria-activedescendant": _.length ? `${h}-${u}` : void 0,
2193
+ value: c,
2194
+ onInput: (e) => {
2195
+ l(e.target.value), d(0);
2196
+ }
2197
+ }),
2198
+ /* @__PURE__ */ J("ul", {
2199
+ class: "network-list",
2200
+ id: h,
2201
+ role: "listbox",
2202
+ "aria-labelledby": `${h}-label`,
2203
+ children: _.map((e, t) => /* @__PURE__ */ J("li", {
2204
+ id: `${h}-${t}`,
2205
+ role: "option",
2206
+ "aria-selected": e === g,
2207
+ class: t === u ? "network-item network-item-active" : "network-item",
2208
+ onClick: () => b(e),
2209
+ onMouseMove: () => d(t),
2210
+ children: [/* @__PURE__ */ J(en, { network: e }), /* @__PURE__ */ J("span", {
2211
+ class: "network-item-name",
2212
+ children: r(e)
2213
+ })]
2214
+ }, e))
2215
+ }),
2216
+ _.length === 0 ? /* @__PURE__ */ J("p", {
2217
+ class: "network-empty",
2218
+ children: [
2219
+ "No network matches “",
2220
+ c,
2221
+ "”."
2222
+ ]
2223
+ }) : null
2224
+ ]
2225
+ }) : null]
2226
+ })]
2227
+ });
2228
+ }
2229
+ function en({ network: e }) {
2230
+ let t = We(), n = i(e, t);
2231
+ return /* @__PURE__ */ J("span", {
2232
+ class: "network-mark",
2233
+ "aria-hidden": "true",
2234
+ children: n ? /* @__PURE__ */ J("img", {
2235
+ src: n,
2236
+ alt: "",
2237
+ width: 20,
2238
+ height: 20,
2239
+ loading: "lazy",
2240
+ decoding: "async"
2241
+ }) : r(e).charAt(0)
2242
+ });
2243
+ }
2244
+ // src/element/network-element.ts
2245
+ var tn = class extends HTMLElement {
2246
+ static tagName = "reclack-network";
2247
+ static get observedAttributes() {
2248
+ return [
2249
+ "networks",
2250
+ "value",
2251
+ "disabled",
2252
+ "label",
2253
+ "asset-base",
2254
+ "theme-mode",
2255
+ "brand",
2256
+ "radius",
2257
+ "font"
2258
+ ];
2259
+ }
2260
+ #e;
2261
+ #t = !1;
2262
+ #n;
2263
+ #r;
2264
+ constructor() {
2265
+ super(), this.#e = this.attachShadow({ mode: "open" }), Gt(this.#e);
2266
+ }
2267
+ set theme(e) {
2268
+ this.#n = e, this.#t && (this.#o(), this.#s());
2269
+ }
2270
+ get value() {
2271
+ return this.getAttribute("value") ?? this.#i()[0] ?? "";
2272
+ }
2273
+ set value(e) {
2274
+ this.setAttribute("value", e);
2275
+ }
2276
+ connectedCallback() {
2277
+ this.#t = !0, this.#o(), this.#s();
2278
+ }
2279
+ disconnectedCallback() {
2280
+ this.#t = !1, this.#r?.(), this.#r = void 0, L(null, this.#e);
2281
+ }
2282
+ attributeChangedCallback() {
2283
+ this.#t && (this.#o(), this.#s());
2284
+ }
2285
+ #i() {
2286
+ return (this.getAttribute("networks") ?? "").split(",").map((e) => e.trim()).filter(Boolean);
2287
+ }
2288
+ #a() {
2289
+ if (this.#n) return this.#n;
2290
+ let e = this.getAttribute("theme-mode");
2291
+ return {
2292
+ mode: e === "light" || e === "dark" ? e : "system",
2293
+ brand: this.getAttribute("brand") ?? void 0,
2294
+ radius: this.getAttribute("radius") ?? void 0,
2295
+ fontFamily: this.getAttribute("font") ?? void 0
2296
+ };
2297
+ }
2298
+ #o() {
2299
+ this.#r?.();
2300
+ let e = this.#a();
2301
+ this.#r = o(e?.mode, (n) => {
2302
+ t(this, e, n);
2303
+ });
2304
+ }
2305
+ #s() {
2306
+ let t = this.#i();
2307
+ L(j(Ue, {
2308
+ base: this.getAttribute("asset-base") ?? e,
2309
+ children: j($t, {
2310
+ networks: t,
2311
+ value: this.value,
2312
+ disabled: this.hasAttribute("disabled"),
2313
+ label: this.getAttribute("label") ?? void 0,
2314
+ onChange: (e) => {
2315
+ this.setAttribute("value", e), this.dispatchEvent(new CustomEvent("change", {
2316
+ detail: { network: e },
2317
+ bubbles: !0,
2318
+ composed: !0
2319
+ }));
2320
+ }
2321
+ })
2322
+ }), this.#e);
2323
+ }
2324
+ };
2325
+ function nn(e = tn.tagName) {
2326
+ typeof customElements > "u" || customElements.get(e) || customElements.define(e, tn);
2327
+ }
2328
+ Kt(), nn();
2329
+ export { Xt as ATTRIBUTES, Qt as EVENTS, Ut as ReclackConnectElement, tn as ReclackNetworkElement, Zt as attributesOf, qt as connectWallet, nn as defineNetworkElement, Kt as defineWalletElement };