lildocs 0.0.0 → 0.1.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.
@@ -0,0 +1,3239 @@
1
+ //#region node_modules/.pnpm/preact@10.29.2/node_modules/preact/dist/preact.module.js
2
+ var n$1, l$3, u$3, t$2, i$3, r$2, o$3, e$2, f$3, c$2, a$2, s$2, h$3, p$3, v$2, y$3, d$3 = {}, w$3 = [], _$3 = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, g$4 = Array.isArray;
3
+ function m$3(n, l) {
4
+ for (var u in l) n[u] = l[u];
5
+ return n;
6
+ }
7
+ function b$2(n) {
8
+ n && n.parentNode && n.parentNode.removeChild(n);
9
+ }
10
+ function k$2(l, u, t) {
11
+ var i, r, o, e = {};
12
+ for (o in u) "key" == o ? i = u[o] : "ref" == o ? r = u[o] : e[o] = u[o];
13
+ if (arguments.length > 2 && (e.children = arguments.length > 3 ? n$1.call(arguments, 2) : t), "function" == typeof l && null != l.defaultProps) for (o in l.defaultProps) void 0 === e[o] && (e[o] = l.defaultProps[o]);
14
+ return x$2(l, e, i, r, null);
15
+ }
16
+ function x$2(n, t, i, r, o) {
17
+ var e = {
18
+ type: n,
19
+ props: t,
20
+ key: i,
21
+ ref: r,
22
+ __k: null,
23
+ __: null,
24
+ __b: 0,
25
+ __e: null,
26
+ __c: null,
27
+ constructor: void 0,
28
+ __v: null == o ? ++u$3 : o,
29
+ __i: -1,
30
+ __u: 0
31
+ };
32
+ return null == o && null != l$3.vnode && l$3.vnode(e), e;
33
+ }
34
+ function S$1(n) {
35
+ return n.children;
36
+ }
37
+ function C$1(n, l) {
38
+ this.props = n, this.context = l;
39
+ }
40
+ function $$1(n, l) {
41
+ if (null == l) return n.__ ? $$1(n.__, n.__i + 1) : null;
42
+ for (var u; l < n.__k.length; l++) if (null != (u = n.__k[l]) && null != u.__e) return u.__e;
43
+ return "function" == typeof n.type ? $$1(n) : null;
44
+ }
45
+ function I(n) {
46
+ if (n.__P && n.__d) {
47
+ var u = n.__v, t = u.__e, i = [], r = [], o = m$3({}, u);
48
+ o.__v = u.__v + 1, l$3.vnode && l$3.vnode(o), q$2(n.__P, o, u, n.__n, n.__P.namespaceURI, 32 & u.__u ? [t] : null, i, null == t ? $$1(u) : t, !!(32 & u.__u), r), o.__v = u.__v, o.__.__k[o.__i] = o, D$1(i, o, r), u.__e = u.__ = null, o.__e != t && P$1(o);
49
+ }
50
+ }
51
+ function P$1(n) {
52
+ if (null != (n = n.__) && null != n.__c) return n.__e = n.__c.base = null, n.__k.some(function(l) {
53
+ if (null != l && null != l.__e) return n.__e = n.__c.base = l.__e;
54
+ }), P$1(n);
55
+ }
56
+ function A$2(n) {
57
+ (!n.__d && (n.__d = !0) && i$3.push(n) && !H$1.__r++ || r$2 != l$3.debounceRendering) && ((r$2 = l$3.debounceRendering) || o$3)(H$1);
58
+ }
59
+ function H$1() {
60
+ try {
61
+ for (var n, l = 1; i$3.length;) i$3.length > l && i$3.sort(e$2), n = i$3.shift(), l = i$3.length, I(n);
62
+ } finally {
63
+ i$3.length = H$1.__r = 0;
64
+ }
65
+ }
66
+ function L$1(n, l, u, t, i, r, o, e, f, c, a) {
67
+ var s, h, p, v, y, _, g, m = t && t.__k || w$3, b = l.length;
68
+ for (f = T$2(u, l, m, f, b), s = 0; s < b; s++) null != (p = u.__k[s]) && (h = -1 != p.__i && m[p.__i] || d$3, p.__i = s, _ = q$2(n, p, h, i, r, o, e, f, c, a), v = p.__e, p.ref && h.ref != p.ref && (h.ref && J$1(h.ref, null, p), a.push(p.ref, p.__c || v, p)), null == y && null != v && (y = v), (g = !!(4 & p.__u)) || h.__k === p.__k ? (f = j$3(p, f, n, g), g && h.__e && (h.__e = null)) : "function" == typeof p.type && void 0 !== _ ? f = _ : v && (f = v.nextSibling), p.__u &= -7);
69
+ return u.__e = y, f;
70
+ }
71
+ function T$2(n, l, u, t, i) {
72
+ var r, o, e, f, c, a = u.length, s = a, h = 0;
73
+ for (n.__k = new Array(i), r = 0; r < i; r++) null != (o = l[r]) && "boolean" != typeof o && "function" != typeof o ? ("string" == typeof o || "number" == typeof o || "bigint" == typeof o || o.constructor == String ? o = n.__k[r] = x$2(null, o, null, null, null) : g$4(o) ? o = n.__k[r] = x$2(S$1, { children: o }, null, null, null) : void 0 === o.constructor && o.__b > 0 ? o = n.__k[r] = x$2(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : n.__k[r] = o, f = r + h, o.__ = n, o.__b = n.__b + 1, e = null, -1 != (c = o.__i = O$1(o, u, f, s)) && (s--, (e = u[c]) && (e.__u |= 2)), null == e || null == e.__v ? (-1 == c && (i > a ? h-- : i < a && h++), "function" != typeof o.type && (o.__u |= 4)) : c != f && (c == f - 1 ? h-- : c == f + 1 ? h++ : (c > f ? h-- : h++, o.__u |= 4))) : n.__k[r] = null;
74
+ if (s) for (r = 0; r < a; r++) null != (e = u[r]) && 0 == (2 & e.__u) && (e.__e == t && (t = $$1(e)), K$1(e, e));
75
+ return t;
76
+ }
77
+ function j$3(n, l, u, t) {
78
+ var i, r;
79
+ if ("function" == typeof n.type) {
80
+ for (i = n.__k, r = 0; i && r < i.length; r++) i[r] && (i[r].__ = n, l = j$3(i[r], l, u, t));
81
+ return l;
82
+ }
83
+ n.__e != l && (t && (l && n.type && !l.parentNode && (l = $$1(n)), u.insertBefore(n.__e, l || null)), l = n.__e);
84
+ do
85
+ l = l && l.nextSibling;
86
+ while (null != l && 8 == l.nodeType);
87
+ return l;
88
+ }
89
+ function F$2(n, l) {
90
+ return l = l || [], null == n || "boolean" == typeof n || (g$4(n) ? n.some(function(n) {
91
+ F$2(n, l);
92
+ }) : l.push(n)), l;
93
+ }
94
+ function O$1(n, l, u, t) {
95
+ var i, r, o, e = n.key, f = n.type, c = l[u], a = null != c && 0 == (2 & c.__u);
96
+ if (null === c && null == e || a && e == c.key && f == c.type) return u;
97
+ if (t > (a ? 1 : 0)) {
98
+ for (i = u - 1, r = u + 1; i >= 0 || r < l.length;) if (null != (c = l[o = i >= 0 ? i-- : r++]) && 0 == (2 & c.__u) && e == c.key && f == c.type) return o;
99
+ }
100
+ return -1;
101
+ }
102
+ function z$1(n, l, u) {
103
+ "-" == l[0] ? n.setProperty(l, null == u ? "" : u) : n[l] = null == u ? "" : "number" != typeof u || _$3.test(l) ? u : u + "px";
104
+ }
105
+ function N(n, l, u, t, i) {
106
+ var r, o;
107
+ n: if ("style" == l) if ("string" == typeof u) n.style.cssText = u;
108
+ else {
109
+ if ("string" == typeof t && (n.style.cssText = t = ""), t) for (l in t) u && l in u || z$1(n.style, l, "");
110
+ if (u) for (l in u) t && u[l] == t[l] || z$1(n.style, l, u[l]);
111
+ }
112
+ else if ("o" == l[0] && "n" == l[1]) r = l != (l = l.replace(s$2, "$1")), o = l.toLowerCase(), l = o in n || "onFocusOut" == l || "onFocusIn" == l ? o.slice(2) : l.slice(2), n.l || (n.l = {}), n.l[l + r] = u, u ? t ? u[a$2] = t[a$2] : (u[a$2] = h$3, n.addEventListener(l, r ? v$2 : p$3, r)) : n.removeEventListener(l, r ? v$2 : p$3, r);
113
+ else {
114
+ if ("http://www.w3.org/2000/svg" == i) l = l.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
115
+ else if ("width" != l && "height" != l && "href" != l && "list" != l && "form" != l && "tabIndex" != l && "download" != l && "rowSpan" != l && "colSpan" != l && "role" != l && "popover" != l && l in n) try {
116
+ n[l] = null == u ? "" : u;
117
+ break n;
118
+ } catch (n) {}
119
+ "function" == typeof u || (null == u || !1 === u && "-" != l[4] ? n.removeAttribute(l) : n.setAttribute(l, "popover" == l && 1 == u ? "" : u));
120
+ }
121
+ }
122
+ function V$1(n) {
123
+ return function(u) {
124
+ if (this.l) {
125
+ var t = this.l[u.type + n];
126
+ if (null == u[c$2]) u[c$2] = h$3++;
127
+ else if (u[c$2] < t[a$2]) return;
128
+ return t(l$3.event ? l$3.event(u) : u);
129
+ }
130
+ };
131
+ }
132
+ function q$2(n, u, t, i, r, o, e, f, c, a) {
133
+ var s, h, p, v, y, d, _, k, x, M, $, I, P, A, H, T = u.type;
134
+ if (void 0 !== u.constructor) return null;
135
+ 128 & t.__u && (c = !!(32 & t.__u), o = [f = u.__e = t.__e]), (s = l$3.__b) && s(u);
136
+ n: if ("function" == typeof T) try {
137
+ if (k = u.props, x = T.prototype && T.prototype.render, M = (s = T.contextType) && i[s.__c], $ = s ? M ? M.props.value : s.__ : i, t.__c ? _ = (h = u.__c = t.__c).__ = h.__E : (x ? u.__c = h = new T(k, $) : (u.__c = h = new C$1(k, $), h.constructor = T, h.render = Q$1), M && M.sub(h), h.state || (h.state = {}), h.__n = i, p = h.__d = !0, h.__h = [], h._sb = []), x && null == h.__s && (h.__s = h.state), x && null != T.getDerivedStateFromProps && (h.__s == h.state && (h.__s = m$3({}, h.__s)), m$3(h.__s, T.getDerivedStateFromProps(k, h.__s))), v = h.props, y = h.state, h.__v = u, p) x && null == T.getDerivedStateFromProps && null != h.componentWillMount && h.componentWillMount(), x && null != h.componentDidMount && h.__h.push(h.componentDidMount);
138
+ else {
139
+ if (x && null == T.getDerivedStateFromProps && k !== v && null != h.componentWillReceiveProps && h.componentWillReceiveProps(k, $), u.__v == t.__v || !h.__e && null != h.shouldComponentUpdate && !1 === h.shouldComponentUpdate(k, h.__s, $)) {
140
+ u.__v != t.__v && (h.props = k, h.state = h.__s, h.__d = !1), u.__e = t.__e, u.__k = t.__k, u.__k.some(function(n) {
141
+ n && (n.__ = u);
142
+ }), w$3.push.apply(h.__h, h._sb), h._sb = [], h.__h.length && e.push(h);
143
+ break n;
144
+ }
145
+ null != h.componentWillUpdate && h.componentWillUpdate(k, h.__s, $), x && null != h.componentDidUpdate && h.__h.push(function() {
146
+ h.componentDidUpdate(v, y, d);
147
+ });
148
+ }
149
+ if (h.context = $, h.props = k, h.__P = n, h.__e = !1, I = l$3.__r, P = 0, x) h.state = h.__s, h.__d = !1, I && I(u), s = h.render(h.props, h.state, h.context), w$3.push.apply(h.__h, h._sb), h._sb = [];
150
+ else do
151
+ h.__d = !1, I && I(u), s = h.render(h.props, h.state, h.context), h.state = h.__s;
152
+ while (h.__d && ++P < 25);
153
+ h.state = h.__s, null != h.getChildContext && (i = m$3(m$3({}, i), h.getChildContext())), x && !p && null != h.getSnapshotBeforeUpdate && (d = h.getSnapshotBeforeUpdate(v, y)), A = null != s && s.type === S$1 && null == s.key ? E$2(s.props.children) : s, f = L$1(n, g$4(A) ? A : [A], u, t, i, r, o, e, f, c, a), h.base = u.__e, u.__u &= -161, h.__h.length && e.push(h), _ && (h.__E = h.__ = null);
154
+ } catch (n) {
155
+ if (u.__v = null, c || null != o) if (n.then) {
156
+ for (u.__u |= c ? 160 : 128; f && 8 == f.nodeType && f.nextSibling;) f = f.nextSibling;
157
+ o[o.indexOf(f)] = null, u.__e = f;
158
+ } else {
159
+ for (H = o.length; H--;) b$2(o[H]);
160
+ B$2(u);
161
+ }
162
+ else u.__e = t.__e, u.__k = t.__k, n.then || B$2(u);
163
+ l$3.__e(n, u, t);
164
+ }
165
+ else null == o && u.__v == t.__v ? (u.__k = t.__k, u.__e = t.__e) : f = u.__e = G$1(t.__e, u, t, i, r, o, e, c, a);
166
+ return (s = l$3.diffed) && s(u), 128 & u.__u ? void 0 : f;
167
+ }
168
+ function B$2(n) {
169
+ n && (n.__c && (n.__c.__e = !0), n.__k && n.__k.some(B$2));
170
+ }
171
+ function D$1(n, u, t) {
172
+ for (var i = 0; i < t.length; i++) J$1(t[i], t[++i], t[++i]);
173
+ l$3.__c && l$3.__c(u, n), n.some(function(u) {
174
+ try {
175
+ n = u.__h, u.__h = [], n.some(function(n) {
176
+ n.call(u);
177
+ });
178
+ } catch (n) {
179
+ l$3.__e(n, u.__v);
180
+ }
181
+ });
182
+ }
183
+ function E$2(n) {
184
+ return "object" != typeof n || null == n || n.__b > 0 ? n : g$4(n) ? n.map(E$2) : void 0 !== n.constructor ? null : m$3({}, n);
185
+ }
186
+ function G$1(u, t, i, r, o, e, f, c, a) {
187
+ var s, h, p, v, y, w, _, m = i.props || d$3, k = t.props, x = t.type;
188
+ if ("svg" == x ? o = "http://www.w3.org/2000/svg" : "math" == x ? o = "http://www.w3.org/1998/Math/MathML" : o || (o = "http://www.w3.org/1999/xhtml"), null != e) {
189
+ for (s = 0; s < e.length; s++) if ((y = e[s]) && "setAttribute" in y == !!x && (x ? y.localName == x : 3 == y.nodeType)) {
190
+ u = y, e[s] = null;
191
+ break;
192
+ }
193
+ }
194
+ if (null == u) {
195
+ if (null == x) return document.createTextNode(k);
196
+ u = document.createElementNS(o, x, k.is && k), c && (l$3.__m && l$3.__m(t, e), c = !1), e = null;
197
+ }
198
+ if (null == x) m === k || c && u.data == k || (u.data = k);
199
+ else {
200
+ if (e = "textarea" == x && null != k.defaultValue ? null : e && n$1.call(u.childNodes), !c && null != e) for (m = {}, s = 0; s < u.attributes.length; s++) m[(y = u.attributes[s]).name] = y.value;
201
+ for (s in m) y = m[s], "dangerouslySetInnerHTML" == s ? p = y : "children" == s || s in k || "value" == s && "defaultValue" in k || "checked" == s && "defaultChecked" in k || N(u, s, null, y, o);
202
+ for (s in k) y = k[s], "children" == s ? v = y : "dangerouslySetInnerHTML" == s ? h = y : "value" == s ? w = y : "checked" == s ? _ = y : c && "function" != typeof y || m[s] === y || N(u, s, y, m[s], o);
203
+ if (h) c || p && (h.__html == p.__html || h.__html == u.innerHTML) || (u.innerHTML = h.__html), t.__k = [];
204
+ else if (p && (u.innerHTML = ""), L$1("template" == t.type ? u.content : u, g$4(v) ? v : [v], t, i, r, "foreignObject" == x ? "http://www.w3.org/1999/xhtml" : o, e, f, e ? e[0] : i.__k && $$1(i, 0), c, a), null != e) for (s = e.length; s--;) b$2(e[s]);
205
+ c && "textarea" != x || (s = "value", "progress" == x && null == w ? u.removeAttribute("value") : null != w && (w !== u[s] || "progress" == x && !w || "option" == x && w != m[s]) && N(u, s, w, m[s], o), s = "checked", null != _ && _ != u[s] && N(u, s, _, m[s], o));
206
+ }
207
+ return u;
208
+ }
209
+ function J$1(n, u, t) {
210
+ try {
211
+ if ("function" == typeof n) {
212
+ var i = "function" == typeof n.__u;
213
+ i && n.__u(), i && null == u || (n.__u = n(u));
214
+ } else n.current = u;
215
+ } catch (n) {
216
+ l$3.__e(n, t);
217
+ }
218
+ }
219
+ function K$1(n, u, t) {
220
+ var i, r;
221
+ if (l$3.unmount && l$3.unmount(n), (i = n.ref) && (i.current && i.current != n.__e || J$1(i, null, u)), null != (i = n.__c)) {
222
+ if (i.componentWillUnmount) try {
223
+ i.componentWillUnmount();
224
+ } catch (n) {
225
+ l$3.__e(n, u);
226
+ }
227
+ i.base = i.__P = null;
228
+ }
229
+ if (i = n.__k) for (r = 0; r < i.length; r++) i[r] && K$1(i[r], u, t || "function" != typeof n.type);
230
+ t || b$2(n.__e), n.__c = n.__ = n.__e = void 0;
231
+ }
232
+ function Q$1(n, l, u) {
233
+ return this.constructor(n, u);
234
+ }
235
+ function R(u, t, i) {
236
+ var r, o, e, f;
237
+ t == document && (t = document.documentElement), l$3.__ && l$3.__(u, t), o = (r = "function" == typeof i) ? null : i && i.__k || t.__k, e = [], f = [], q$2(t, u = (!r && i || t).__k = k$2(S$1, null, [u]), o || d$3, d$3, t.namespaceURI, !r && i ? [i] : o ? null : t.firstChild ? n$1.call(t.childNodes) : null, e, !r && i ? i : o ? o.__e : t.firstChild, r, f), D$1(e, u, f);
238
+ }
239
+ function U$1(n, l) {
240
+ R(n, l, U$1);
241
+ }
242
+ function X$1(n) {
243
+ function l(n) {
244
+ var u, t;
245
+ return this.getChildContext || (u = /* @__PURE__ */ new Set(), (t = {})[l.__c] = this, this.getChildContext = function() {
246
+ return t;
247
+ }, this.componentWillUnmount = function() {
248
+ u = null;
249
+ }, this.shouldComponentUpdate = function(n) {
250
+ this.props.value != n.value && u.forEach(function(n) {
251
+ n.__e = !0, A$2(n);
252
+ });
253
+ }, this.sub = function(n) {
254
+ u.add(n);
255
+ var l = n.componentWillUnmount;
256
+ n.componentWillUnmount = function() {
257
+ u && u.delete(n), l && l.call(n);
258
+ };
259
+ }), n.children;
260
+ }
261
+ return l.__c = "__cC" + y$3++, l.__ = n, l.Provider = l.__l = (l.Consumer = function(n, l) {
262
+ return n.children(l);
263
+ }).contextType = l, l;
264
+ }
265
+ n$1 = w$3.slice, l$3 = { __e: function(n, l, u, t) {
266
+ for (var i, r, o; l = l.__;) if ((i = l.__c) && !i.__) try {
267
+ if ((r = i.constructor) && null != r.getDerivedStateFromError && (i.setState(r.getDerivedStateFromError(n)), o = i.__d), null != i.componentDidCatch && (i.componentDidCatch(n, t || {}), o = i.__d), o) return i.__E = i;
268
+ } catch (l) {
269
+ n = l;
270
+ }
271
+ throw n;
272
+ } }, u$3 = 0, t$2 = function(n) {
273
+ return null != n && void 0 === n.constructor;
274
+ }, C$1.prototype.setState = function(n, l) {
275
+ var u = null != this.__s && this.__s != this.state ? this.__s : this.__s = m$3({}, this.state);
276
+ "function" == typeof n && (n = n(m$3({}, u), this.props)), n && m$3(u, n), null != n && this.__v && (l && this._sb.push(l), A$2(this));
277
+ }, C$1.prototype.forceUpdate = function(n) {
278
+ this.__v && (this.__e = !0, n && this.__h.push(n), A$2(this));
279
+ }, C$1.prototype.render = S$1, i$3 = [], o$3 = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, e$2 = function(n, l) {
280
+ return n.__v.__b - l.__v.__b;
281
+ }, H$1.__r = 0, f$3 = Math.random().toString(8), c$2 = "__d" + f$3, a$2 = "__a" + f$3, s$2 = /(PointerCapture)$|Capture$/i, h$3 = 0, p$3 = V$1(!1), v$2 = V$1(!0), y$3 = 0;
282
+ //#endregion
283
+ //#region node_modules/.pnpm/preact@10.29.2/node_modules/preact/hooks/dist/hooks.module.js
284
+ var t$1, r$1, u$2, i$2, o$2 = 0, f$2 = [], c$1 = l$3, e$1 = c$1.__b, a$1 = c$1.__r, v$1 = c$1.diffed, l$2 = c$1.__c, m$2 = c$1.unmount, s$1 = c$1.__;
285
+ function p$2(n, t) {
286
+ c$1.__h && c$1.__h(r$1, n, o$2 || t), o$2 = 0;
287
+ var u = r$1.__H || (r$1.__H = {
288
+ __: [],
289
+ __h: []
290
+ });
291
+ return n >= u.__.length && u.__.push({}), u.__[n];
292
+ }
293
+ function d$2(n) {
294
+ return o$2 = 1, h$2(D, n);
295
+ }
296
+ function h$2(n, u, i) {
297
+ var o = p$2(t$1++, 2);
298
+ if (o.t = n, !o.__c && (o.__ = [i ? i(u) : D(void 0, u), function(n) {
299
+ var t = o.__N ? o.__N[0] : o.__[0], r = o.t(t, n);
300
+ t !== r && (o.__N = [r, o.__[1]], o.__c.setState({}));
301
+ }], o.__c = r$1, !r$1.__f)) {
302
+ var f = function(n, t, r) {
303
+ if (!o.__c.__H) return !0;
304
+ var u = o.__c.__H.__.filter(function(n) {
305
+ return n.__c;
306
+ });
307
+ if (u.every(function(n) {
308
+ return !n.__N;
309
+ })) return !c || c.call(this, n, t, r);
310
+ var i = o.__c.props !== n;
311
+ return u.some(function(n) {
312
+ if (n.__N) {
313
+ var t = n.__[0];
314
+ n.__ = n.__N, n.__N = void 0, t !== n.__[0] && (i = !0);
315
+ }
316
+ }), c && c.call(this, n, t, r) || i;
317
+ };
318
+ r$1.__f = !0;
319
+ var c = r$1.shouldComponentUpdate, e = r$1.componentWillUpdate;
320
+ r$1.componentWillUpdate = function(n, t, r) {
321
+ if (this.__e) {
322
+ var u = c;
323
+ c = void 0, f(n, t, r), c = u;
324
+ }
325
+ e && e.call(this, n, t, r);
326
+ }, r$1.shouldComponentUpdate = f;
327
+ }
328
+ return o.__N || o.__;
329
+ }
330
+ function y$2(n, u) {
331
+ var i = p$2(t$1++, 3);
332
+ !c$1.__s && C(i.__H, u) && (i.__ = n, i.u = u, r$1.__H.__h.push(i));
333
+ }
334
+ function _$2(n, u) {
335
+ var i = p$2(t$1++, 4);
336
+ !c$1.__s && C(i.__H, u) && (i.__ = n, i.u = u, r$1.__h.push(i));
337
+ }
338
+ function A$1(n) {
339
+ return o$2 = 5, T$1(function() {
340
+ return { current: n };
341
+ }, []);
342
+ }
343
+ function T$1(n, r) {
344
+ var u = p$2(t$1++, 7);
345
+ return C(u.__H, r) && (u.__ = n(), u.__H = r, u.__h = n), u.__;
346
+ }
347
+ function g$3() {
348
+ var n = p$2(t$1++, 11);
349
+ if (!n.__) {
350
+ for (var u = r$1.__v; null !== u && !u.__m && null !== u.__;) u = u.__;
351
+ var i = u.__m || (u.__m = [0, 0]);
352
+ n.__ = "P" + i[0] + "-" + i[1]++;
353
+ }
354
+ return n.__;
355
+ }
356
+ function j$2() {
357
+ for (var n; n = f$2.shift();) {
358
+ var t = n.__H;
359
+ if (n.__P && t) try {
360
+ t.__h.some(z), t.__h.some(B$1), t.__h = [];
361
+ } catch (r) {
362
+ t.__h = [], c$1.__e(r, n.__v);
363
+ }
364
+ }
365
+ }
366
+ c$1.__b = function(n) {
367
+ r$1 = null, e$1 && e$1(n);
368
+ }, c$1.__ = function(n, t) {
369
+ n && t.__k && t.__k.__m && (n.__m = t.__k.__m), s$1 && s$1(n, t);
370
+ }, c$1.__r = function(n) {
371
+ a$1 && a$1(n), t$1 = 0;
372
+ var i = (r$1 = n.__c).__H;
373
+ i && (u$2 === r$1 ? (i.__h = [], r$1.__h = [], i.__.some(function(n) {
374
+ n.__N && (n.__ = n.__N), n.u = n.__N = void 0;
375
+ })) : (i.__h.some(z), i.__h.some(B$1), i.__h = [], t$1 = 0)), u$2 = r$1;
376
+ }, c$1.diffed = function(n) {
377
+ v$1 && v$1(n);
378
+ var t = n.__c;
379
+ t && t.__H && (t.__H.__h.length && (1 !== f$2.push(t) && i$2 === c$1.requestAnimationFrame || ((i$2 = c$1.requestAnimationFrame) || w$2)(j$2)), t.__H.__.some(function(n) {
380
+ n.u && (n.__H = n.u), n.u = void 0;
381
+ })), u$2 = r$1 = null;
382
+ }, c$1.__c = function(n, t) {
383
+ t.some(function(n) {
384
+ try {
385
+ n.__h.some(z), n.__h = n.__h.filter(function(n) {
386
+ return !n.__ || B$1(n);
387
+ });
388
+ } catch (r) {
389
+ t.some(function(n) {
390
+ n.__h && (n.__h = []);
391
+ }), t = [], c$1.__e(r, n.__v);
392
+ }
393
+ }), l$2 && l$2(n, t);
394
+ }, c$1.unmount = function(n) {
395
+ m$2 && m$2(n);
396
+ var t, r = n.__c;
397
+ r && r.__H && (r.__H.__.some(function(n) {
398
+ try {
399
+ z(n);
400
+ } catch (n) {
401
+ t = n;
402
+ }
403
+ }), r.__H = void 0, t && c$1.__e(t, r.__v));
404
+ };
405
+ var k$1 = "function" == typeof requestAnimationFrame;
406
+ function w$2(n) {
407
+ var t, r = function() {
408
+ clearTimeout(u), k$1 && cancelAnimationFrame(t), setTimeout(n);
409
+ }, u = setTimeout(r, 35);
410
+ k$1 && (t = requestAnimationFrame(r));
411
+ }
412
+ function z(n) {
413
+ var t = r$1, u = n.__c;
414
+ "function" == typeof u && (n.__c = void 0, u()), r$1 = t;
415
+ }
416
+ function B$1(n) {
417
+ var t = r$1;
418
+ n.__c = n.__(), r$1 = t;
419
+ }
420
+ function C(n, t) {
421
+ return !n || n.length !== t.length || t.some(function(t, r) {
422
+ return t !== n[r];
423
+ });
424
+ }
425
+ function D(n, t) {
426
+ return "function" == typeof t ? t(n) : t;
427
+ }
428
+ //#endregion
429
+ //#region node_modules/.pnpm/@preact+signals-core@1.14.3/node_modules/@preact/signals-core/dist/signals-core.module.js
430
+ var i$1 = Symbol.for("preact-signals");
431
+ function t() {
432
+ if (!(s > 1)) {
433
+ var i, t = !1;
434
+ (function() {
435
+ var i = c;
436
+ c = void 0;
437
+ while (void 0 !== i) {
438
+ if (i.S.v === i.v) i.S.i = i.i;
439
+ i = i.o;
440
+ }
441
+ })();
442
+ while (void 0 !== h$1) {
443
+ var n = h$1;
444
+ h$1 = void 0;
445
+ v++;
446
+ while (void 0 !== n) {
447
+ var r = n.u;
448
+ n.u = void 0;
449
+ n.f &= -3;
450
+ if (!(8 & n.f) && w$1(n)) try {
451
+ n.c();
452
+ } catch (n) {
453
+ if (!t) {
454
+ i = n;
455
+ t = !0;
456
+ }
457
+ }
458
+ n = r;
459
+ }
460
+ }
461
+ v = 0;
462
+ s--;
463
+ if (t) throw i;
464
+ } else s--;
465
+ }
466
+ function n(i) {
467
+ if (s > 0) return i();
468
+ e = ++u$1;
469
+ s++;
470
+ try {
471
+ return i();
472
+ } finally {
473
+ t();
474
+ }
475
+ }
476
+ var r = void 0;
477
+ function o$1(i) {
478
+ var t = r;
479
+ r = void 0;
480
+ try {
481
+ return i();
482
+ } finally {
483
+ r = t;
484
+ }
485
+ }
486
+ var f$1, h$1 = void 0, s = 0, v = 0, u$1 = 0, e = 0, c = void 0, d$1 = 0;
487
+ function a(i) {
488
+ if (void 0 !== r) {
489
+ var t = i.n;
490
+ if (void 0 === t || t.t !== r) {
491
+ t = {
492
+ i: 0,
493
+ S: i,
494
+ p: r.s,
495
+ n: void 0,
496
+ t: r,
497
+ e: void 0,
498
+ x: void 0,
499
+ r: t
500
+ };
501
+ if (void 0 !== r.s) r.s.n = t;
502
+ r.s = t;
503
+ i.n = t;
504
+ if (32 & r.f) i.S(t);
505
+ return t;
506
+ } else if (-1 === t.i) {
507
+ t.i = 0;
508
+ if (void 0 !== t.n) {
509
+ t.n.p = t.p;
510
+ if (void 0 !== t.p) t.p.n = t.n;
511
+ t.p = r.s;
512
+ t.n = void 0;
513
+ r.s.n = t;
514
+ r.s = t;
515
+ }
516
+ return t;
517
+ }
518
+ }
519
+ }
520
+ function l$1(i, t) {
521
+ this.v = i;
522
+ this.i = 0;
523
+ this.n = void 0;
524
+ this.t = void 0;
525
+ this.l = 0;
526
+ this.W = null == t ? void 0 : t.watched;
527
+ this.Z = null == t ? void 0 : t.unwatched;
528
+ this.name = null == t ? void 0 : t.name;
529
+ }
530
+ l$1.prototype.brand = i$1;
531
+ l$1.prototype.h = function() {
532
+ return !0;
533
+ };
534
+ l$1.prototype.S = function(i) {
535
+ var t = this, n = this.t;
536
+ if (n !== i && void 0 === i.e) {
537
+ i.x = n;
538
+ this.t = i;
539
+ if (void 0 !== n) n.e = i;
540
+ else o$1(function() {
541
+ var i;
542
+ null == (i = t.W) || i.call(t);
543
+ });
544
+ }
545
+ };
546
+ l$1.prototype.U = function(i) {
547
+ var t = this;
548
+ if (void 0 !== this.t) {
549
+ var n = i.e, r = i.x;
550
+ if (void 0 !== n) {
551
+ n.x = r;
552
+ i.e = void 0;
553
+ }
554
+ if (void 0 !== r) {
555
+ r.e = n;
556
+ i.x = void 0;
557
+ }
558
+ if (i === this.t) {
559
+ this.t = r;
560
+ if (void 0 === r) o$1(function() {
561
+ var i;
562
+ null == (i = t.Z) || i.call(t);
563
+ });
564
+ }
565
+ }
566
+ };
567
+ l$1.prototype.subscribe = function(i) {
568
+ var t = this;
569
+ return j$1(function() {
570
+ var n = t.value;
571
+ o$1(function() {
572
+ return i(n);
573
+ });
574
+ }, { name: "sub" });
575
+ };
576
+ l$1.prototype.valueOf = function() {
577
+ return this.value;
578
+ };
579
+ l$1.prototype.toString = function() {
580
+ return this.value + "";
581
+ };
582
+ l$1.prototype.toJSON = function() {
583
+ return this.value;
584
+ };
585
+ l$1.prototype.peek = function() {
586
+ var i = this;
587
+ return o$1(function() {
588
+ return i.value;
589
+ });
590
+ };
591
+ Object.defineProperty(l$1.prototype, "value", {
592
+ get: function() {
593
+ var i = a(this);
594
+ if (void 0 !== i) i.i = this.i;
595
+ return this.v;
596
+ },
597
+ set: function(i) {
598
+ if (i !== this.v) {
599
+ if (v > 100) throw new Error("Cycle detected");
600
+ (function(i) {
601
+ if (0 !== s && 0 === v) {
602
+ if (i.l !== e) {
603
+ i.l = e;
604
+ c = {
605
+ S: i,
606
+ v: i.v,
607
+ i: i.i,
608
+ o: c
609
+ };
610
+ }
611
+ }
612
+ })(this);
613
+ this.v = i;
614
+ this.i++;
615
+ d$1++;
616
+ s++;
617
+ try {
618
+ for (var n = this.t; void 0 !== n; n = n.x) n.t.N();
619
+ } finally {
620
+ t();
621
+ }
622
+ }
623
+ }
624
+ });
625
+ function y$1(i, t) {
626
+ return new l$1(i, t);
627
+ }
628
+ function w$1(i) {
629
+ for (var t = i.s; void 0 !== t; t = t.n) if (t.S.i !== t.i || !t.S.h() || t.S.i !== t.i) return !0;
630
+ return !1;
631
+ }
632
+ function _$1(i) {
633
+ for (var t = i.s; void 0 !== t; t = t.n) {
634
+ var n = t.S.n;
635
+ if (void 0 !== n) t.r = n;
636
+ t.S.n = t;
637
+ t.i = -1;
638
+ if (void 0 === t.n) {
639
+ i.s = t;
640
+ break;
641
+ }
642
+ }
643
+ }
644
+ function b$1(i) {
645
+ var t = i.s, n = void 0;
646
+ while (void 0 !== t) {
647
+ var r = t.p;
648
+ if (-1 === t.i) {
649
+ t.S.U(t);
650
+ if (void 0 !== r) r.n = t.n;
651
+ if (void 0 !== t.n) t.n.p = r;
652
+ } else n = t;
653
+ t.S.n = t.r;
654
+ if (void 0 !== t.r) t.r = void 0;
655
+ t = r;
656
+ }
657
+ i.s = n;
658
+ }
659
+ function p$1(i, t) {
660
+ l$1.call(this, void 0, t);
661
+ this.x = i;
662
+ this.s = void 0;
663
+ this.g = d$1 - 1;
664
+ this.f = 4;
665
+ }
666
+ p$1.prototype = new l$1();
667
+ p$1.prototype.h = function() {
668
+ this.f &= -3;
669
+ if (1 & this.f) return !1;
670
+ if (32 == (36 & this.f)) return !0;
671
+ this.f &= -5;
672
+ if (this.g === d$1) return !0;
673
+ this.g = d$1;
674
+ this.f |= 1;
675
+ if (this.i > 0 && !w$1(this)) {
676
+ this.f &= -2;
677
+ return !0;
678
+ }
679
+ var i = r;
680
+ try {
681
+ _$1(this);
682
+ r = this;
683
+ var t = this.x();
684
+ if (16 & this.f || this.v !== t || 0 === this.i) {
685
+ this.v = t;
686
+ this.f &= -17;
687
+ this.i++;
688
+ }
689
+ } catch (i) {
690
+ this.v = i;
691
+ this.f |= 16;
692
+ this.i++;
693
+ }
694
+ r = i;
695
+ b$1(this);
696
+ this.f &= -2;
697
+ return !0;
698
+ };
699
+ p$1.prototype.S = function(i) {
700
+ if (void 0 === this.t) {
701
+ this.f |= 36;
702
+ for (var t = this.s; void 0 !== t; t = t.n) t.S.S(t);
703
+ }
704
+ l$1.prototype.S.call(this, i);
705
+ };
706
+ p$1.prototype.U = function(i) {
707
+ if (void 0 !== this.t) {
708
+ l$1.prototype.U.call(this, i);
709
+ if (void 0 === this.t) {
710
+ this.f &= -33;
711
+ for (var t = this.s; void 0 !== t; t = t.n) t.S.U(t);
712
+ }
713
+ }
714
+ };
715
+ p$1.prototype.N = function() {
716
+ if (!(2 & this.f)) {
717
+ this.f |= 6;
718
+ for (var i = this.t; void 0 !== i; i = i.x) i.t.N();
719
+ }
720
+ };
721
+ Object.defineProperty(p$1.prototype, "value", { get: function() {
722
+ if (1 & this.f) throw new Error("Cycle detected");
723
+ var i = a(this);
724
+ this.h();
725
+ if (void 0 !== i) i.i = this.i;
726
+ if (16 & this.f) throw this.v;
727
+ return this.v;
728
+ } });
729
+ function g$2(i, t) {
730
+ return new p$1(i, t);
731
+ }
732
+ function S(i) {
733
+ var n = i.m;
734
+ i.m = void 0;
735
+ if ("function" == typeof n) {
736
+ s++;
737
+ var o = r;
738
+ r = void 0;
739
+ try {
740
+ n();
741
+ } catch (t) {
742
+ i.f &= -2;
743
+ i.f |= 8;
744
+ m$1(i);
745
+ throw t;
746
+ } finally {
747
+ r = o;
748
+ t();
749
+ }
750
+ }
751
+ }
752
+ function m$1(i) {
753
+ for (var t = i.s; void 0 !== t; t = t.n) t.S.U(t);
754
+ i.x = void 0;
755
+ i.s = void 0;
756
+ S(i);
757
+ }
758
+ function x$1(i) {
759
+ if (r !== this) throw new Error("Out-of-order effect");
760
+ b$1(this);
761
+ r = i;
762
+ this.f &= -2;
763
+ if (8 & this.f) m$1(this);
764
+ t();
765
+ }
766
+ function E$1(i, t) {
767
+ this.x = i;
768
+ this.m = void 0;
769
+ this.s = void 0;
770
+ this.u = void 0;
771
+ this.f = 32;
772
+ this.name = null == t ? void 0 : t.name;
773
+ if (f$1) f$1.push(this);
774
+ }
775
+ E$1.prototype.c = function() {
776
+ var i = this.S();
777
+ try {
778
+ if (8 & this.f) return;
779
+ if (void 0 === this.x) return;
780
+ var t = this.x();
781
+ if ("function" == typeof t) this.m = t;
782
+ } finally {
783
+ i();
784
+ }
785
+ };
786
+ E$1.prototype.S = function() {
787
+ if (1 & this.f) throw new Error("Cycle detected");
788
+ this.f |= 1;
789
+ this.f &= -9;
790
+ S(this);
791
+ _$1(this);
792
+ s++;
793
+ var i = r;
794
+ r = this;
795
+ return x$1.bind(this, i);
796
+ };
797
+ E$1.prototype.N = function() {
798
+ if (!(2 & this.f)) {
799
+ this.f |= 2;
800
+ this.u = h$1;
801
+ h$1 = this;
802
+ }
803
+ };
804
+ E$1.prototype.d = function() {
805
+ this.f |= 8;
806
+ if (!(1 & this.f)) m$1(this);
807
+ };
808
+ E$1.prototype.dispose = function() {
809
+ this.d();
810
+ };
811
+ function j$1(i, t) {
812
+ var n = new E$1(i, t);
813
+ try {
814
+ n.c();
815
+ } catch (i) {
816
+ n.d();
817
+ throw i;
818
+ }
819
+ var r = n.d.bind(n);
820
+ r[Symbol.dispose] = r;
821
+ return r;
822
+ }
823
+ //#endregion
824
+ //#region node_modules/.pnpm/@preact+signals@2.9.2_preact@10.29.2/node_modules/@preact/signals/dist/signals.module.js
825
+ var l, h, p = "undefined" != typeof window && !!window.__PREACT_SIGNALS_DEVTOOLS__, _ = [];
826
+ j$1(function() {
827
+ l = this.N;
828
+ })();
829
+ function g$1(i, r) {
830
+ l$3[i] = r.bind(null, l$3[i] || function() {});
831
+ }
832
+ function b(i) {
833
+ if (h) {
834
+ var n = h;
835
+ h = void 0;
836
+ n();
837
+ }
838
+ h = i && i.S();
839
+ }
840
+ function y(i) {
841
+ var n = this, t = i.data, f = useSignal(t);
842
+ f.value = t;
843
+ var e = T$1(function() {
844
+ var i = n, t = n.__v;
845
+ while (t = t.__) if (t.__c) {
846
+ t.__c.__$f |= 4;
847
+ break;
848
+ }
849
+ var o = g$2(function() {
850
+ var i = f.value.value;
851
+ return 0 === i ? 0 : !0 === i ? "" : i || "";
852
+ }), e = g$2(function() {
853
+ return !Array.isArray(o.value) && !t$2(o.value);
854
+ }), a = j$1(function() {
855
+ this.N = F$1;
856
+ if (e.value) {
857
+ var n = o.value;
858
+ if (i.__v && i.__v.__e && 3 === i.__v.__e.nodeType) i.__v.__e.data = n;
859
+ }
860
+ }), v = n.__$u.d;
861
+ n.__$u.d = function() {
862
+ a();
863
+ v.call(this);
864
+ };
865
+ return [e, o];
866
+ }, []), a = e[0], v = e[1];
867
+ return a.value ? v.peek() : v.value;
868
+ }
869
+ y.displayName = "ReactiveTextNode";
870
+ Object.defineProperties(l$1.prototype, {
871
+ constructor: {
872
+ configurable: !0,
873
+ value: void 0
874
+ },
875
+ type: {
876
+ configurable: !0,
877
+ value: y
878
+ },
879
+ props: {
880
+ configurable: !0,
881
+ get: function() {
882
+ var i = this;
883
+ return { data: { get value() {
884
+ return i.value;
885
+ } } };
886
+ }
887
+ },
888
+ __b: {
889
+ configurable: !0,
890
+ value: 1
891
+ }
892
+ });
893
+ g$1("__b", function(i, n) {
894
+ if ("string" == typeof n.type) {
895
+ var r, t = n.props;
896
+ for (var o in t) if ("children" !== o) {
897
+ var f = t[o];
898
+ if (f instanceof l$1) {
899
+ if (!r) n.__np = r = {};
900
+ r[o] = f;
901
+ t[o] = f.peek();
902
+ }
903
+ }
904
+ }
905
+ i(n);
906
+ });
907
+ g$1("__r", function(i, n) {
908
+ i(n);
909
+ if (n.type !== S$1) {
910
+ b();
911
+ var r, o = n.__c;
912
+ if (o) {
913
+ o.__$f &= -2;
914
+ if (void 0 === (r = o.__$u)) o.__$u = r = function(i, n) {
915
+ var r;
916
+ j$1(function() {
917
+ r = this;
918
+ }, { name: n });
919
+ r.c = i;
920
+ return r;
921
+ }(function() {
922
+ var i;
923
+ if (p) null == (i = r.y) || i.call(r);
924
+ o.__$f |= 1;
925
+ o.setState({});
926
+ }, "function" == typeof n.type ? n.type.displayName || n.type.name : "");
927
+ }
928
+ b(r);
929
+ }
930
+ });
931
+ g$1("__e", function(i, n, r, t) {
932
+ b();
933
+ i(n, r, t);
934
+ });
935
+ g$1("diffed", function(i, n) {
936
+ b();
937
+ var r;
938
+ if ("string" == typeof n.type && (r = n.__e)) {
939
+ var t = n.__np, o = n.props;
940
+ if (t) {
941
+ var f = r.U;
942
+ if (f) for (var e in f) {
943
+ var u = f[e];
944
+ if (void 0 !== u && !(e in t)) {
945
+ u.d();
946
+ f[e] = void 0;
947
+ }
948
+ }
949
+ else {
950
+ f = {};
951
+ r.U = f;
952
+ }
953
+ for (var a in t) {
954
+ var c = f[a], v = t[a];
955
+ if (void 0 === c) {
956
+ c = w(r, a, v, o);
957
+ f[a] = c;
958
+ } else c.o(v, o);
959
+ }
960
+ }
961
+ }
962
+ i(n);
963
+ });
964
+ function w(i, n, r, t) {
965
+ var o = n in i && void 0 === i.ownerSVGElement, f = y$1(r);
966
+ return {
967
+ o: function(i, n) {
968
+ f.value = i;
969
+ t = n;
970
+ },
971
+ d: j$1(function() {
972
+ this.N = F$1;
973
+ var r = f.value.value;
974
+ if (t[n] !== r) {
975
+ t[n] = r;
976
+ if (o) i[n] = r;
977
+ else if (null != r && (!1 !== r || "-" === n[4])) i.setAttribute(n, r);
978
+ else i.removeAttribute(n);
979
+ }
980
+ })
981
+ };
982
+ }
983
+ g$1("unmount", function(i, n) {
984
+ if ("string" == typeof n.type) {
985
+ var r = n.__e;
986
+ if (r) {
987
+ var t = r.U;
988
+ if (t) {
989
+ r.U = void 0;
990
+ for (var o in t) {
991
+ var f = t[o];
992
+ if (f) f.d();
993
+ }
994
+ }
995
+ }
996
+ var e = n.__np;
997
+ if (e) {
998
+ var u = n.props;
999
+ for (var a in e) u[a] = e[a];
1000
+ }
1001
+ n.__np = void 0;
1002
+ } else {
1003
+ var c = n.__c;
1004
+ if (c) {
1005
+ var v = c.__$u;
1006
+ if (v) {
1007
+ c.__$u = void 0;
1008
+ v.d();
1009
+ }
1010
+ }
1011
+ }
1012
+ i(n);
1013
+ });
1014
+ g$1("__h", function(i, n, r, t) {
1015
+ if (t < 3 || 9 === t) n.__$f |= 2;
1016
+ i(n, r, t);
1017
+ });
1018
+ C$1.prototype.shouldComponentUpdate = function(i, n) {
1019
+ if (this.__R) return !0;
1020
+ var r = this.__$u, t = r && void 0 !== r.s;
1021
+ for (var o in n) return !0;
1022
+ if (this.__f || "boolean" == typeof this.u && !0 === this.u) {
1023
+ var f = 2 & this.__$f;
1024
+ if (!(t || f || 4 & this.__$f)) return !0;
1025
+ if (1 & this.__$f) return !0;
1026
+ } else {
1027
+ if (!(t || 4 & this.__$f)) return !0;
1028
+ if (3 & this.__$f) return !0;
1029
+ }
1030
+ for (var e in i) if ("__source" !== e && i[e] !== this.props[e]) return !0;
1031
+ for (var u in this.props) if (!(u in i)) return !0;
1032
+ return !1;
1033
+ };
1034
+ function useSignal(i, n) {
1035
+ return T$1(function() {
1036
+ return y$1(i, n);
1037
+ }, []);
1038
+ }
1039
+ var q$1 = function(i) {
1040
+ queueMicrotask(function() {
1041
+ queueMicrotask(i);
1042
+ });
1043
+ };
1044
+ function x() {
1045
+ n(function() {
1046
+ var i;
1047
+ while (i = _.shift()) l.call(i);
1048
+ });
1049
+ }
1050
+ function F$1() {
1051
+ if (1 === _.push(this)) (l$3.requestAnimationFrame || q$1)(x);
1052
+ }
1053
+ //#endregion
1054
+ //#region node_modules/.pnpm/preact@10.29.2/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
1055
+ var f = 0;
1056
+ Array.isArray;
1057
+ function u(e, t, n, o, i, u) {
1058
+ t || (t = {});
1059
+ var a, c, p = t;
1060
+ if ("ref" in p) for (c in p = {}, t) "ref" == c ? a = t[c] : p[c] = t[c];
1061
+ var l = {
1062
+ type: e,
1063
+ props: p,
1064
+ key: n,
1065
+ ref: a,
1066
+ __k: null,
1067
+ __: null,
1068
+ __b: 0,
1069
+ __e: null,
1070
+ __c: null,
1071
+ constructor: void 0,
1072
+ __v: --f,
1073
+ __i: -1,
1074
+ __u: 0,
1075
+ __source: i,
1076
+ __self: u
1077
+ };
1078
+ if ("function" == typeof e && (a = e.defaultProps)) for (c in a) void 0 === p[c] && (p[c] = a[c]);
1079
+ return l$3.vnode && l$3.vnode(l), l;
1080
+ }
1081
+ /*!
1082
+ * tabbable 6.4.0
1083
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
1084
+ */
1085
+ var candidateSelector = /* @__PURE__ */ [
1086
+ "input:not([inert]):not([inert] *)",
1087
+ "select:not([inert]):not([inert] *)",
1088
+ "textarea:not([inert]):not([inert] *)",
1089
+ "a[href]:not([inert]):not([inert] *)",
1090
+ "button:not([inert]):not([inert] *)",
1091
+ "[tabindex]:not(slot):not([inert]):not([inert] *)",
1092
+ "audio[controls]:not([inert]):not([inert] *)",
1093
+ "video[controls]:not([inert]):not([inert] *)",
1094
+ "[contenteditable]:not([contenteditable=\"false\"]):not([inert]):not([inert] *)",
1095
+ "details>summary:first-of-type:not([inert]):not([inert] *)",
1096
+ "details:not([inert]):not([inert] *)"
1097
+ ].join(",");
1098
+ var NoElement = typeof Element === "undefined";
1099
+ var matches = NoElement ? function() {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
1100
+ var getRootNode = !NoElement && Element.prototype.getRootNode ? function(element) {
1101
+ var _element$getRootNode;
1102
+ return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);
1103
+ } : function(element) {
1104
+ return element === null || element === void 0 ? void 0 : element.ownerDocument;
1105
+ };
1106
+ /**
1107
+ * Determines if a node is inert or in an inert ancestor.
1108
+ * @param {Node} [node]
1109
+ * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to
1110
+ * see if any of them are inert. If false, only `node` itself is considered.
1111
+ * @returns {boolean} True if inert itself or by way of being in an inert ancestor.
1112
+ * False if `node` is falsy.
1113
+ */
1114
+ var _isInert = function isInert(node, lookUp) {
1115
+ var _node$getAttribute;
1116
+ if (lookUp === void 0) lookUp = true;
1117
+ var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, "inert");
1118
+ return inertAtt === "" || inertAtt === "true" || lookUp && node && (typeof node.closest === "function" ? node.closest("[inert]") : _isInert(node.parentNode));
1119
+ };
1120
+ /**
1121
+ * Determines if a node's content is editable.
1122
+ * @param {Element} [node]
1123
+ * @returns True if it's content-editable; false if it's not or `node` is falsy.
1124
+ */
1125
+ var isContentEditable = function isContentEditable(node) {
1126
+ var _node$getAttribute2;
1127
+ var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, "contenteditable");
1128
+ return attValue === "" || attValue === "true";
1129
+ };
1130
+ /**
1131
+ * @param {Element} el container to check in
1132
+ * @param {boolean} includeContainer add container to check
1133
+ * @param {(node: Element) => boolean} filter filter candidates
1134
+ * @returns {Element[]}
1135
+ */
1136
+ var getCandidates = function getCandidates(el, includeContainer, filter) {
1137
+ if (_isInert(el)) return [];
1138
+ var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
1139
+ if (includeContainer && matches.call(el, candidateSelector)) candidates.unshift(el);
1140
+ candidates = candidates.filter(filter);
1141
+ return candidates;
1142
+ };
1143
+ /**
1144
+ * @callback GetShadowRoot
1145
+ * @param {Element} element to check for shadow root
1146
+ * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.
1147
+ */
1148
+ /**
1149
+ * @callback ShadowRootFilter
1150
+ * @param {Element} shadowHostNode the element which contains shadow content
1151
+ * @returns {boolean} true if a shadow root could potentially contain valid candidates.
1152
+ */
1153
+ /**
1154
+ * @typedef {Object} CandidateScope
1155
+ * @property {Element} scopeParent contains inner candidates
1156
+ * @property {Element[]} candidates list of candidates found in the scope parent
1157
+ */
1158
+ /**
1159
+ * @typedef {Object} IterativeOptions
1160
+ * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;
1161
+ * if a function, implies shadow support is enabled and either returns the shadow root of an element
1162
+ * or a boolean stating if it has an undisclosed shadow root
1163
+ * @property {(node: Element) => boolean} filter filter candidates
1164
+ * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list
1165
+ * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;
1166
+ */
1167
+ /**
1168
+ * @param {Element[]} elements list of element containers to match candidates from
1169
+ * @param {boolean} includeContainer add container list to check
1170
+ * @param {IterativeOptions} options
1171
+ * @returns {Array.<Element|CandidateScope>}
1172
+ */
1173
+ var _getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {
1174
+ var candidates = [];
1175
+ var elementsToCheck = Array.from(elements);
1176
+ while (elementsToCheck.length) {
1177
+ var element = elementsToCheck.shift();
1178
+ if (_isInert(element, false)) continue;
1179
+ if (element.tagName === "SLOT") {
1180
+ var assigned = element.assignedElements();
1181
+ var nestedCandidates = _getCandidatesIteratively(assigned.length ? assigned : element.children, true, options);
1182
+ if (options.flatten) candidates.push.apply(candidates, nestedCandidates);
1183
+ else candidates.push({
1184
+ scopeParent: element,
1185
+ candidates: nestedCandidates
1186
+ });
1187
+ } else {
1188
+ if (matches.call(element, candidateSelector) && options.filter(element) && (includeContainer || !elements.includes(element))) candidates.push(element);
1189
+ var shadowRoot = element.shadowRoot || typeof options.getShadowRoot === "function" && options.getShadowRoot(element);
1190
+ var validShadowRoot = !_isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));
1191
+ if (shadowRoot && validShadowRoot) {
1192
+ var _nestedCandidates = _getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);
1193
+ if (options.flatten) candidates.push.apply(candidates, _nestedCandidates);
1194
+ else candidates.push({
1195
+ scopeParent: element,
1196
+ candidates: _nestedCandidates
1197
+ });
1198
+ } else elementsToCheck.unshift.apply(elementsToCheck, element.children);
1199
+ }
1200
+ }
1201
+ return candidates;
1202
+ };
1203
+ /**
1204
+ * @private
1205
+ * Determines if the node has an explicitly specified `tabindex` attribute.
1206
+ * @param {HTMLElement} node
1207
+ * @returns {boolean} True if so; false if not.
1208
+ */
1209
+ var hasTabIndex = function hasTabIndex(node) {
1210
+ return !isNaN(parseInt(node.getAttribute("tabindex"), 10));
1211
+ };
1212
+ /**
1213
+ * Determine the tab index of a given node.
1214
+ * @param {HTMLElement} node
1215
+ * @returns {number} Tab order (negative, 0, or positive number).
1216
+ * @throws {Error} If `node` is falsy.
1217
+ */
1218
+ var getTabIndex = function getTabIndex(node) {
1219
+ if (!node) throw new Error("No node provided");
1220
+ if (node.tabIndex < 0) {
1221
+ if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) return 0;
1222
+ }
1223
+ return node.tabIndex;
1224
+ };
1225
+ /**
1226
+ * Determine the tab index of a given node __for sort order purposes__.
1227
+ * @param {HTMLElement} node
1228
+ * @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,
1229
+ * has tabIndex -1, but needs to be sorted by document order in order for its content to be
1230
+ * inserted into the correct sort position.
1231
+ * @returns {number} Tab order (negative, 0, or positive number).
1232
+ */
1233
+ var getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {
1234
+ var tabIndex = getTabIndex(node);
1235
+ if (tabIndex < 0 && isScope && !hasTabIndex(node)) return 0;
1236
+ return tabIndex;
1237
+ };
1238
+ var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
1239
+ return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
1240
+ };
1241
+ var isInput = function isInput(node) {
1242
+ return node.tagName === "INPUT";
1243
+ };
1244
+ var isHiddenInput = function isHiddenInput(node) {
1245
+ return isInput(node) && node.type === "hidden";
1246
+ };
1247
+ var isDetailsWithSummary = function isDetailsWithSummary(node) {
1248
+ return node.tagName === "DETAILS" && Array.prototype.slice.apply(node.children).some(function(child) {
1249
+ return child.tagName === "SUMMARY";
1250
+ });
1251
+ };
1252
+ var getCheckedRadio = function getCheckedRadio(nodes, form) {
1253
+ for (var i = 0; i < nodes.length; i++) if (nodes[i].checked && nodes[i].form === form) return nodes[i];
1254
+ };
1255
+ var isTabbableRadio = function isTabbableRadio(node) {
1256
+ if (!node.name) return true;
1257
+ var radioScope = node.form || getRootNode(node);
1258
+ var queryRadios = function queryRadios(name) {
1259
+ return radioScope.querySelectorAll("input[type=\"radio\"][name=\"" + name + "\"]");
1260
+ };
1261
+ var radioSet;
1262
+ if (typeof window !== "undefined" && typeof window.CSS !== "undefined" && typeof window.CSS.escape === "function") radioSet = queryRadios(window.CSS.escape(node.name));
1263
+ else try {
1264
+ radioSet = queryRadios(node.name);
1265
+ } catch (err) {
1266
+ console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", err.message);
1267
+ return false;
1268
+ }
1269
+ var checked = getCheckedRadio(radioSet, node.form);
1270
+ return !checked || checked === node;
1271
+ };
1272
+ var isRadio = function isRadio(node) {
1273
+ return isInput(node) && node.type === "radio";
1274
+ };
1275
+ var isNonTabbableRadio = function isNonTabbableRadio(node) {
1276
+ return isRadio(node) && !isTabbableRadio(node);
1277
+ };
1278
+ var isNodeAttached = function isNodeAttached(node) {
1279
+ var _nodeRoot;
1280
+ var nodeRoot = node && getRootNode(node);
1281
+ var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;
1282
+ var attached = false;
1283
+ if (nodeRoot && nodeRoot !== node) {
1284
+ var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;
1285
+ attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));
1286
+ while (!attached && nodeRootHost) {
1287
+ var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;
1288
+ nodeRoot = getRootNode(nodeRootHost);
1289
+ nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;
1290
+ attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));
1291
+ }
1292
+ }
1293
+ return attached;
1294
+ };
1295
+ var isZeroArea = function isZeroArea(node) {
1296
+ var _node$getBoundingClie = node.getBoundingClientRect(), width = _node$getBoundingClie.width, height = _node$getBoundingClie.height;
1297
+ return width === 0 && height === 0;
1298
+ };
1299
+ var isHidden = function isHidden(node, _ref) {
1300
+ var displayCheck = _ref.displayCheck, getShadowRoot = _ref.getShadowRoot;
1301
+ if (displayCheck === "full-native") {
1302
+ if ("checkVisibility" in node) return !node.checkVisibility({
1303
+ checkOpacity: false,
1304
+ opacityProperty: false,
1305
+ contentVisibilityAuto: true,
1306
+ visibilityProperty: true,
1307
+ checkVisibilityCSS: true
1308
+ });
1309
+ }
1310
+ if (getComputedStyle(node).visibility === "hidden") return true;
1311
+ var nodeUnderDetails = matches.call(node, "details>summary:first-of-type") ? node.parentElement : node;
1312
+ if (matches.call(nodeUnderDetails, "details:not([open]) *")) return true;
1313
+ if (!displayCheck || displayCheck === "full" || displayCheck === "full-native" || displayCheck === "legacy-full") {
1314
+ if (typeof getShadowRoot === "function") {
1315
+ var originalNode = node;
1316
+ while (node) {
1317
+ var parentElement = node.parentElement;
1318
+ var rootNode = getRootNode(node);
1319
+ if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true) return isZeroArea(node);
1320
+ else if (node.assignedSlot) node = node.assignedSlot;
1321
+ else if (!parentElement && rootNode !== node.ownerDocument) node = rootNode.host;
1322
+ else node = parentElement;
1323
+ }
1324
+ node = originalNode;
1325
+ }
1326
+ if (isNodeAttached(node)) return !node.getClientRects().length;
1327
+ if (displayCheck !== "legacy-full") return true;
1328
+ } else if (displayCheck === "non-zero-area") return isZeroArea(node);
1329
+ return false;
1330
+ };
1331
+ var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
1332
+ if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
1333
+ var parentNode = node.parentElement;
1334
+ while (parentNode) {
1335
+ if (parentNode.tagName === "FIELDSET" && parentNode.disabled) {
1336
+ for (var i = 0; i < parentNode.children.length; i++) {
1337
+ var child = parentNode.children.item(i);
1338
+ if (child.tagName === "LEGEND") return matches.call(parentNode, "fieldset[disabled] *") ? true : !child.contains(node);
1339
+ }
1340
+ return true;
1341
+ }
1342
+ parentNode = parentNode.parentElement;
1343
+ }
1344
+ }
1345
+ return false;
1346
+ };
1347
+ var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
1348
+ if (node.disabled || isHiddenInput(node) || isHidden(node, options) || isDetailsWithSummary(node) || isDisabledFromFieldset(node)) return false;
1349
+ return true;
1350
+ };
1351
+ var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
1352
+ if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) return false;
1353
+ return true;
1354
+ };
1355
+ var isShadowRootTabbable = function isShadowRootTabbable(shadowHostNode) {
1356
+ var tabIndex = parseInt(shadowHostNode.getAttribute("tabindex"), 10);
1357
+ if (isNaN(tabIndex) || tabIndex >= 0) return true;
1358
+ return false;
1359
+ };
1360
+ /**
1361
+ * @param {Array.<Element|CandidateScope>} candidates
1362
+ * @returns Element[]
1363
+ */
1364
+ var _sortByOrder = function sortByOrder(candidates) {
1365
+ var regularTabbables = [];
1366
+ var orderedTabbables = [];
1367
+ candidates.forEach(function(item, i) {
1368
+ var isScope = !!item.scopeParent;
1369
+ var element = isScope ? item.scopeParent : item;
1370
+ var candidateTabindex = getSortOrderTabIndex(element, isScope);
1371
+ var elements = isScope ? _sortByOrder(item.candidates) : element;
1372
+ if (candidateTabindex === 0) isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
1373
+ else orderedTabbables.push({
1374
+ documentOrder: i,
1375
+ tabIndex: candidateTabindex,
1376
+ item,
1377
+ isScope,
1378
+ content: elements
1379
+ });
1380
+ });
1381
+ return orderedTabbables.sort(sortOrderedTabbables).reduce(function(acc, sortable) {
1382
+ sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);
1383
+ return acc;
1384
+ }, []).concat(regularTabbables);
1385
+ };
1386
+ var tabbable = function tabbable(container, options) {
1387
+ options = options || {};
1388
+ var candidates;
1389
+ if (options.getShadowRoot) candidates = _getCandidatesIteratively([container], options.includeContainer, {
1390
+ filter: isNodeMatchingSelectorTabbable.bind(null, options),
1391
+ flatten: false,
1392
+ getShadowRoot: options.getShadowRoot,
1393
+ shadowRootFilter: isShadowRootTabbable
1394
+ });
1395
+ else candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
1396
+ return _sortByOrder(candidates);
1397
+ };
1398
+ //#endregion
1399
+ //#region node_modules/.pnpm/preact@10.29.2/node_modules/preact/compat/dist/compat.module.js
1400
+ function g(n, t) {
1401
+ for (var e in t) n[e] = t[e];
1402
+ return n;
1403
+ }
1404
+ function E(n, t) {
1405
+ for (var e in n) if ("__source" !== e && !(e in t)) return !0;
1406
+ for (var r in t) if ("__source" !== r && n[r] !== t[r]) return !0;
1407
+ return !1;
1408
+ }
1409
+ function M(n, t) {
1410
+ this.props = n, this.context = t;
1411
+ }
1412
+ (M.prototype = new C$1()).isPureReactComponent = !0, M.prototype.shouldComponentUpdate = function(n, t) {
1413
+ return E(this.props, n) || E(this.state, t);
1414
+ };
1415
+ var T = l$3.__b;
1416
+ l$3.__b = function(n) {
1417
+ n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null), T && T(n);
1418
+ };
1419
+ "undefined" != typeof Symbol && Symbol.for;
1420
+ var O = l$3.__e;
1421
+ l$3.__e = function(n, t, e, r) {
1422
+ if (n.then) {
1423
+ for (var u, o = t; o = o.__;) if ((u = o.__c) && u.__c) return t.__e ?? (t.__e = e.__e, t.__k = e.__k), u.__c(n, t);
1424
+ }
1425
+ O(n, t, e, r);
1426
+ };
1427
+ var U = l$3.unmount;
1428
+ function V(n, t, e) {
1429
+ return n && (n.__c && n.__c.__H && (n.__c.__H.__.forEach(function(n) {
1430
+ "function" == typeof n.__c && n.__c();
1431
+ }), n.__c.__H = null), null != (n = g({}, n)).__c && (n.__c.__P === e && (n.__c.__P = t), n.__c.__e = !0, n.__c = null), n.__k = n.__k && n.__k.map(function(n) {
1432
+ return V(n, t, e);
1433
+ })), n;
1434
+ }
1435
+ function W(n, t, e) {
1436
+ return n && e && (n.__v = null, n.__k = n.__k && n.__k.map(function(n) {
1437
+ return W(n, t, e);
1438
+ }), n.__c && n.__c.__P === t && (n.__e && e.appendChild(n.__e), n.__c.__e = !0, n.__c.__P = e)), n;
1439
+ }
1440
+ function P() {
1441
+ this.__u = 0, this.o = null, this.__b = null;
1442
+ }
1443
+ function j(n) {
1444
+ var t = n.__ && n.__.__c;
1445
+ return t && t.__a && t.__a(n);
1446
+ }
1447
+ function B() {
1448
+ this.i = null, this.l = null;
1449
+ }
1450
+ l$3.unmount = function(n) {
1451
+ var t = n.__c;
1452
+ t && (t.__z = !0), t && t.__R && t.__R(), t && 32 & n.__u && (n.type = null), U && U(n);
1453
+ }, (P.prototype = new C$1()).__c = function(n, t) {
1454
+ var e = t.__c, r = this;
1455
+ r.o ??= [], r.o.push(e);
1456
+ var u = j(r.__v), o = !1, i = function() {
1457
+ o || r.__z || (o = !0, e.__R = null, u ? u(c) : c());
1458
+ };
1459
+ e.__R = i;
1460
+ var l = e.__P;
1461
+ e.__P = null;
1462
+ var c = function() {
1463
+ if (!--r.__u) {
1464
+ if (r.state.__a) {
1465
+ var n = r.state.__a;
1466
+ r.__v.__k[0] = W(n, n.__c.__P, n.__c.__O);
1467
+ }
1468
+ var t;
1469
+ for (r.setState({ __a: r.__b = null }); t = r.o.pop();) t.__P = l, t.forceUpdate();
1470
+ }
1471
+ };
1472
+ r.__u++ || 32 & t.__u || r.setState({ __a: r.__b = r.__v.__k[0] }), n.then(i, i);
1473
+ }, P.prototype.componentWillUnmount = function() {
1474
+ this.o = [];
1475
+ }, P.prototype.render = function(n, e) {
1476
+ if (this.__b) {
1477
+ if (this.__v.__k) {
1478
+ var r = document.createElement("div"), o = this.__v.__k[0].__c;
1479
+ this.__v.__k[0] = V(this.__b, r, o.__O = o.__P);
1480
+ }
1481
+ this.__b = null;
1482
+ }
1483
+ var i = e.__a && k$2(S$1, null, n.fallback);
1484
+ return i && (i.__u &= -33), [k$2(S$1, null, e.__a ? null : n.children), i];
1485
+ };
1486
+ var H = function(n, t, e) {
1487
+ if (++e[1] === e[0] && n.l.delete(t), n.props.revealOrder && ("t" !== n.props.revealOrder[0] || !n.l.size)) for (e = n.i; e;) {
1488
+ for (; e.length > 3;) e.pop()();
1489
+ if (e[1] < e[0]) break;
1490
+ n.i = e = e[2];
1491
+ }
1492
+ };
1493
+ function Z(n) {
1494
+ return this.getChildContext = function() {
1495
+ return n.context;
1496
+ }, n.children;
1497
+ }
1498
+ function Y(n) {
1499
+ var e = this, r = n.h;
1500
+ if (e.componentWillUnmount = function() {
1501
+ R(null, e.v), e.v = null, e.h = null;
1502
+ }, e.h && e.h !== r && e.componentWillUnmount(), !e.v) {
1503
+ for (var u = e.__v; null !== u && !u.__m && null !== u.__;) u = u.__;
1504
+ e.h = r, e.v = {
1505
+ nodeType: 1,
1506
+ parentNode: r,
1507
+ childNodes: [],
1508
+ __k: { __m: u.__m },
1509
+ contains: function() {
1510
+ return !0;
1511
+ },
1512
+ namespaceURI: r.namespaceURI,
1513
+ insertBefore: function(n, t) {
1514
+ this.childNodes.push(n), e.h.insertBefore(n, t);
1515
+ },
1516
+ removeChild: function(n) {
1517
+ this.childNodes.splice(this.childNodes.indexOf(n) >>> 1, 1), e.h.removeChild(n);
1518
+ }
1519
+ };
1520
+ }
1521
+ R(k$2(Z, { context: e.context }, n.__v), e.v);
1522
+ }
1523
+ function $(n, e) {
1524
+ var r = k$2(Y, {
1525
+ __v: n,
1526
+ h: e
1527
+ });
1528
+ return r.containerInfo = e, r;
1529
+ }
1530
+ (B.prototype = new C$1()).__a = function(n) {
1531
+ var t = this, e = j(t.__v), r = t.l.get(n);
1532
+ return r[0]++, function(u) {
1533
+ var o = function() {
1534
+ t.props.revealOrder ? (r.push(u), H(t, n, r)) : u();
1535
+ };
1536
+ e ? e(o) : o();
1537
+ };
1538
+ }, B.prototype.render = function(n) {
1539
+ this.i = null, this.l = /* @__PURE__ */ new Map();
1540
+ var t = F$2(n.children);
1541
+ n.revealOrder && "b" === n.revealOrder[0] && t.reverse();
1542
+ for (var e = t.length; e--;) this.l.set(t[e], this.i = [
1543
+ 1,
1544
+ 0,
1545
+ this.i
1546
+ ]);
1547
+ return n.children;
1548
+ }, B.prototype.componentDidUpdate = B.prototype.componentDidMount = function() {
1549
+ var n = this;
1550
+ this.l.forEach(function(t, e) {
1551
+ H(n, e, t);
1552
+ });
1553
+ };
1554
+ var q = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103, G = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, J = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, K = /[A-Z0-9]/g, Q = "undefined" != typeof document, X = function(n) {
1555
+ return ("undefined" != typeof Symbol && "symbol" == typeof Symbol() ? /fil|che|rad/ : /fil|che|ra/).test(n);
1556
+ };
1557
+ C$1.prototype.isReactComponent = !0, [
1558
+ "componentWillMount",
1559
+ "componentWillReceiveProps",
1560
+ "componentWillUpdate"
1561
+ ].forEach(function(t) {
1562
+ Object.defineProperty(C$1.prototype, t, {
1563
+ configurable: !0,
1564
+ get: function() {
1565
+ return this["UNSAFE_" + t];
1566
+ },
1567
+ set: function(n) {
1568
+ Object.defineProperty(this, t, {
1569
+ configurable: !0,
1570
+ writable: !0,
1571
+ value: n
1572
+ });
1573
+ }
1574
+ });
1575
+ });
1576
+ var en = l$3.event;
1577
+ l$3.event = function(n) {
1578
+ return en && (n = en(n)), n.persist = function() {}, n.isPropagationStopped = function() {
1579
+ return this.cancelBubble;
1580
+ }, n.isDefaultPrevented = function() {
1581
+ return this.defaultPrevented;
1582
+ }, n.nativeEvent = n;
1583
+ };
1584
+ var un = {
1585
+ configurable: !0,
1586
+ get: function() {
1587
+ return this.class;
1588
+ }
1589
+ }, on = l$3.vnode;
1590
+ l$3.vnode = function(n) {
1591
+ "string" == typeof n.type && function(n) {
1592
+ var t = n.props, e = n.type, u = {}, o = -1 == e.indexOf("-");
1593
+ for (var i in t) {
1594
+ var l = t[i];
1595
+ if (!("value" === i && "defaultValue" in t && null == l || Q && "children" === i && "noscript" === e || "class" === i || "className" === i)) {
1596
+ var c = i.toLowerCase();
1597
+ "defaultValue" === i && "value" in t && null == t.value ? i = "value" : "download" === i && !0 === l ? l = "" : "translate" === c && "no" === l ? l = !1 : "o" === c[0] && "n" === c[1] ? "ondoubleclick" === c ? i = "ondblclick" : "onchange" !== c || "input" !== e && "textarea" !== e || X(t.type) ? "onfocus" === c ? i = "onfocusin" : "onblur" === c ? i = "onfocusout" : J.test(i) && (i = c) : c = i = "oninput" : o && G.test(i) ? i = i.replace(K, "-$&").toLowerCase() : null === l && (l = void 0), "oninput" === c && u[i = c] && (i = "oninputCapture"), u[i] = l;
1598
+ }
1599
+ }
1600
+ "select" == e && (u.multiple && Array.isArray(u.value) && (u.value = F$2(t.children).forEach(function(n) {
1601
+ n.props.selected = -1 != u.value.indexOf(n.props.value);
1602
+ })), null != u.defaultValue && (u.value = F$2(t.children).forEach(function(n) {
1603
+ n.props.selected = u.multiple ? -1 != u.defaultValue.indexOf(n.props.value) : u.defaultValue == n.props.value;
1604
+ }))), t.class && !t.className ? (u.class = t.class, Object.defineProperty(u, "className", un)) : t.className && (u.class = u.className = t.className), n.props = u;
1605
+ }(n), n.$$typeof = q, on && on(n);
1606
+ };
1607
+ var ln = l$3.__r;
1608
+ l$3.__r = function(n) {
1609
+ ln && ln(n), n.__c;
1610
+ };
1611
+ var cn = l$3.diffed;
1612
+ l$3.diffed = function(n) {
1613
+ cn && cn(n);
1614
+ var t = n.props, e = n.__e;
1615
+ null != e && "textarea" === n.type && "value" in t && t.value !== e.value && (e.value = null == t.value ? "" : t.value);
1616
+ };
1617
+ //#endregion
1618
+ //#region node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
1619
+ const min = Math.min;
1620
+ const max = Math.max;
1621
+ const round = Math.round;
1622
+ const floor = Math.floor;
1623
+ const createCoords = (v) => ({
1624
+ x: v,
1625
+ y: v
1626
+ });
1627
+ const oppositeSideMap = {
1628
+ left: "right",
1629
+ right: "left",
1630
+ bottom: "top",
1631
+ top: "bottom"
1632
+ };
1633
+ function clamp(start, value, end) {
1634
+ return max(start, min(value, end));
1635
+ }
1636
+ function evaluate(value, param) {
1637
+ return typeof value === "function" ? value(param) : value;
1638
+ }
1639
+ function getSide(placement) {
1640
+ return placement.split("-")[0];
1641
+ }
1642
+ function getAlignment(placement) {
1643
+ return placement.split("-")[1];
1644
+ }
1645
+ function getOppositeAxis(axis) {
1646
+ return axis === "x" ? "y" : "x";
1647
+ }
1648
+ function getAxisLength(axis) {
1649
+ return axis === "y" ? "height" : "width";
1650
+ }
1651
+ function getSideAxis(placement) {
1652
+ const firstChar = placement[0];
1653
+ return firstChar === "t" || firstChar === "b" ? "y" : "x";
1654
+ }
1655
+ function getAlignmentAxis(placement) {
1656
+ return getOppositeAxis(getSideAxis(placement));
1657
+ }
1658
+ function getAlignmentSides(placement, rects, rtl) {
1659
+ if (rtl === void 0) rtl = false;
1660
+ const alignment = getAlignment(placement);
1661
+ const alignmentAxis = getAlignmentAxis(placement);
1662
+ const length = getAxisLength(alignmentAxis);
1663
+ let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
1664
+ if (rects.reference[length] > rects.floating[length]) mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
1665
+ return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
1666
+ }
1667
+ function getExpandedPlacements(placement) {
1668
+ const oppositePlacement = getOppositePlacement(placement);
1669
+ return [
1670
+ getOppositeAlignmentPlacement(placement),
1671
+ oppositePlacement,
1672
+ getOppositeAlignmentPlacement(oppositePlacement)
1673
+ ];
1674
+ }
1675
+ function getOppositeAlignmentPlacement(placement) {
1676
+ return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
1677
+ }
1678
+ const lrPlacement = ["left", "right"];
1679
+ const rlPlacement = ["right", "left"];
1680
+ const tbPlacement = ["top", "bottom"];
1681
+ const btPlacement = ["bottom", "top"];
1682
+ function getSideList(side, isStart, rtl) {
1683
+ switch (side) {
1684
+ case "top":
1685
+ case "bottom":
1686
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
1687
+ return isStart ? lrPlacement : rlPlacement;
1688
+ case "left":
1689
+ case "right": return isStart ? tbPlacement : btPlacement;
1690
+ default: return [];
1691
+ }
1692
+ }
1693
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
1694
+ const alignment = getAlignment(placement);
1695
+ let list = getSideList(getSide(placement), direction === "start", rtl);
1696
+ if (alignment) {
1697
+ list = list.map((side) => side + "-" + alignment);
1698
+ if (flipAlignment) list = list.concat(list.map(getOppositeAlignmentPlacement));
1699
+ }
1700
+ return list;
1701
+ }
1702
+ function getOppositePlacement(placement) {
1703
+ const side = getSide(placement);
1704
+ return oppositeSideMap[side] + placement.slice(side.length);
1705
+ }
1706
+ function expandPaddingObject(padding) {
1707
+ return {
1708
+ top: 0,
1709
+ right: 0,
1710
+ bottom: 0,
1711
+ left: 0,
1712
+ ...padding
1713
+ };
1714
+ }
1715
+ function getPaddingObject(padding) {
1716
+ return typeof padding !== "number" ? expandPaddingObject(padding) : {
1717
+ top: padding,
1718
+ right: padding,
1719
+ bottom: padding,
1720
+ left: padding
1721
+ };
1722
+ }
1723
+ function rectToClientRect(rect) {
1724
+ const { x, y, width, height } = rect;
1725
+ return {
1726
+ width,
1727
+ height,
1728
+ top: y,
1729
+ left: x,
1730
+ right: x + width,
1731
+ bottom: y + height,
1732
+ x,
1733
+ y
1734
+ };
1735
+ }
1736
+ //#endregion
1737
+ //#region node_modules/.pnpm/@floating-ui+core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
1738
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
1739
+ let { reference, floating } = _ref;
1740
+ const sideAxis = getSideAxis(placement);
1741
+ const alignmentAxis = getAlignmentAxis(placement);
1742
+ const alignLength = getAxisLength(alignmentAxis);
1743
+ const side = getSide(placement);
1744
+ const isVertical = sideAxis === "y";
1745
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
1746
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
1747
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
1748
+ let coords;
1749
+ switch (side) {
1750
+ case "top":
1751
+ coords = {
1752
+ x: commonX,
1753
+ y: reference.y - floating.height
1754
+ };
1755
+ break;
1756
+ case "bottom":
1757
+ coords = {
1758
+ x: commonX,
1759
+ y: reference.y + reference.height
1760
+ };
1761
+ break;
1762
+ case "right":
1763
+ coords = {
1764
+ x: reference.x + reference.width,
1765
+ y: commonY
1766
+ };
1767
+ break;
1768
+ case "left":
1769
+ coords = {
1770
+ x: reference.x - floating.width,
1771
+ y: commonY
1772
+ };
1773
+ break;
1774
+ default: coords = {
1775
+ x: reference.x,
1776
+ y: reference.y
1777
+ };
1778
+ }
1779
+ switch (getAlignment(placement)) {
1780
+ case "start":
1781
+ coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
1782
+ break;
1783
+ case "end":
1784
+ coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
1785
+ break;
1786
+ }
1787
+ return coords;
1788
+ }
1789
+ /**
1790
+ * Resolves with an object of overflow side offsets that determine how much the
1791
+ * element is overflowing a given clipping boundary on each side.
1792
+ * - positive = overflowing the boundary by that number of pixels
1793
+ * - negative = how many pixels left before it will overflow
1794
+ * - 0 = lies flush with the boundary
1795
+ * @see https://floating-ui.com/docs/detectOverflow
1796
+ */
1797
+ async function detectOverflow(state, options) {
1798
+ var _await$platform$isEle;
1799
+ if (options === void 0) options = {};
1800
+ const { x, y, platform, rects, elements, strategy } = state;
1801
+ const { boundary = "clippingAncestors", rootBoundary = "viewport", elementContext = "floating", altBoundary = false, padding = 0 } = evaluate(options, state);
1802
+ const paddingObject = getPaddingObject(padding);
1803
+ const element = elements[altBoundary ? elementContext === "floating" ? "reference" : "floating" : elementContext];
1804
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
1805
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating)),
1806
+ boundary,
1807
+ rootBoundary,
1808
+ strategy
1809
+ }));
1810
+ const rect = elementContext === "floating" ? {
1811
+ x,
1812
+ y,
1813
+ width: rects.floating.width,
1814
+ height: rects.floating.height
1815
+ } : rects.reference;
1816
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
1817
+ const offsetScale = await (platform.isElement == null ? void 0 : platform.isElement(offsetParent)) ? await (platform.getScale == null ? void 0 : platform.getScale(offsetParent)) || {
1818
+ x: 1,
1819
+ y: 1
1820
+ } : {
1821
+ x: 1,
1822
+ y: 1
1823
+ };
1824
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
1825
+ elements,
1826
+ rect,
1827
+ offsetParent,
1828
+ strategy
1829
+ }) : rect);
1830
+ return {
1831
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
1832
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
1833
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
1834
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
1835
+ };
1836
+ }
1837
+ const MAX_RESET_COUNT = 50;
1838
+ /**
1839
+ * Computes the `x` and `y` coordinates that will place the floating element
1840
+ * next to a given reference element.
1841
+ *
1842
+ * This export does not have any `platform` interface logic. You will need to
1843
+ * write one for the platform you are using Floating UI with.
1844
+ */
1845
+ const computePosition$1 = async (reference, floating, config) => {
1846
+ const { placement = "bottom", strategy = "absolute", middleware = [], platform } = config;
1847
+ const platformWithDetectOverflow = platform.detectOverflow ? platform : {
1848
+ ...platform,
1849
+ detectOverflow
1850
+ };
1851
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
1852
+ let rects = await platform.getElementRects({
1853
+ reference,
1854
+ floating,
1855
+ strategy
1856
+ });
1857
+ let { x, y } = computeCoordsFromPlacement(rects, placement, rtl);
1858
+ let statefulPlacement = placement;
1859
+ let resetCount = 0;
1860
+ const middlewareData = {};
1861
+ for (let i = 0; i < middleware.length; i++) {
1862
+ const currentMiddleware = middleware[i];
1863
+ if (!currentMiddleware) continue;
1864
+ const { name, fn } = currentMiddleware;
1865
+ const { x: nextX, y: nextY, data, reset } = await fn({
1866
+ x,
1867
+ y,
1868
+ initialPlacement: placement,
1869
+ placement: statefulPlacement,
1870
+ strategy,
1871
+ middlewareData,
1872
+ rects,
1873
+ platform: platformWithDetectOverflow,
1874
+ elements: {
1875
+ reference,
1876
+ floating
1877
+ }
1878
+ });
1879
+ x = nextX != null ? nextX : x;
1880
+ y = nextY != null ? nextY : y;
1881
+ middlewareData[name] = {
1882
+ ...middlewareData[name],
1883
+ ...data
1884
+ };
1885
+ if (reset && resetCount < MAX_RESET_COUNT) {
1886
+ resetCount++;
1887
+ if (typeof reset === "object") {
1888
+ if (reset.placement) statefulPlacement = reset.placement;
1889
+ if (reset.rects) rects = reset.rects === true ? await platform.getElementRects({
1890
+ reference,
1891
+ floating,
1892
+ strategy
1893
+ }) : reset.rects;
1894
+ ({x, y} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
1895
+ }
1896
+ i = -1;
1897
+ }
1898
+ }
1899
+ return {
1900
+ x,
1901
+ y,
1902
+ placement: statefulPlacement,
1903
+ strategy,
1904
+ middlewareData
1905
+ };
1906
+ };
1907
+ /**
1908
+ * Optimizes the visibility of the floating element by flipping the `placement`
1909
+ * in order to keep it in view when the preferred placement(s) will overflow the
1910
+ * clipping boundary. Alternative to `autoPlacement`.
1911
+ * @see https://floating-ui.com/docs/flip
1912
+ */
1913
+ const flip$1 = function(options) {
1914
+ if (options === void 0) options = {};
1915
+ return {
1916
+ name: "flip",
1917
+ options,
1918
+ async fn(state) {
1919
+ var _middlewareData$arrow, _middlewareData$flip;
1920
+ const { placement, middlewareData, rects, initialPlacement, platform, elements } = state;
1921
+ const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true, fallbackPlacements: specifiedFallbackPlacements, fallbackStrategy = "bestFit", fallbackAxisSideDirection = "none", flipAlignment = true, ...detectOverflowOptions } = evaluate(options, state);
1922
+ if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {};
1923
+ const side = getSide(placement);
1924
+ const initialSideAxis = getSideAxis(initialPlacement);
1925
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
1926
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
1927
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
1928
+ const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
1929
+ if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
1930
+ const placements = [initialPlacement, ...fallbackPlacements];
1931
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
1932
+ const overflows = [];
1933
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
1934
+ if (checkMainAxis) overflows.push(overflow[side]);
1935
+ if (checkCrossAxis) {
1936
+ const sides = getAlignmentSides(placement, rects, rtl);
1937
+ overflows.push(overflow[sides[0]], overflow[sides[1]]);
1938
+ }
1939
+ overflowsData = [...overflowsData, {
1940
+ placement,
1941
+ overflows
1942
+ }];
1943
+ if (!overflows.every((side) => side <= 0)) {
1944
+ var _middlewareData$flip2, _overflowsData$filter;
1945
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
1946
+ const nextPlacement = placements[nextIndex];
1947
+ if (nextPlacement) {
1948
+ if (!(checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false) || overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) return {
1949
+ data: {
1950
+ index: nextIndex,
1951
+ overflows: overflowsData
1952
+ },
1953
+ reset: { placement: nextPlacement }
1954
+ };
1955
+ }
1956
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
1957
+ if (!resetPlacement) switch (fallbackStrategy) {
1958
+ case "bestFit": {
1959
+ var _overflowsData$filter2;
1960
+ const placement = (_overflowsData$filter2 = overflowsData.filter((d) => {
1961
+ if (hasFallbackAxisSideDirection) {
1962
+ const currentSideAxis = getSideAxis(d.placement);
1963
+ return currentSideAxis === initialSideAxis || currentSideAxis === "y";
1964
+ }
1965
+ return true;
1966
+ }).map((d) => [d.placement, d.overflows.filter((overflow) => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
1967
+ if (placement) resetPlacement = placement;
1968
+ break;
1969
+ }
1970
+ case "initialPlacement":
1971
+ resetPlacement = initialPlacement;
1972
+ break;
1973
+ }
1974
+ if (placement !== resetPlacement) return { reset: { placement: resetPlacement } };
1975
+ }
1976
+ return {};
1977
+ }
1978
+ };
1979
+ };
1980
+ const originSides = /* @__PURE__ */ new Set(["left", "top"]);
1981
+ async function convertValueToCoords(state, options) {
1982
+ const { placement, platform, elements } = state;
1983
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
1984
+ const side = getSide(placement);
1985
+ const alignment = getAlignment(placement);
1986
+ const isVertical = getSideAxis(placement) === "y";
1987
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
1988
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
1989
+ const rawValue = evaluate(options, state);
1990
+ let { mainAxis, crossAxis, alignmentAxis } = typeof rawValue === "number" ? {
1991
+ mainAxis: rawValue,
1992
+ crossAxis: 0,
1993
+ alignmentAxis: null
1994
+ } : {
1995
+ mainAxis: rawValue.mainAxis || 0,
1996
+ crossAxis: rawValue.crossAxis || 0,
1997
+ alignmentAxis: rawValue.alignmentAxis
1998
+ };
1999
+ if (alignment && typeof alignmentAxis === "number") crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
2000
+ return isVertical ? {
2001
+ x: crossAxis * crossAxisMulti,
2002
+ y: mainAxis * mainAxisMulti
2003
+ } : {
2004
+ x: mainAxis * mainAxisMulti,
2005
+ y: crossAxis * crossAxisMulti
2006
+ };
2007
+ }
2008
+ /**
2009
+ * Modifies the placement by translating the floating element along the
2010
+ * specified axes.
2011
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
2012
+ * object may be passed.
2013
+ * @see https://floating-ui.com/docs/offset
2014
+ */
2015
+ const offset$1 = function(options) {
2016
+ if (options === void 0) options = 0;
2017
+ return {
2018
+ name: "offset",
2019
+ options,
2020
+ async fn(state) {
2021
+ var _middlewareData$offse, _middlewareData$arrow;
2022
+ const { x, y, placement, middlewareData } = state;
2023
+ const diffCoords = await convertValueToCoords(state, options);
2024
+ if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) return {};
2025
+ return {
2026
+ x: x + diffCoords.x,
2027
+ y: y + diffCoords.y,
2028
+ data: {
2029
+ ...diffCoords,
2030
+ placement
2031
+ }
2032
+ };
2033
+ }
2034
+ };
2035
+ };
2036
+ /**
2037
+ * Optimizes the visibility of the floating element by shifting it in order to
2038
+ * keep it in view when it will overflow the clipping boundary.
2039
+ * @see https://floating-ui.com/docs/shift
2040
+ */
2041
+ const shift$1 = function(options) {
2042
+ if (options === void 0) options = {};
2043
+ return {
2044
+ name: "shift",
2045
+ options,
2046
+ async fn(state) {
2047
+ const { x, y, placement, platform } = state;
2048
+ const { mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = false, limiter = { fn: (_ref) => {
2049
+ let { x, y } = _ref;
2050
+ return {
2051
+ x,
2052
+ y
2053
+ };
2054
+ } }, ...detectOverflowOptions } = evaluate(options, state);
2055
+ const coords = {
2056
+ x,
2057
+ y
2058
+ };
2059
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
2060
+ const crossAxis = getSideAxis(getSide(placement));
2061
+ const mainAxis = getOppositeAxis(crossAxis);
2062
+ let mainAxisCoord = coords[mainAxis];
2063
+ let crossAxisCoord = coords[crossAxis];
2064
+ if (checkMainAxis) {
2065
+ const minSide = mainAxis === "y" ? "top" : "left";
2066
+ const maxSide = mainAxis === "y" ? "bottom" : "right";
2067
+ const min = mainAxisCoord + overflow[minSide];
2068
+ const max = mainAxisCoord - overflow[maxSide];
2069
+ mainAxisCoord = clamp(min, mainAxisCoord, max);
2070
+ }
2071
+ if (checkCrossAxis) {
2072
+ const minSide = crossAxis === "y" ? "top" : "left";
2073
+ const maxSide = crossAxis === "y" ? "bottom" : "right";
2074
+ const min = crossAxisCoord + overflow[minSide];
2075
+ const max = crossAxisCoord - overflow[maxSide];
2076
+ crossAxisCoord = clamp(min, crossAxisCoord, max);
2077
+ }
2078
+ const limitedCoords = limiter.fn({
2079
+ ...state,
2080
+ [mainAxis]: mainAxisCoord,
2081
+ [crossAxis]: crossAxisCoord
2082
+ });
2083
+ return {
2084
+ ...limitedCoords,
2085
+ data: {
2086
+ x: limitedCoords.x - x,
2087
+ y: limitedCoords.y - y,
2088
+ enabled: {
2089
+ [mainAxis]: checkMainAxis,
2090
+ [crossAxis]: checkCrossAxis
2091
+ }
2092
+ }
2093
+ };
2094
+ }
2095
+ };
2096
+ };
2097
+ /**
2098
+ * Provides data that allows you to change the size of the floating element —
2099
+ * for instance, prevent it from overflowing the clipping boundary or match the
2100
+ * width of the reference element.
2101
+ * @see https://floating-ui.com/docs/size
2102
+ */
2103
+ const size$1 = function(options) {
2104
+ if (options === void 0) options = {};
2105
+ return {
2106
+ name: "size",
2107
+ options,
2108
+ async fn(state) {
2109
+ var _state$middlewareData, _state$middlewareData2;
2110
+ const { placement, rects, platform, elements } = state;
2111
+ const { apply = () => {}, ...detectOverflowOptions } = evaluate(options, state);
2112
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
2113
+ const side = getSide(placement);
2114
+ const alignment = getAlignment(placement);
2115
+ const isYAxis = getSideAxis(placement) === "y";
2116
+ const { width, height } = rects.floating;
2117
+ let heightSide;
2118
+ let widthSide;
2119
+ if (side === "top" || side === "bottom") {
2120
+ heightSide = side;
2121
+ widthSide = alignment === (await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right";
2122
+ } else {
2123
+ widthSide = side;
2124
+ heightSide = alignment === "end" ? "top" : "bottom";
2125
+ }
2126
+ const maximumClippingHeight = height - overflow.top - overflow.bottom;
2127
+ const maximumClippingWidth = width - overflow.left - overflow.right;
2128
+ const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
2129
+ const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
2130
+ const noShift = !state.middlewareData.shift;
2131
+ let availableHeight = overflowAvailableHeight;
2132
+ let availableWidth = overflowAvailableWidth;
2133
+ if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) availableWidth = maximumClippingWidth;
2134
+ if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) availableHeight = maximumClippingHeight;
2135
+ if (noShift && !alignment) {
2136
+ const xMin = max(overflow.left, 0);
2137
+ const xMax = max(overflow.right, 0);
2138
+ const yMin = max(overflow.top, 0);
2139
+ const yMax = max(overflow.bottom, 0);
2140
+ if (isYAxis) availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
2141
+ else availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
2142
+ }
2143
+ await apply({
2144
+ ...state,
2145
+ availableWidth,
2146
+ availableHeight
2147
+ });
2148
+ const nextDimensions = await platform.getDimensions(elements.floating);
2149
+ if (width !== nextDimensions.width || height !== nextDimensions.height) return { reset: { rects: true } };
2150
+ return {};
2151
+ }
2152
+ };
2153
+ };
2154
+ //#endregion
2155
+ //#region node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
2156
+ function hasWindow() {
2157
+ return typeof window !== "undefined";
2158
+ }
2159
+ function getNodeName(node) {
2160
+ if (isNode(node)) return (node.nodeName || "").toLowerCase();
2161
+ return "#document";
2162
+ }
2163
+ function getWindow(node) {
2164
+ var _node$ownerDocument;
2165
+ return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
2166
+ }
2167
+ function getDocumentElement(node) {
2168
+ var _ref;
2169
+ return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
2170
+ }
2171
+ function isNode(value) {
2172
+ if (!hasWindow()) return false;
2173
+ return value instanceof Node || value instanceof getWindow(value).Node;
2174
+ }
2175
+ function isElement(value) {
2176
+ if (!hasWindow()) return false;
2177
+ return value instanceof Element || value instanceof getWindow(value).Element;
2178
+ }
2179
+ function isHTMLElement(value) {
2180
+ if (!hasWindow()) return false;
2181
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
2182
+ }
2183
+ function isShadowRoot(value) {
2184
+ if (!hasWindow() || typeof ShadowRoot === "undefined") return false;
2185
+ return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
2186
+ }
2187
+ function isOverflowElement(element) {
2188
+ const { overflow, overflowX, overflowY, display } = getComputedStyle$1(element);
2189
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
2190
+ }
2191
+ function isTableElement(element) {
2192
+ return /^(table|td|th)$/.test(getNodeName(element));
2193
+ }
2194
+ function isTopLayer(element) {
2195
+ try {
2196
+ if (element.matches(":popover-open")) return true;
2197
+ } catch (_e) {}
2198
+ try {
2199
+ return element.matches(":modal");
2200
+ } catch (_e) {
2201
+ return false;
2202
+ }
2203
+ }
2204
+ const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
2205
+ const containRe = /paint|layout|strict|content/;
2206
+ const isNotNone = (value) => !!value && value !== "none";
2207
+ let isWebKitValue;
2208
+ function isContainingBlock(elementOrCss) {
2209
+ const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
2210
+ return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
2211
+ }
2212
+ function getContainingBlock(element) {
2213
+ let currentNode = getParentNode(element);
2214
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
2215
+ if (isContainingBlock(currentNode)) return currentNode;
2216
+ else if (isTopLayer(currentNode)) return null;
2217
+ currentNode = getParentNode(currentNode);
2218
+ }
2219
+ return null;
2220
+ }
2221
+ function isWebKit() {
2222
+ if (isWebKitValue == null) isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
2223
+ return isWebKitValue;
2224
+ }
2225
+ function isLastTraversableNode(node) {
2226
+ return /^(html|body|#document)$/.test(getNodeName(node));
2227
+ }
2228
+ function getComputedStyle$1(element) {
2229
+ return getWindow(element).getComputedStyle(element);
2230
+ }
2231
+ function getNodeScroll(element) {
2232
+ if (isElement(element)) return {
2233
+ scrollLeft: element.scrollLeft,
2234
+ scrollTop: element.scrollTop
2235
+ };
2236
+ return {
2237
+ scrollLeft: element.scrollX,
2238
+ scrollTop: element.scrollY
2239
+ };
2240
+ }
2241
+ function getParentNode(node) {
2242
+ if (getNodeName(node) === "html") return node;
2243
+ const result = node.assignedSlot || node.parentNode || isShadowRoot(node) && node.host || getDocumentElement(node);
2244
+ return isShadowRoot(result) ? result.host : result;
2245
+ }
2246
+ function getNearestOverflowAncestor(node) {
2247
+ const parentNode = getParentNode(node);
2248
+ if (isLastTraversableNode(parentNode)) return node.ownerDocument ? node.ownerDocument.body : node.body;
2249
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) return parentNode;
2250
+ return getNearestOverflowAncestor(parentNode);
2251
+ }
2252
+ function getOverflowAncestors(node, list, traverseIframes) {
2253
+ var _node$ownerDocument2;
2254
+ if (list === void 0) list = [];
2255
+ if (traverseIframes === void 0) traverseIframes = true;
2256
+ const scrollableAncestor = getNearestOverflowAncestor(node);
2257
+ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
2258
+ const win = getWindow(scrollableAncestor);
2259
+ if (isBody) {
2260
+ const frameElement = getFrameElement(win);
2261
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
2262
+ } else return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
2263
+ }
2264
+ function getFrameElement(win) {
2265
+ return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
2266
+ }
2267
+ //#endregion
2268
+ //#region node_modules/.pnpm/@floating-ui+dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
2269
+ function getCssDimensions(element) {
2270
+ const css = getComputedStyle$1(element);
2271
+ let width = parseFloat(css.width) || 0;
2272
+ let height = parseFloat(css.height) || 0;
2273
+ const hasOffset = isHTMLElement(element);
2274
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
2275
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
2276
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
2277
+ if (shouldFallback) {
2278
+ width = offsetWidth;
2279
+ height = offsetHeight;
2280
+ }
2281
+ return {
2282
+ width,
2283
+ height,
2284
+ $: shouldFallback
2285
+ };
2286
+ }
2287
+ function unwrapElement(element) {
2288
+ return !isElement(element) ? element.contextElement : element;
2289
+ }
2290
+ function getScale(element) {
2291
+ const domElement = unwrapElement(element);
2292
+ if (!isHTMLElement(domElement)) return createCoords(1);
2293
+ const rect = domElement.getBoundingClientRect();
2294
+ const { width, height, $ } = getCssDimensions(domElement);
2295
+ let x = ($ ? round(rect.width) : rect.width) / width;
2296
+ let y = ($ ? round(rect.height) : rect.height) / height;
2297
+ if (!x || !Number.isFinite(x)) x = 1;
2298
+ if (!y || !Number.isFinite(y)) y = 1;
2299
+ return {
2300
+ x,
2301
+ y
2302
+ };
2303
+ }
2304
+ const noOffsets = /* @__PURE__ */ createCoords(0);
2305
+ function getVisualOffsets(element) {
2306
+ const win = getWindow(element);
2307
+ if (!isWebKit() || !win.visualViewport) return noOffsets;
2308
+ return {
2309
+ x: win.visualViewport.offsetLeft,
2310
+ y: win.visualViewport.offsetTop
2311
+ };
2312
+ }
2313
+ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
2314
+ if (isFixed === void 0) isFixed = false;
2315
+ if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) return false;
2316
+ return isFixed;
2317
+ }
2318
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
2319
+ if (includeScale === void 0) includeScale = false;
2320
+ if (isFixedStrategy === void 0) isFixedStrategy = false;
2321
+ const clientRect = element.getBoundingClientRect();
2322
+ const domElement = unwrapElement(element);
2323
+ let scale = createCoords(1);
2324
+ if (includeScale) if (offsetParent) {
2325
+ if (isElement(offsetParent)) scale = getScale(offsetParent);
2326
+ } else scale = getScale(element);
2327
+ const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
2328
+ let x = (clientRect.left + visualOffsets.x) / scale.x;
2329
+ let y = (clientRect.top + visualOffsets.y) / scale.y;
2330
+ let width = clientRect.width / scale.x;
2331
+ let height = clientRect.height / scale.y;
2332
+ if (domElement) {
2333
+ const win = getWindow(domElement);
2334
+ const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
2335
+ let currentWin = win;
2336
+ let currentIFrame = getFrameElement(currentWin);
2337
+ while (currentIFrame && offsetParent && offsetWin !== currentWin) {
2338
+ const iframeScale = getScale(currentIFrame);
2339
+ const iframeRect = currentIFrame.getBoundingClientRect();
2340
+ const css = getComputedStyle$1(currentIFrame);
2341
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
2342
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
2343
+ x *= iframeScale.x;
2344
+ y *= iframeScale.y;
2345
+ width *= iframeScale.x;
2346
+ height *= iframeScale.y;
2347
+ x += left;
2348
+ y += top;
2349
+ currentWin = getWindow(currentIFrame);
2350
+ currentIFrame = getFrameElement(currentWin);
2351
+ }
2352
+ }
2353
+ return rectToClientRect({
2354
+ width,
2355
+ height,
2356
+ x,
2357
+ y
2358
+ });
2359
+ }
2360
+ function getWindowScrollBarX(element, rect) {
2361
+ const leftScroll = getNodeScroll(element).scrollLeft;
2362
+ if (!rect) return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
2363
+ return rect.left + leftScroll;
2364
+ }
2365
+ function getHTMLOffset(documentElement, scroll) {
2366
+ const htmlRect = documentElement.getBoundingClientRect();
2367
+ return {
2368
+ x: htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect),
2369
+ y: htmlRect.top + scroll.scrollTop
2370
+ };
2371
+ }
2372
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
2373
+ let { elements, rect, offsetParent, strategy } = _ref;
2374
+ const isFixed = strategy === "fixed";
2375
+ const documentElement = getDocumentElement(offsetParent);
2376
+ const topLayer = elements ? isTopLayer(elements.floating) : false;
2377
+ if (offsetParent === documentElement || topLayer && isFixed) return rect;
2378
+ let scroll = {
2379
+ scrollLeft: 0,
2380
+ scrollTop: 0
2381
+ };
2382
+ let scale = createCoords(1);
2383
+ const offsets = createCoords(0);
2384
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
2385
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
2386
+ if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) scroll = getNodeScroll(offsetParent);
2387
+ if (isOffsetParentAnElement) {
2388
+ const offsetRect = getBoundingClientRect(offsetParent);
2389
+ scale = getScale(offsetParent);
2390
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
2391
+ offsets.y = offsetRect.y + offsetParent.clientTop;
2392
+ }
2393
+ }
2394
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
2395
+ return {
2396
+ width: rect.width * scale.x,
2397
+ height: rect.height * scale.y,
2398
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
2399
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
2400
+ };
2401
+ }
2402
+ function getClientRects(element) {
2403
+ return Array.from(element.getClientRects());
2404
+ }
2405
+ function getDocumentRect(element) {
2406
+ const html = getDocumentElement(element);
2407
+ const scroll = getNodeScroll(element);
2408
+ const body = element.ownerDocument.body;
2409
+ const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
2410
+ const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
2411
+ let x = -scroll.scrollLeft + getWindowScrollBarX(element);
2412
+ const y = -scroll.scrollTop;
2413
+ if (getComputedStyle$1(body).direction === "rtl") x += max(html.clientWidth, body.clientWidth) - width;
2414
+ return {
2415
+ width,
2416
+ height,
2417
+ x,
2418
+ y
2419
+ };
2420
+ }
2421
+ const SCROLLBAR_MAX = 25;
2422
+ function getViewportRect(element, strategy) {
2423
+ const win = getWindow(element);
2424
+ const html = getDocumentElement(element);
2425
+ const visualViewport = win.visualViewport;
2426
+ let width = html.clientWidth;
2427
+ let height = html.clientHeight;
2428
+ let x = 0;
2429
+ let y = 0;
2430
+ if (visualViewport) {
2431
+ width = visualViewport.width;
2432
+ height = visualViewport.height;
2433
+ const visualViewportBased = isWebKit();
2434
+ if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
2435
+ x = visualViewport.offsetLeft;
2436
+ y = visualViewport.offsetTop;
2437
+ }
2438
+ }
2439
+ const windowScrollbarX = getWindowScrollBarX(html);
2440
+ if (windowScrollbarX <= 0) {
2441
+ const doc = html.ownerDocument;
2442
+ const body = doc.body;
2443
+ const bodyStyles = getComputedStyle(body);
2444
+ const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
2445
+ const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
2446
+ if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) width -= clippingStableScrollbarWidth;
2447
+ } else if (windowScrollbarX <= SCROLLBAR_MAX) width += windowScrollbarX;
2448
+ return {
2449
+ width,
2450
+ height,
2451
+ x,
2452
+ y
2453
+ };
2454
+ }
2455
+ function getInnerBoundingClientRect(element, strategy) {
2456
+ const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
2457
+ const top = clientRect.top + element.clientTop;
2458
+ const left = clientRect.left + element.clientLeft;
2459
+ const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
2460
+ return {
2461
+ width: element.clientWidth * scale.x,
2462
+ height: element.clientHeight * scale.y,
2463
+ x: left * scale.x,
2464
+ y: top * scale.y
2465
+ };
2466
+ }
2467
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
2468
+ let rect;
2469
+ if (clippingAncestor === "viewport") rect = getViewportRect(element, strategy);
2470
+ else if (clippingAncestor === "document") rect = getDocumentRect(getDocumentElement(element));
2471
+ else if (isElement(clippingAncestor)) rect = getInnerBoundingClientRect(clippingAncestor, strategy);
2472
+ else {
2473
+ const visualOffsets = getVisualOffsets(element);
2474
+ rect = {
2475
+ x: clippingAncestor.x - visualOffsets.x,
2476
+ y: clippingAncestor.y - visualOffsets.y,
2477
+ width: clippingAncestor.width,
2478
+ height: clippingAncestor.height
2479
+ };
2480
+ }
2481
+ return rectToClientRect(rect);
2482
+ }
2483
+ function hasFixedPositionAncestor(element, stopNode) {
2484
+ const parentNode = getParentNode(element);
2485
+ if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) return false;
2486
+ return getComputedStyle$1(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
2487
+ }
2488
+ function getClippingElementAncestors(element, cache) {
2489
+ const cachedResult = cache.get(element);
2490
+ if (cachedResult) return cachedResult;
2491
+ let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
2492
+ let currentContainingBlockComputedStyle = null;
2493
+ const elementIsFixed = getComputedStyle$1(element).position === "fixed";
2494
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
2495
+ while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
2496
+ const computedStyle = getComputedStyle$1(currentNode);
2497
+ const currentNodeIsContaining = isContainingBlock(currentNode);
2498
+ if (!currentNodeIsContaining && computedStyle.position === "fixed") currentContainingBlockComputedStyle = null;
2499
+ if (elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === "absolute" || currentContainingBlockComputedStyle.position === "fixed") || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode)) result = result.filter((ancestor) => ancestor !== currentNode);
2500
+ else currentContainingBlockComputedStyle = computedStyle;
2501
+ currentNode = getParentNode(currentNode);
2502
+ }
2503
+ cache.set(element, result);
2504
+ return result;
2505
+ }
2506
+ function getClippingRect(_ref) {
2507
+ let { element, boundary, rootBoundary, strategy } = _ref;
2508
+ const clippingAncestors = [...boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary), rootBoundary];
2509
+ const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
2510
+ let top = firstRect.top;
2511
+ let right = firstRect.right;
2512
+ let bottom = firstRect.bottom;
2513
+ let left = firstRect.left;
2514
+ for (let i = 1; i < clippingAncestors.length; i++) {
2515
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
2516
+ top = max(rect.top, top);
2517
+ right = min(rect.right, right);
2518
+ bottom = min(rect.bottom, bottom);
2519
+ left = max(rect.left, left);
2520
+ }
2521
+ return {
2522
+ width: right - left,
2523
+ height: bottom - top,
2524
+ x: left,
2525
+ y: top
2526
+ };
2527
+ }
2528
+ function getDimensions(element) {
2529
+ const { width, height } = getCssDimensions(element);
2530
+ return {
2531
+ width,
2532
+ height
2533
+ };
2534
+ }
2535
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
2536
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
2537
+ const documentElement = getDocumentElement(offsetParent);
2538
+ const isFixed = strategy === "fixed";
2539
+ const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
2540
+ let scroll = {
2541
+ scrollLeft: 0,
2542
+ scrollTop: 0
2543
+ };
2544
+ const offsets = createCoords(0);
2545
+ function setLeftRTLScrollbarOffset() {
2546
+ offsets.x = getWindowScrollBarX(documentElement);
2547
+ }
2548
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
2549
+ if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) scroll = getNodeScroll(offsetParent);
2550
+ if (isOffsetParentAnElement) {
2551
+ const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
2552
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
2553
+ offsets.y = offsetRect.y + offsetParent.clientTop;
2554
+ } else if (documentElement) setLeftRTLScrollbarOffset();
2555
+ }
2556
+ if (isFixed && !isOffsetParentAnElement && documentElement) setLeftRTLScrollbarOffset();
2557
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
2558
+ return {
2559
+ x: rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x,
2560
+ y: rect.top + scroll.scrollTop - offsets.y - htmlOffset.y,
2561
+ width: rect.width,
2562
+ height: rect.height
2563
+ };
2564
+ }
2565
+ function isStaticPositioned(element) {
2566
+ return getComputedStyle$1(element).position === "static";
2567
+ }
2568
+ function getTrueOffsetParent(element, polyfill) {
2569
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") return null;
2570
+ if (polyfill) return polyfill(element);
2571
+ let rawOffsetParent = element.offsetParent;
2572
+ if (getDocumentElement(element) === rawOffsetParent) rawOffsetParent = rawOffsetParent.ownerDocument.body;
2573
+ return rawOffsetParent;
2574
+ }
2575
+ function getOffsetParent(element, polyfill) {
2576
+ const win = getWindow(element);
2577
+ if (isTopLayer(element)) return win;
2578
+ if (!isHTMLElement(element)) {
2579
+ let svgOffsetParent = getParentNode(element);
2580
+ while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
2581
+ if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) return svgOffsetParent;
2582
+ svgOffsetParent = getParentNode(svgOffsetParent);
2583
+ }
2584
+ return win;
2585
+ }
2586
+ let offsetParent = getTrueOffsetParent(element, polyfill);
2587
+ while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) offsetParent = getTrueOffsetParent(offsetParent, polyfill);
2588
+ if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) return win;
2589
+ return offsetParent || getContainingBlock(element) || win;
2590
+ }
2591
+ const getElementRects = async function(data) {
2592
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
2593
+ const getDimensionsFn = this.getDimensions;
2594
+ const floatingDimensions = await getDimensionsFn(data.floating);
2595
+ return {
2596
+ reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
2597
+ floating: {
2598
+ x: 0,
2599
+ y: 0,
2600
+ width: floatingDimensions.width,
2601
+ height: floatingDimensions.height
2602
+ }
2603
+ };
2604
+ };
2605
+ function isRTL(element) {
2606
+ return getComputedStyle$1(element).direction === "rtl";
2607
+ }
2608
+ const platform = {
2609
+ convertOffsetParentRelativeRectToViewportRelativeRect,
2610
+ getDocumentElement,
2611
+ getClippingRect,
2612
+ getOffsetParent,
2613
+ getElementRects,
2614
+ getClientRects,
2615
+ getDimensions,
2616
+ getScale,
2617
+ isElement,
2618
+ isRTL
2619
+ };
2620
+ function rectsAreEqual(a, b) {
2621
+ return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
2622
+ }
2623
+ function observeMove(element, onMove) {
2624
+ let io = null;
2625
+ let timeoutId;
2626
+ const root = getDocumentElement(element);
2627
+ function cleanup() {
2628
+ var _io;
2629
+ clearTimeout(timeoutId);
2630
+ (_io = io) == null || _io.disconnect();
2631
+ io = null;
2632
+ }
2633
+ function refresh(skip, threshold) {
2634
+ if (skip === void 0) skip = false;
2635
+ if (threshold === void 0) threshold = 1;
2636
+ cleanup();
2637
+ const elementRectForRootMargin = element.getBoundingClientRect();
2638
+ const { left, top, width, height } = elementRectForRootMargin;
2639
+ if (!skip) onMove();
2640
+ if (!width || !height) return;
2641
+ const insetTop = floor(top);
2642
+ const insetRight = floor(root.clientWidth - (left + width));
2643
+ const insetBottom = floor(root.clientHeight - (top + height));
2644
+ const insetLeft = floor(left);
2645
+ const options = {
2646
+ rootMargin: -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px",
2647
+ threshold: max(0, min(1, threshold)) || 1
2648
+ };
2649
+ let isFirstUpdate = true;
2650
+ function handleObserve(entries) {
2651
+ const ratio = entries[0].intersectionRatio;
2652
+ if (ratio !== threshold) {
2653
+ if (!isFirstUpdate) return refresh();
2654
+ if (!ratio) timeoutId = setTimeout(() => {
2655
+ refresh(false, 1e-7);
2656
+ }, 1e3);
2657
+ else refresh(false, ratio);
2658
+ }
2659
+ if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) refresh();
2660
+ isFirstUpdate = false;
2661
+ }
2662
+ try {
2663
+ io = new IntersectionObserver(handleObserve, {
2664
+ ...options,
2665
+ root: root.ownerDocument
2666
+ });
2667
+ } catch (_e) {
2668
+ io = new IntersectionObserver(handleObserve, options);
2669
+ }
2670
+ io.observe(element);
2671
+ }
2672
+ refresh(true);
2673
+ return cleanup;
2674
+ }
2675
+ /**
2676
+ * Automatically updates the position of the floating element when necessary.
2677
+ * Should only be called when the floating element is mounted on the DOM or
2678
+ * visible on the screen.
2679
+ * @returns cleanup function that should be invoked when the floating element is
2680
+ * removed from the DOM or hidden from the screen.
2681
+ * @see https://floating-ui.com/docs/autoUpdate
2682
+ */
2683
+ function autoUpdate(reference, floating, update, options) {
2684
+ if (options === void 0) options = {};
2685
+ const { ancestorScroll = true, ancestorResize = true, elementResize = typeof ResizeObserver === "function", layoutShift = typeof IntersectionObserver === "function", animationFrame = false } = options;
2686
+ const referenceEl = unwrapElement(reference);
2687
+ const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
2688
+ ancestors.forEach((ancestor) => {
2689
+ ancestorScroll && ancestor.addEventListener("scroll", update, { passive: true });
2690
+ ancestorResize && ancestor.addEventListener("resize", update);
2691
+ });
2692
+ const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
2693
+ let reobserveFrame = -1;
2694
+ let resizeObserver = null;
2695
+ if (elementResize) {
2696
+ resizeObserver = new ResizeObserver((_ref) => {
2697
+ let [firstEntry] = _ref;
2698
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
2699
+ resizeObserver.unobserve(floating);
2700
+ cancelAnimationFrame(reobserveFrame);
2701
+ reobserveFrame = requestAnimationFrame(() => {
2702
+ var _resizeObserver;
2703
+ (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
2704
+ });
2705
+ }
2706
+ update();
2707
+ });
2708
+ if (referenceEl && !animationFrame) resizeObserver.observe(referenceEl);
2709
+ if (floating) resizeObserver.observe(floating);
2710
+ }
2711
+ let frameId;
2712
+ let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
2713
+ if (animationFrame) frameLoop();
2714
+ function frameLoop() {
2715
+ const nextRefRect = getBoundingClientRect(reference);
2716
+ if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) update();
2717
+ prevRefRect = nextRefRect;
2718
+ frameId = requestAnimationFrame(frameLoop);
2719
+ }
2720
+ update();
2721
+ return () => {
2722
+ var _resizeObserver2;
2723
+ ancestors.forEach((ancestor) => {
2724
+ ancestorScroll && ancestor.removeEventListener("scroll", update);
2725
+ ancestorResize && ancestor.removeEventListener("resize", update);
2726
+ });
2727
+ cleanupIo?.();
2728
+ (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
2729
+ resizeObserver = null;
2730
+ if (animationFrame) cancelAnimationFrame(frameId);
2731
+ };
2732
+ }
2733
+ /**
2734
+ * Modifies the placement by translating the floating element along the
2735
+ * specified axes.
2736
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
2737
+ * object may be passed.
2738
+ * @see https://floating-ui.com/docs/offset
2739
+ */
2740
+ const offset = offset$1;
2741
+ /**
2742
+ * Optimizes the visibility of the floating element by shifting it in order to
2743
+ * keep it in view when it will overflow the clipping boundary.
2744
+ * @see https://floating-ui.com/docs/shift
2745
+ */
2746
+ const shift = shift$1;
2747
+ /**
2748
+ * Optimizes the visibility of the floating element by flipping the `placement`
2749
+ * in order to keep it in view when the preferred placement(s) will overflow the
2750
+ * clipping boundary. Alternative to `autoPlacement`.
2751
+ * @see https://floating-ui.com/docs/flip
2752
+ */
2753
+ const flip = flip$1;
2754
+ /**
2755
+ * Provides data that allows you to change the size of the floating element —
2756
+ * for instance, prevent it from overflowing the clipping boundary or match the
2757
+ * width of the reference element.
2758
+ * @see https://floating-ui.com/docs/size
2759
+ */
2760
+ const size = size$1;
2761
+ /**
2762
+ * Computes the `x` and `y` coordinates that will place the floating element
2763
+ * next to a given reference element.
2764
+ */
2765
+ const computePosition = (reference, floating, options) => {
2766
+ const cache = /* @__PURE__ */ new Map();
2767
+ const mergedOptions = {
2768
+ platform,
2769
+ ...options
2770
+ };
2771
+ const platformWithCache = {
2772
+ ...mergedOptions.platform,
2773
+ _c: cache
2774
+ };
2775
+ return computePosition$1(reference, floating, {
2776
+ ...mergedOptions,
2777
+ platform: platformWithCache
2778
+ });
2779
+ };
2780
+ //#endregion
2781
+ //#region node_modules/.pnpm/@goddard-ai+ui-primitives@0.1.1_preact@10.29.2/node_modules/@goddard-ai/ui-primitives/dist/index.mjs
2782
+ function createOverlayStack() {
2783
+ const entries = y$1([]);
2784
+ let nextToken = 0;
2785
+ function register(entry) {
2786
+ const token = nextToken++;
2787
+ entries.value = [...entries.value.filter((candidate) => candidate.id !== entry.id), {
2788
+ ...entry,
2789
+ token
2790
+ }];
2791
+ return () => {
2792
+ entries.value = entries.value.filter((candidate) => candidate.token !== token);
2793
+ };
2794
+ }
2795
+ function isTopmost(id) {
2796
+ return entries.value.at(-1)?.id === id;
2797
+ }
2798
+ function contains(target) {
2799
+ if (!(target instanceof Node)) return false;
2800
+ return entries.value.some((entry) => entry.elements.some((element) => element === target || element.contains(target)));
2801
+ }
2802
+ function closeTopmost() {
2803
+ const entry = entries.value.at(-1);
2804
+ if (!entry?.close) return false;
2805
+ entries.value = entries.value.filter((candidate) => candidate.token !== entry.token);
2806
+ entry.close();
2807
+ return true;
2808
+ }
2809
+ return {
2810
+ closeTopmost,
2811
+ contains,
2812
+ entries,
2813
+ isTopmost,
2814
+ register
2815
+ };
2816
+ }
2817
+ var overlayStack = createOverlayStack();
2818
+ function startOverlayDismissal(options) {
2819
+ function closeIfTopmost(reason) {
2820
+ if (overlayStack.isTopmost(options.id)) options.close(reason);
2821
+ }
2822
+ function handleKeyDown(event) {
2823
+ if (options.dismissOnEscape === false || event.key !== "Escape") return;
2824
+ event.preventDefault();
2825
+ closeIfTopmost("escape");
2826
+ }
2827
+ function handlePointerDown(event) {
2828
+ if (options.dismissOnOutsidePointer === false || overlayStack.contains(event.target)) return;
2829
+ closeIfTopmost("outside");
2830
+ }
2831
+ document.addEventListener("keydown", handleKeyDown);
2832
+ document.addEventListener("pointerdown", handlePointerDown, true);
2833
+ return () => {
2834
+ document.removeEventListener("keydown", handleKeyDown);
2835
+ document.removeEventListener("pointerdown", handlePointerDown, true);
2836
+ };
2837
+ }
2838
+ function focusFirstElement(container) {
2839
+ const firstElement = tabbable(container)[0];
2840
+ if (!firstElement) return false;
2841
+ firstElement.focus();
2842
+ return true;
2843
+ }
2844
+ function restoreFocus(target) {
2845
+ if (target instanceof HTMLElement && document.contains(target)) target.focus();
2846
+ }
2847
+ function keepFocusInside(container, event) {
2848
+ if (event.key !== "Tab") return;
2849
+ const focusableElements = tabbable(container);
2850
+ const firstElement = focusableElements[0];
2851
+ const lastElement = focusableElements.at(-1);
2852
+ if (!firstElement || !lastElement) {
2853
+ event.preventDefault();
2854
+ container.focus();
2855
+ return;
2856
+ }
2857
+ if (event.shiftKey && document.activeElement === firstElement) {
2858
+ event.preventDefault();
2859
+ lastElement.focus();
2860
+ return;
2861
+ }
2862
+ if (!event.shiftKey && document.activeElement === lastElement) {
2863
+ event.preventDefault();
2864
+ firstElement.focus();
2865
+ }
2866
+ }
2867
+ var portalRoots = {};
2868
+ function setOverlayPortalRoots(roots) {
2869
+ Object.assign(portalRoots, roots);
2870
+ }
2871
+ function getOverlayPortalRoot(root) {
2872
+ const resolver = portalRoots[root];
2873
+ return typeof resolver === "function" ? resolver() : resolver ?? null;
2874
+ }
2875
+ function OverlayPortal(props) {
2876
+ const portalRoot = getOverlayPortalRoot(props.root);
2877
+ if (!portalRoot) return null;
2878
+ return $(props.children, portalRoot);
2879
+ }
2880
+ function startFloatingPosition(referenceElement, floatingElement, options = {}) {
2881
+ let disposed = false;
2882
+ const reference = referenceElement instanceof Element ? referenceElement : { getBoundingClientRect() {
2883
+ return new DOMRect(referenceElement.x, referenceElement.y, 0, 0);
2884
+ } };
2885
+ async function updatePosition() {
2886
+ Object.assign(floatingElement.style, {
2887
+ maxHeight: "",
2888
+ maxWidth: "",
2889
+ minHeight: "",
2890
+ minWidth: ""
2891
+ });
2892
+ const { x, y } = await computePosition(reference, floatingElement, {
2893
+ placement: options.placement ?? "bottom-start",
2894
+ strategy: options.strategy ?? "absolute",
2895
+ middleware: [
2896
+ offset(options.offset ?? 4),
2897
+ flip(),
2898
+ shift({ padding: 8 }),
2899
+ size({
2900
+ padding: 8,
2901
+ apply({ availableHeight, availableWidth, rects }) {
2902
+ const boundedAvailableHeight = Math.max(0, availableHeight);
2903
+ const boundedAvailableWidth = Math.max(0, availableWidth);
2904
+ Object.assign(floatingElement.style, {
2905
+ "--available-height": `${boundedAvailableHeight}px`,
2906
+ "--available-width": `${boundedAvailableWidth}px`,
2907
+ "--reference-width": `${rects.reference.width}px`
2908
+ });
2909
+ const floatingStyle = getComputedStyle(floatingElement);
2910
+ const cssMaxHeight = parseCssPixelSize(floatingStyle.maxHeight);
2911
+ const cssMaxWidth = parseCssPixelSize(floatingStyle.maxWidth);
2912
+ const cssMinHeight = parseCssPixelSize(floatingStyle.minHeight);
2913
+ const cssMinWidth = parseCssPixelSize(floatingStyle.minWidth);
2914
+ Object.assign(floatingElement.style, {
2915
+ maxHeight: `${Math.min(boundedAvailableHeight, cssMaxHeight ?? boundedAvailableHeight)}px`,
2916
+ maxWidth: `${Math.min(boundedAvailableWidth, cssMaxWidth ?? boundedAvailableWidth)}px`,
2917
+ minHeight: cssMinHeight !== null && cssMinHeight > boundedAvailableHeight ? `${boundedAvailableHeight}px` : "",
2918
+ minWidth: cssMinWidth !== null && cssMinWidth > boundedAvailableWidth ? `${boundedAvailableWidth}px` : "",
2919
+ width: options.sameWidth ? `${Math.min(rects.reference.width, boundedAvailableWidth)}px` : ""
2920
+ });
2921
+ }
2922
+ })
2923
+ ]
2924
+ });
2925
+ if (disposed) return;
2926
+ Object.assign(floatingElement.style, {
2927
+ left: `${x}px`,
2928
+ position: options.strategy ?? "absolute",
2929
+ top: `${y}px`
2930
+ });
2931
+ }
2932
+ const stopAutoUpdate = reference instanceof Element ? autoUpdate(reference, floatingElement, updatePosition) : (() => {
2933
+ window.addEventListener("resize", updatePosition);
2934
+ window.addEventListener("scroll", updatePosition, true);
2935
+ return () => {
2936
+ window.removeEventListener("resize", updatePosition);
2937
+ window.removeEventListener("scroll", updatePosition, true);
2938
+ };
2939
+ })();
2940
+ updatePosition();
2941
+ return () => {
2942
+ disposed = true;
2943
+ stopAutoUpdate();
2944
+ };
2945
+ }
2946
+ function parseCssPixelSize(value) {
2947
+ if (!value.endsWith("px")) return null;
2948
+ const size2 = Number.parseFloat(value);
2949
+ return Number.isFinite(size2) ? size2 : null;
2950
+ }
2951
+ var Popover__StatementBodyHook1;
2952
+ var Popover__StatementBodyHook2;
2953
+ function Popover(props) {
2954
+ if (!props.open.value) return u(Popover__StatementBodyHook1 ?? (Popover__StatementBodyHook1 = function StatementBodyHook12() {
2955
+ return null;
2956
+ }), {}, void 0, false, void 0, this);
2957
+ return u(Popover__StatementBodyHook2 ?? (Popover__StatementBodyHook2 = function StatementBodyHook22({ props: props2 }) {
2958
+ const popoverId = g$3();
2959
+ const contentRef = A$1(null);
2960
+ const close = (reason) => {
2961
+ props2.open.value = false;
2962
+ props2.onOpenChange?.(false, reason);
2963
+ };
2964
+ _$2(() => {
2965
+ const anchorElement = props2.anchor();
2966
+ const contentElement = contentRef.current;
2967
+ if (!anchorElement || !contentElement) {
2968
+ console.error("Popover opened without a mounted anchor or content element.", {
2969
+ hasAnchor: Boolean(anchorElement),
2970
+ hasContent: Boolean(contentElement)
2971
+ });
2972
+ return;
2973
+ }
2974
+ const previouslyFocusedElement = document.activeElement;
2975
+ const unregisterOverlay = overlayStack.register({
2976
+ id: popoverId,
2977
+ elements: anchorElement instanceof HTMLElement ? [anchorElement, contentElement] : [contentElement]
2978
+ });
2979
+ const stopDismissal = startOverlayDismissal({
2980
+ id: popoverId,
2981
+ dismissOnEscape: props2.closeOnEscape ?? true,
2982
+ dismissOnOutsidePointer: props2.closeOnOutsidePointer ?? true,
2983
+ close
2984
+ });
2985
+ const stopPositioning = startFloatingPosition(anchorElement, contentElement, {
2986
+ offset: props2.offset,
2987
+ placement: props2.placement,
2988
+ sameWidth: props2.sameWidth,
2989
+ strategy: props2.strategy
2990
+ });
2991
+ if (props2.focusOnOpen ?? true) {
2992
+ const initialFocusElement = props2.initialFocus?.();
2993
+ if (initialFocusElement) initialFocusElement.focus();
2994
+ else if (!focusFirstElement(contentElement)) contentElement.focus();
2995
+ }
2996
+ return () => {
2997
+ stopPositioning();
2998
+ stopDismissal();
2999
+ unregisterOverlay();
3000
+ if (props2.restoreFocus ?? true) restoreFocus(anchorElement instanceof Element ? anchorElement : previouslyFocusedElement);
3001
+ };
3002
+ }, [popoverId]);
3003
+ return u(OverlayPortal, {
3004
+ root: "menu",
3005
+ children: u(S$1, { children: [props2.blockOutsidePointer ?? props2.closeOnOutsidePointer ?? true ? u("div", {
3006
+ "aria-hidden": "true",
3007
+ "data-overlay-pointer-blocker": "true",
3008
+ style: {
3009
+ position: "fixed",
3010
+ inset: "0",
3011
+ background: "transparent",
3012
+ pointerEvents: "auto"
3013
+ }
3014
+ }, void 0, false, void 0, this) : null, u("div", {
3015
+ ref: contentRef,
3016
+ "aria-label": props2.ariaLabel,
3017
+ class: props2.class,
3018
+ role: props2.role,
3019
+ tabIndex: props2.focusOnOpen ?? true ? -1 : void 0,
3020
+ onKeyDown: (event) => {
3021
+ if (props2.modalFocus) keepFocusInside(event.currentTarget, event);
3022
+ props2.onKeyDown?.(event);
3023
+ },
3024
+ children: props2.children
3025
+ }, void 0, false, void 0, this)] }, void 0, true, void 0, this)
3026
+ }, void 0, false, void 0, this);
3027
+ }), { props }, void 0, false, void 0, this);
3028
+ }
3029
+ X$1(null);
3030
+ //#endregion
3031
+ //#region src/render/search.tsx
3032
+ const open = y$1(false);
3033
+ (async () => {
3034
+ const root = document.querySelector("#lildocs-search-root");
3035
+ if (!root) return;
3036
+ const embeddedIndex = document.querySelector("#lildocs-search-index");
3037
+ const base = new URL(window.lildocsSearchUrl || "search-index.json", document.baseURI);
3038
+ const index = embeddedIndex?.textContent ? JSON.parse(embeddedIndex.textContent) : await fetch(base).then((response) => response.json());
3039
+ const siteRoot = new URL(".", base);
3040
+ const preloadedUrls = /* @__PURE__ */ new Set();
3041
+ setOverlayPortalRoots({
3042
+ dialog: () => document.getElementById("lildocs-overlay-root"),
3043
+ menu: () => document.getElementById("lildocs-overlay-root")
3044
+ });
3045
+ document.addEventListener("mouseover", (event) => {
3046
+ const link = event.target?.closest?.("a[href]");
3047
+ if (!link) return;
3048
+ preloadRelativeUrl(link.getAttribute("href"), preloadedUrls);
3049
+ });
3050
+ U$1(/* @__PURE__ */ u(SearchBox, {
3051
+ anchorElement: root,
3052
+ index,
3053
+ siteRoot,
3054
+ preloadedUrls
3055
+ }), root);
3056
+ })();
3057
+ function SearchBox({ anchorElement, index, siteRoot, preloadedUrls }) {
3058
+ const inputRef = A$1(null);
3059
+ const selectedRef = A$1(null);
3060
+ const [query, setQuery] = d$2("");
3061
+ const [selectedIndex, setSelectedIndex] = d$2(-1);
3062
+ const matches = T$1(() => searchIndex(index, query), [index, query]);
3063
+ y$2(() => {
3064
+ selectedRef.current?.scrollIntoView({ block: "nearest" });
3065
+ preloadRelativeUrl(selectedRef.current?.getAttribute("href"), preloadedUrls);
3066
+ }, [
3067
+ matches,
3068
+ preloadedUrls,
3069
+ selectedIndex
3070
+ ]);
3071
+ const clearSearch = () => {
3072
+ setQuery("");
3073
+ setSelectedIndex(-1);
3074
+ open.value = false;
3075
+ };
3076
+ const selectResult = (nextIndex) => {
3077
+ if (matches.length === 0) {
3078
+ setSelectedIndex(-1);
3079
+ return;
3080
+ }
3081
+ setSelectedIndex((nextIndex + matches.length) % matches.length);
3082
+ };
3083
+ return /* @__PURE__ */ u(S$1, { children: [
3084
+ /* @__PURE__ */ u("span", {
3085
+ className: "searchIcon material-symbols-rounded",
3086
+ "aria-hidden": "true",
3087
+ children: "search"
3088
+ }),
3089
+ /* @__PURE__ */ u("input", {
3090
+ ref: inputRef,
3091
+ id: "lildocs-search-input",
3092
+ type: "search",
3093
+ placeholder: "Search docs",
3094
+ "aria-label": "Search docs",
3095
+ "aria-expanded": open.value,
3096
+ "aria-controls": "lildocs-search-results",
3097
+ value: query,
3098
+ onInput: (event) => {
3099
+ const nextQuery = event.currentTarget.value;
3100
+ setQuery(nextQuery);
3101
+ setSelectedIndex(nextQuery.trim() ? 0 : -1);
3102
+ open.value = Boolean(nextQuery.trim());
3103
+ },
3104
+ onKeyDown: (event) => {
3105
+ if (!open.value || matches.length === 0) return;
3106
+ if (event.key === "ArrowDown") {
3107
+ event.preventDefault();
3108
+ selectResult(selectedIndex + 1);
3109
+ return;
3110
+ }
3111
+ if (event.key === "ArrowUp") {
3112
+ event.preventDefault();
3113
+ selectResult(selectedIndex - 1);
3114
+ return;
3115
+ }
3116
+ if (event.key === "Enter") {
3117
+ event.preventDefault();
3118
+ const selected = selectedRef.current;
3119
+ if (selected) {
3120
+ preloadRelativeUrl(selected.getAttribute("href"), preloadedUrls);
3121
+ selected.click();
3122
+ }
3123
+ return;
3124
+ }
3125
+ if (event.key === "Escape") open.value = false;
3126
+ }
3127
+ }),
3128
+ /* @__PURE__ */ u(Popover, {
3129
+ open,
3130
+ anchor: () => anchorElement,
3131
+ ariaLabel: "Search results",
3132
+ class: "searchResults",
3133
+ closeOnOutsidePointer: true,
3134
+ blockOutsidePointer: false,
3135
+ focusOnOpen: false,
3136
+ restoreFocus: false,
3137
+ placement: "bottom-end",
3138
+ sameWidth: false,
3139
+ children: /* @__PURE__ */ u("div", {
3140
+ id: "lildocs-search-results",
3141
+ children: matches.length === 0 ? /* @__PURE__ */ u("p", { children: "No results" }) : matches.map((match, matchIndex) => {
3142
+ const selected = matchIndex === selectedIndex;
3143
+ return /* @__PURE__ */ u("a", {
3144
+ ref: selected ? selectedRef : void 0,
3145
+ href: new URL(match.entry.route, siteRoot).href,
3146
+ "data-search-result": "true",
3147
+ className: selected ? "selected" : void 0,
3148
+ "aria-selected": selected,
3149
+ onMouseOver: () => setSelectedIndex(matchIndex),
3150
+ onClick: clearSearch,
3151
+ children: [renderHighlighted(match.title, match.terms), /* @__PURE__ */ u("span", { children: renderHighlighted(match.subtitle, match.terms) })]
3152
+ }, `${match.entry.route}:${match.title}`);
3153
+ })
3154
+ })
3155
+ })
3156
+ ] });
3157
+ }
3158
+ function searchIndex(index, query) {
3159
+ const normalizedQuery = normalizeQuery(query);
3160
+ if (!normalizedQuery) return [];
3161
+ const terms = normalizedQuery.split(/\s+/);
3162
+ const matches = index.map((entry) => matchEntry(entry, terms, normalizedQuery)).filter(isMatch);
3163
+ const titleMatches = matches.filter((match) => match.type === "title");
3164
+ const sectionBodyMatches = matches.filter((match) => match.type === "body" && match.entry.kind === "section");
3165
+ const bodyMatches = sectionBodyMatches.length > 0 ? sectionBodyMatches : matches.filter((match) => match.type === "body");
3166
+ return (titleMatches.length < 4 ? [...titleMatches, ...bodyMatches] : titleMatches).toSorted((a, b) => b.score - a.score || a.title.localeCompare(b.title)).slice(0, 8);
3167
+ }
3168
+ function preloadRelativeUrl(href, preloadedUrls) {
3169
+ if (!href || href.startsWith("mailto:") || href.startsWith("#")) return;
3170
+ const url = new URL(href, document.baseURI);
3171
+ if (url.origin !== window.location.origin || preloadedUrls.has(url.href)) return;
3172
+ preloadedUrls.add(url.href);
3173
+ const preload = document.createElement("link");
3174
+ preload.rel = "prefetch";
3175
+ preload.href = url.href;
3176
+ document.head.append(preload);
3177
+ }
3178
+ function matchEntry(entry, terms, normalizedQuery) {
3179
+ const titleScore = scoreText(entry.title, terms, normalizedQuery);
3180
+ if (titleScore > 0) return {
3181
+ entry,
3182
+ title: entry.title,
3183
+ subtitle: subtitleForEntry(entry),
3184
+ score: (entry.kind === "page" ? 300 : 250) + titleScore,
3185
+ terms,
3186
+ type: "title"
3187
+ };
3188
+ const bodyScore = scoreText(entry.text, terms, normalizedQuery);
3189
+ if (bodyScore > 0) return {
3190
+ entry,
3191
+ title: matchingSnippet(entry.text, terms),
3192
+ subtitle: subtitleForEntry(entry),
3193
+ score: 20 + bodyScore,
3194
+ terms,
3195
+ type: "body"
3196
+ };
3197
+ }
3198
+ function scoreText(value, terms, normalizedQuery) {
3199
+ const text = value.toLowerCase();
3200
+ if (!text) return 0;
3201
+ let score = 0;
3202
+ if (text === normalizedQuery) score += 80;
3203
+ else if (text.includes(normalizedQuery)) score += 40;
3204
+ for (const term of terms) if (text.includes(term)) score += 10;
3205
+ return score;
3206
+ }
3207
+ function subtitleForEntry(entry) {
3208
+ if (entry.kind === "page") return entry.headings.slice(0, 3).join(" / ") || "Page";
3209
+ const parents = entry.headings.slice(0, -1);
3210
+ return uniqueParts([entry.pageTitle, ...parents]).join(" / ");
3211
+ }
3212
+ function matchingSnippet(text, terms) {
3213
+ const lowerText = text.toLowerCase();
3214
+ const matchStart = terms.map((term) => lowerText.indexOf(term)).filter((index) => index >= 0).toSorted((a, b) => a - b)[0] ?? 0;
3215
+ const start = Math.max(0, matchStart - 36);
3216
+ const end = Math.min(text.length, matchStart + 96);
3217
+ const prefix = start > 0 ? "... " : "";
3218
+ const suffix = end < text.length ? " ..." : "";
3219
+ return `${prefix}${text.slice(start, end).trim()}${suffix}`;
3220
+ }
3221
+ function renderHighlighted(value, terms) {
3222
+ const matchingTerms = terms.filter(Boolean).toSorted((a, b) => b.length - a.length);
3223
+ if (matchingTerms.length === 0) return value;
3224
+ const pattern = new RegExp(`(${matchingTerms.map(escapeRegExp).join("|")})`, "gi");
3225
+ return value.split(pattern).map((part) => matchingTerms.some((term) => part.toLowerCase() === term) ? /* @__PURE__ */ u("mark", { children: part }) : part);
3226
+ }
3227
+ function normalizeQuery(value) {
3228
+ return value.replace(/[^\p{L}\p{N}]+/gu, " ").replace(/\s+/g, " ").trim().toLowerCase();
3229
+ }
3230
+ function uniqueParts(parts) {
3231
+ return parts.filter((part, index) => part && parts.indexOf(part) === index);
3232
+ }
3233
+ function escapeRegExp(value) {
3234
+ return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
3235
+ }
3236
+ function isMatch(match) {
3237
+ return Boolean(match);
3238
+ }
3239
+ //#endregion