@uninspired/cookie-banner 0.0.1 → 0.0.2

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,3112 @@
1
+ import * as f from "react";
2
+ import O, { forwardRef as Yt, createElement as nt, useMemo as H, useState as de, useEffect as Xt, useCallback as St, useContext as gr, createContext as yr } from "react";
3
+ import * as br from "react-dom";
4
+ var $e, P, Jt, V, Pt, Qt, en, tn, ut, rt, ot, Ne = {}, Ie = [], wr = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Fe = Array.isArray;
5
+ function j(e, t) {
6
+ for (var n in t) e[n] = t[n];
7
+ return e;
8
+ }
9
+ function dt(e) {
10
+ e && e.parentNode && e.parentNode.removeChild(e);
11
+ }
12
+ function Cr(e, t, n) {
13
+ var r, o, s, c = {};
14
+ for (s in t) s == "key" ? r = t[s] : s == "ref" ? o = t[s] : c[s] = t[s];
15
+ if (arguments.length > 2 && (c.children = arguments.length > 3 ? $e.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null) for (s in e.defaultProps) c[s] === void 0 && (c[s] = e.defaultProps[s]);
16
+ return Re(e, c, r, o, null);
17
+ }
18
+ function Re(e, t, n, r, o) {
19
+ var s = { type: e, props: t, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: o ?? ++Jt, __i: -1, __u: 0 };
20
+ return o == null && P.vnode != null && P.vnode(s), s;
21
+ }
22
+ function te(e) {
23
+ return e.children;
24
+ }
25
+ function Oe(e, t) {
26
+ this.props = e, this.context = t;
27
+ }
28
+ function ne(e, t) {
29
+ if (t == null) return e.__ ? ne(e.__, e.__i + 1) : null;
30
+ for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) return n.__e;
31
+ return typeof e.type == "function" ? ne(e) : null;
32
+ }
33
+ function Er(e) {
34
+ if (e.__P && e.__d) {
35
+ var t = e.__v, n = t.__e, r = [], o = [], s = j({}, t);
36
+ s.__v = t.__v + 1, P.vnode && P.vnode(s), ft(e.__P, s, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? ne(t), !!(32 & t.__u), o), s.__v = t.__v, s.__.__k[s.__i] = s, sn(r, s, o), t.__e = t.__ = null, s.__e != n && nn(s);
37
+ }
38
+ }
39
+ function nn(e) {
40
+ if ((e = e.__) != null && e.__c != null) return e.__e = e.__c.base = null, e.__k.some(function(t) {
41
+ if (t != null && t.__e != null) return e.__e = e.__c.base = t.__e;
42
+ }), nn(e);
43
+ }
44
+ function Rt(e) {
45
+ (!e.__d && (e.__d = !0) && V.push(e) && !Te.__r++ || Pt != P.debounceRendering) && ((Pt = P.debounceRendering) || Qt)(Te);
46
+ }
47
+ function Te() {
48
+ for (var e, t = 1; V.length; ) V.length > t && V.sort(en), e = V.shift(), t = V.length, Er(e);
49
+ Te.__r = 0;
50
+ }
51
+ function rn(e, t, n, r, o, s, c, i, u, a, d) {
52
+ var l, m, h, b, p, _, g, y = r && r.__k || Ie, w = t.length;
53
+ for (u = Sr(n, t, y, u, w), l = 0; l < w; l++) (h = n.__k[l]) != null && (m = h.__i != -1 && y[h.__i] || Ne, h.__i = l, _ = ft(e, h, m, o, s, c, i, u, a, d), b = h.__e, h.ref && m.ref != h.ref && (m.ref && pt(m.ref, null, h), d.push(h.ref, h.__c || b, h)), p == null && b != null && (p = b), (g = !!(4 & h.__u)) || m.__k === h.__k ? u = on(h, u, e, g) : typeof h.type == "function" && _ !== void 0 ? u = _ : b && (u = b.nextSibling), h.__u &= -7);
54
+ return n.__e = p, u;
55
+ }
56
+ function Sr(e, t, n, r, o) {
57
+ var s, c, i, u, a, d = n.length, l = d, m = 0;
58
+ for (e.__k = new Array(o), s = 0; s < o; s++) (c = t[s]) != null && typeof c != "boolean" && typeof c != "function" ? (typeof c == "string" || typeof c == "number" || typeof c == "bigint" || c.constructor == String ? c = e.__k[s] = Re(null, c, null, null, null) : Fe(c) ? c = e.__k[s] = Re(te, { children: c }, null, null, null) : c.constructor === void 0 && c.__b > 0 ? c = e.__k[s] = Re(c.type, c.props, c.key, c.ref ? c.ref : null, c.__v) : e.__k[s] = c, u = s + m, c.__ = e, c.__b = e.__b + 1, i = null, (a = c.__i = Pr(c, n, u, l)) != -1 && (l--, (i = n[a]) && (i.__u |= 2)), i == null || i.__v == null ? (a == -1 && (o > d ? m-- : o < d && m++), typeof c.type != "function" && (c.__u |= 4)) : a != u && (a == u - 1 ? m-- : a == u + 1 ? m++ : (a > u ? m-- : m++, c.__u |= 4))) : e.__k[s] = null;
59
+ if (l) for (s = 0; s < d; s++) (i = n[s]) != null && (2 & i.__u) == 0 && (i.__e == r && (r = ne(i)), an(i, i));
60
+ return r;
61
+ }
62
+ function on(e, t, n, r) {
63
+ var o, s;
64
+ if (typeof e.type == "function") {
65
+ for (o = e.__k, s = 0; o && s < o.length; s++) o[s] && (o[s].__ = e, t = on(o[s], t, n, r));
66
+ return t;
67
+ }
68
+ e.__e != t && (r && (t && e.type && !t.parentNode && (t = ne(e)), n.insertBefore(e.__e, t || null)), t = e.__e);
69
+ do
70
+ t = t && t.nextSibling;
71
+ while (t != null && t.nodeType == 8);
72
+ return t;
73
+ }
74
+ function Pr(e, t, n, r) {
75
+ var o, s, c, i = e.key, u = e.type, a = t[n], d = a != null && (2 & a.__u) == 0;
76
+ if (a === null && i == null || d && i == a.key && u == a.type) return n;
77
+ if (r > (d ? 1 : 0)) {
78
+ for (o = n - 1, s = n + 1; o >= 0 || s < t.length; ) if ((a = t[c = o >= 0 ? o-- : s++]) != null && (2 & a.__u) == 0 && i == a.key && u == a.type) return c;
79
+ }
80
+ return -1;
81
+ }
82
+ function Ot(e, t, n) {
83
+ t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || wr.test(t) ? n : n + "px";
84
+ }
85
+ function me(e, t, n, r, o) {
86
+ var s, c;
87
+ e: if (t == "style") if (typeof n == "string") e.style.cssText = n;
88
+ else {
89
+ if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || Ot(e.style, t, "");
90
+ if (n) for (t in n) r && n[t] == r[t] || Ot(e.style, t, n[t]);
91
+ }
92
+ else if (t[0] == "o" && t[1] == "n") s = t != (t = t.replace(tn, "$1")), c = t.toLowerCase(), t = c in e || t == "onFocusOut" || t == "onFocusIn" ? c.slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + s] = n, n ? r ? n.u = r.u : (n.u = ut, e.addEventListener(t, s ? ot : rt, s)) : e.removeEventListener(t, s ? ot : rt, s);
93
+ else {
94
+ if (o == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
95
+ else if (t != "width" && t != "height" && t != "href" && t != "list" && t != "form" && t != "tabIndex" && t != "download" && t != "rowSpan" && t != "colSpan" && t != "role" && t != "popover" && t in e) try {
96
+ e[t] = n ?? "";
97
+ break e;
98
+ } catch {
99
+ }
100
+ typeof n == "function" || (n == null || n === !1 && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && n == 1 ? "" : n));
101
+ }
102
+ }
103
+ function At(e) {
104
+ return function(t) {
105
+ if (this.l) {
106
+ var n = this.l[t.type + e];
107
+ if (t.t == null) t.t = ut++;
108
+ else if (t.t < n.u) return;
109
+ return n(P.event ? P.event(t) : t);
110
+ }
111
+ };
112
+ }
113
+ function ft(e, t, n, r, o, s, c, i, u, a) {
114
+ var d, l, m, h, b, p, _, g, y, w, C, S, R, E, N, k = t.type;
115
+ if (t.constructor !== void 0) return null;
116
+ 128 & n.__u && (u = !!(32 & n.__u), s = [i = t.__e = n.__e]), (d = P.__b) && d(t);
117
+ e: if (typeof k == "function") try {
118
+ if (g = t.props, y = "prototype" in k && k.prototype.render, w = (d = k.contextType) && r[d.__c], C = d ? w ? w.props.value : d.__ : r, n.__c ? _ = (l = t.__c = n.__c).__ = l.__E : (y ? t.__c = l = new k(g, C) : (t.__c = l = new Oe(g, C), l.constructor = k, l.render = Or), w && w.sub(l), l.state || (l.state = {}), l.__n = r, m = l.__d = !0, l.__h = [], l._sb = []), y && l.__s == null && (l.__s = l.state), y && k.getDerivedStateFromProps != null && (l.__s == l.state && (l.__s = j({}, l.__s)), j(l.__s, k.getDerivedStateFromProps(g, l.__s))), h = l.props, b = l.state, l.__v = t, m) y && k.getDerivedStateFromProps == null && l.componentWillMount != null && l.componentWillMount(), y && l.componentDidMount != null && l.__h.push(l.componentDidMount);
119
+ else {
120
+ if (y && k.getDerivedStateFromProps == null && g !== h && l.componentWillReceiveProps != null && l.componentWillReceiveProps(g, C), t.__v == n.__v || !l.__e && l.shouldComponentUpdate != null && l.shouldComponentUpdate(g, l.__s, C) === !1) {
121
+ t.__v != n.__v && (l.props = g, l.state = l.__s, l.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.some(function(D) {
122
+ D && (D.__ = t);
123
+ }), Ie.push.apply(l.__h, l._sb), l._sb = [], l.__h.length && c.push(l);
124
+ break e;
125
+ }
126
+ l.componentWillUpdate != null && l.componentWillUpdate(g, l.__s, C), y && l.componentDidUpdate != null && l.__h.push(function() {
127
+ l.componentDidUpdate(h, b, p);
128
+ });
129
+ }
130
+ if (l.context = C, l.props = g, l.__P = e, l.__e = !1, S = P.__r, R = 0, y) l.state = l.__s, l.__d = !1, S && S(t), d = l.render(l.props, l.state, l.context), Ie.push.apply(l.__h, l._sb), l._sb = [];
131
+ else do
132
+ l.__d = !1, S && S(t), d = l.render(l.props, l.state, l.context), l.state = l.__s;
133
+ while (l.__d && ++R < 25);
134
+ l.state = l.__s, l.getChildContext != null && (r = j(j({}, r), l.getChildContext())), y && !m && l.getSnapshotBeforeUpdate != null && (p = l.getSnapshotBeforeUpdate(h, b)), E = d != null && d.type === te && d.key == null ? cn(d.props.children) : d, i = rn(e, Fe(E) ? E : [E], t, n, r, o, s, c, i, u, a), l.base = t.__e, t.__u &= -161, l.__h.length && c.push(l), _ && (l.__E = l.__ = null);
135
+ } catch (D) {
136
+ if (t.__v = null, u || s != null) if (D.then) {
137
+ for (t.__u |= u ? 160 : 128; i && i.nodeType == 8 && i.nextSibling; ) i = i.nextSibling;
138
+ s[s.indexOf(i)] = null, t.__e = i;
139
+ } else {
140
+ for (N = s.length; N--; ) dt(s[N]);
141
+ st(t);
142
+ }
143
+ else t.__e = n.__e, t.__k = n.__k, D.then || st(t);
144
+ P.__e(D, t, n);
145
+ }
146
+ else s == null && t.__v == n.__v ? (t.__k = n.__k, t.__e = n.__e) : i = t.__e = Rr(n.__e, t, n, r, o, s, c, u, a);
147
+ return (d = P.diffed) && d(t), 128 & t.__u ? void 0 : i;
148
+ }
149
+ function st(e) {
150
+ e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(st));
151
+ }
152
+ function sn(e, t, n) {
153
+ for (var r = 0; r < n.length; r++) pt(n[r], n[++r], n[++r]);
154
+ P.__c && P.__c(t, e), e.some(function(o) {
155
+ try {
156
+ e = o.__h, o.__h = [], e.some(function(s) {
157
+ s.call(o);
158
+ });
159
+ } catch (s) {
160
+ P.__e(s, o.__v);
161
+ }
162
+ });
163
+ }
164
+ function cn(e) {
165
+ return typeof e != "object" || e == null || e.__b > 0 ? e : Fe(e) ? e.map(cn) : j({}, e);
166
+ }
167
+ function Rr(e, t, n, r, o, s, c, i, u) {
168
+ var a, d, l, m, h, b, p, _ = n.props || Ne, g = t.props, y = t.type;
169
+ if (y == "svg" ? o = "http://www.w3.org/2000/svg" : y == "math" ? o = "http://www.w3.org/1998/Math/MathML" : o || (o = "http://www.w3.org/1999/xhtml"), s != null) {
170
+ for (a = 0; a < s.length; a++) if ((h = s[a]) && "setAttribute" in h == !!y && (y ? h.localName == y : h.nodeType == 3)) {
171
+ e = h, s[a] = null;
172
+ break;
173
+ }
174
+ }
175
+ if (e == null) {
176
+ if (y == null) return document.createTextNode(g);
177
+ e = document.createElementNS(o, y, g.is && g), i && (P.__m && P.__m(t, s), i = !1), s = null;
178
+ }
179
+ if (y == null) _ === g || i && e.data == g || (e.data = g);
180
+ else {
181
+ if (s = s && $e.call(e.childNodes), !i && s != null) for (_ = {}, a = 0; a < e.attributes.length; a++) _[(h = e.attributes[a]).name] = h.value;
182
+ for (a in _) h = _[a], a == "dangerouslySetInnerHTML" ? l = h : a == "children" || a in g || a == "value" && "defaultValue" in g || a == "checked" && "defaultChecked" in g || me(e, a, null, h, o);
183
+ for (a in g) h = g[a], a == "children" ? m = h : a == "dangerouslySetInnerHTML" ? d = h : a == "value" ? b = h : a == "checked" ? p = h : i && typeof h != "function" || _[a] === h || me(e, a, h, _[a], o);
184
+ if (d) i || l && (d.__html == l.__html || d.__html == e.innerHTML) || (e.innerHTML = d.__html), t.__k = [];
185
+ else if (l && (e.innerHTML = ""), rn(t.type == "template" ? e.content : e, Fe(m) ? m : [m], t, n, r, y == "foreignObject" ? "http://www.w3.org/1999/xhtml" : o, s, c, s ? s[0] : n.__k && ne(n, 0), i, u), s != null) for (a = s.length; a--; ) dt(s[a]);
186
+ i || (a = "value", y == "progress" && b == null ? e.removeAttribute("value") : b != null && (b !== e[a] || y == "progress" && !b || y == "option" && b != _[a]) && me(e, a, b, _[a], o), a = "checked", p != null && p != e[a] && me(e, a, p, _[a], o));
187
+ }
188
+ return e;
189
+ }
190
+ function pt(e, t, n) {
191
+ try {
192
+ if (typeof e == "function") {
193
+ var r = typeof e.__u == "function";
194
+ r && e.__u(), r && t == null || (e.__u = e(t));
195
+ } else e.current = t;
196
+ } catch (o) {
197
+ P.__e(o, n);
198
+ }
199
+ }
200
+ function an(e, t, n) {
201
+ var r, o;
202
+ if (P.unmount && P.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || pt(r, null, t)), (r = e.__c) != null) {
203
+ if (r.componentWillUnmount) try {
204
+ r.componentWillUnmount();
205
+ } catch (s) {
206
+ P.__e(s, t);
207
+ }
208
+ r.base = r.__P = null;
209
+ }
210
+ if (r = e.__k) for (o = 0; o < r.length; o++) r[o] && an(r[o], t, n || typeof e.type != "function");
211
+ n || dt(e.__e), e.__c = e.__ = e.__e = void 0;
212
+ }
213
+ function Or(e, t, n) {
214
+ return this.constructor(e, n);
215
+ }
216
+ function Ar(e, t, n) {
217
+ var r, o, s, c;
218
+ t == document && (t = document.documentElement), P.__ && P.__(e, t), o = (r = !1) ? null : t.__k, s = [], c = [], ft(t, e = t.__k = Cr(te, null, [e]), o || Ne, Ne, t.namespaceURI, o ? null : t.firstChild ? $e.call(t.childNodes) : null, s, o ? o.__e : t.firstChild, r, c), sn(s, e, c);
219
+ }
220
+ $e = Ie.slice, P = { __e: function(e, t, n, r) {
221
+ for (var o, s, c; t = t.__; ) if ((o = t.__c) && !o.__) try {
222
+ if ((s = o.constructor) && s.getDerivedStateFromError != null && (o.setState(s.getDerivedStateFromError(e)), c = o.__d), o.componentDidCatch != null && (o.componentDidCatch(e, r || {}), c = o.__d), c) return o.__E = o;
223
+ } catch (i) {
224
+ e = i;
225
+ }
226
+ throw e;
227
+ } }, Jt = 0, Oe.prototype.setState = function(e, t) {
228
+ var n;
229
+ n = this.__s != null && this.__s != this.state ? this.__s : this.__s = j({}, this.state), typeof e == "function" && (e = e(j({}, n), this.props)), e && j(n, e), e != null && this.__v && (t && this._sb.push(t), Rt(this));
230
+ }, Oe.prototype.forceUpdate = function(e) {
231
+ this.__v && (this.__e = !0, e && this.__h.push(e), Rt(this));
232
+ }, Oe.prototype.render = te, V = [], Qt = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, en = function(e, t) {
233
+ return e.__v.__b - t.__v.__b;
234
+ }, Te.__r = 0, tn = /(PointerCapture)$|Capture$/i, ut = 0, rt = At(!1), ot = At(!0);
235
+ var kr = 0;
236
+ function v(e, t, n, r, o, s) {
237
+ t || (t = {});
238
+ var c, i, u = t;
239
+ if ("ref" in u) for (i in u = {}, t) i == "ref" ? c = t[i] : u[i] = t[i];
240
+ var a = { type: e, props: u, key: n, ref: c, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --kr, __i: -1, __u: 0, __source: o, __self: s };
241
+ if (typeof e == "function" && (c = e.defaultProps)) for (i in c) u[i] === void 0 && (u[i] = c[i]);
242
+ return P.vnode && P.vnode(a), a;
243
+ }
244
+ function ht(...e) {
245
+ return e.filter(Boolean).join(" ");
246
+ }
247
+ function it(e) {
248
+ return Object.entries(e).filter(([, t]) => t).map(([t]) => t).join(" ");
249
+ }
250
+ const Nr = "_root_hw69b_1", Ir = "_neutral_hw69b_17", Tr = "_brand_hw69b_30", Dr = "_ghost_hw69b_43", kt = {
251
+ root: Nr,
252
+ neutral: Ir,
253
+ brand: Tr,
254
+ ghost: Dr
255
+ }, qe = ({ variant: e = "neutral", ...t }) => /* @__PURE__ */ v("button", { className: ht(kt.root, kt[e]), ...t }), xr = "_root_14l5h_1", Mr = "_muted_14l5h_4", zr = "_body_14l5h_8", Lr = "_normal_14l5h_14", $r = "_bold_14l5h_18", Fr = "_caption_14l5h_23", ge = {
256
+ root: xr,
257
+ muted: Mr,
258
+ body: zr,
259
+ normal: Lr,
260
+ bold: $r,
261
+ caption: Fr
262
+ }, q = ({
263
+ as: e = "span",
264
+ size: t = "body",
265
+ weight: n = "normal",
266
+ color: r = "default",
267
+ ...o
268
+ }) => (
269
+ // @ts-ignore
270
+ /* @__PURE__ */ v(
271
+ e ?? "span",
272
+ {
273
+ className: ht(
274
+ ge.root,
275
+ ge[t],
276
+ ge[n],
277
+ ge[r]
278
+ ),
279
+ ...o
280
+ }
281
+ )
282
+ ), jr = "_root_1wsw7_42", Wr = "_noTarget_1wsw7_53", Br = "_collapsible_1wsw7_62", Ur = "_header_1wsw7_65", Zr = "_heading_1wsw7_72", Vr = "_chevron_1wsw7_78", Hr = "_open_1wsw7_83", Kr = "_settings_1wsw7_89", qr = "_footer_1wsw7_103", Gr = "_legal_1wsw7_110", Yr = "_actions_1wsw7_113", x = {
283
+ root: jr,
284
+ noTarget: Wr,
285
+ collapsible: Br,
286
+ header: Ur,
287
+ heading: Zr,
288
+ chevron: Vr,
289
+ open: Hr,
290
+ settings: Kr,
291
+ footer: qr,
292
+ legal: Gr,
293
+ actions: Yr
294
+ }, Xr = "_root_mqtha_19", Jr = "_header_mqtha_24", Qr = "_label_mqtha_33", eo = "_actions_mqtha_39", to = "_chevron_mqtha_45", no = "_open_mqtha_51", ro = "_description_mqtha_58", Z = {
295
+ root: Xr,
296
+ header: Jr,
297
+ label: Qr,
298
+ actions: eo,
299
+ chevron: to,
300
+ open: no,
301
+ description: ro
302
+ };
303
+ function A(e, t, n) {
304
+ function r(i, u) {
305
+ if (i._zod || Object.defineProperty(i, "_zod", {
306
+ value: {
307
+ def: u,
308
+ constr: c,
309
+ traits: /* @__PURE__ */ new Set()
310
+ },
311
+ enumerable: !1
312
+ }), i._zod.traits.has(e))
313
+ return;
314
+ i._zod.traits.add(e), t(i, u);
315
+ const a = c.prototype, d = Object.keys(a);
316
+ for (let l = 0; l < d.length; l++) {
317
+ const m = d[l];
318
+ m in i || (i[m] = a[m].bind(i));
319
+ }
320
+ }
321
+ const o = n?.Parent ?? Object;
322
+ class s extends o {
323
+ }
324
+ Object.defineProperty(s, "name", { value: e });
325
+ function c(i) {
326
+ var u;
327
+ const a = n?.Parent ? new s() : this;
328
+ r(a, i), (u = a._zod).deferred ?? (u.deferred = []);
329
+ for (const d of a._zod.deferred)
330
+ d();
331
+ return a;
332
+ }
333
+ return Object.defineProperty(c, "init", { value: r }), Object.defineProperty(c, Symbol.hasInstance, {
334
+ value: (i) => n?.Parent && i instanceof n.Parent ? !0 : i?._zod?.traits?.has(e)
335
+ }), Object.defineProperty(c, "name", { value: e }), c;
336
+ }
337
+ class le extends Error {
338
+ constructor() {
339
+ super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
340
+ }
341
+ }
342
+ const oo = {};
343
+ function oe(e) {
344
+ return oo;
345
+ }
346
+ function so(e, t) {
347
+ return typeof t == "bigint" ? t.toString() : t;
348
+ }
349
+ function ln(e) {
350
+ return {
351
+ get value() {
352
+ {
353
+ const t = e();
354
+ return Object.defineProperty(this, "value", { value: t }), t;
355
+ }
356
+ }
357
+ };
358
+ }
359
+ function un(e) {
360
+ const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
361
+ return e.slice(t, n);
362
+ }
363
+ const Nt = /* @__PURE__ */ Symbol("evaluating");
364
+ function $(e, t, n) {
365
+ let r;
366
+ Object.defineProperty(e, t, {
367
+ get() {
368
+ if (r !== Nt)
369
+ return r === void 0 && (r = Nt, r = n()), r;
370
+ },
371
+ set(o) {
372
+ Object.defineProperty(e, t, {
373
+ value: o
374
+ // configurable: true,
375
+ });
376
+ },
377
+ configurable: !0
378
+ });
379
+ }
380
+ const dn = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
381
+ };
382
+ function De(e) {
383
+ return typeof e == "object" && e !== null && !Array.isArray(e);
384
+ }
385
+ function io(e) {
386
+ if (De(e) === !1)
387
+ return !1;
388
+ const t = e.constructor;
389
+ if (t === void 0 || typeof t != "function")
390
+ return !0;
391
+ const n = t.prototype;
392
+ return !(De(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
393
+ }
394
+ function It(e) {
395
+ return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
396
+ }
397
+ function co(e, t, n) {
398
+ const r = new e._zod.constr(t ?? e._zod.def);
399
+ return (!t || n?.parent) && (r._zod.parent = e), r;
400
+ }
401
+ function se(e) {
402
+ return {};
403
+ }
404
+ function ao(e) {
405
+ return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
406
+ }
407
+ function ce(e, t = 0) {
408
+ if (e.aborted === !0)
409
+ return !0;
410
+ for (let n = t; n < e.issues.length; n++)
411
+ if (e.issues[n]?.continue !== !0)
412
+ return !0;
413
+ return !1;
414
+ }
415
+ function ae(e, t) {
416
+ return t.map((n) => {
417
+ var r;
418
+ return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
419
+ });
420
+ }
421
+ function ye(e) {
422
+ return typeof e == "string" ? e : e?.message;
423
+ }
424
+ function ie(e, t, n) {
425
+ const r = { ...e, path: e.path ?? [] };
426
+ if (!e.message) {
427
+ const o = ye(e.inst?._zod.def?.error?.(e)) ?? ye(t?.error?.(e)) ?? ye(n.customError?.(e)) ?? ye(n.localeError?.(e)) ?? "Invalid input";
428
+ r.message = o;
429
+ }
430
+ return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
431
+ }
432
+ const fn = (e, t) => {
433
+ e.name = "$ZodError", Object.defineProperty(e, "_zod", {
434
+ value: e._zod,
435
+ enumerable: !1
436
+ }), Object.defineProperty(e, "issues", {
437
+ value: t,
438
+ enumerable: !1
439
+ }), e.message = JSON.stringify(t, so, 2), Object.defineProperty(e, "toString", {
440
+ value: () => e.message,
441
+ enumerable: !1
442
+ });
443
+ }, lo = A("$ZodError", fn), je = A("$ZodError", fn, { Parent: Error }), uo = (e) => (t, n, r, o) => {
444
+ const s = r ? Object.assign(r, { async: !1 }) : { async: !1 }, c = t._zod.run({ value: n, issues: [] }, s);
445
+ if (c instanceof Promise)
446
+ throw new le();
447
+ if (c.issues.length) {
448
+ const i = new (o?.Err ?? e)(c.issues.map((u) => ie(u, s, oe())));
449
+ throw dn(i, o?.callee), i;
450
+ }
451
+ return c.value;
452
+ }, fo = /* @__PURE__ */ uo(je), po = (e) => async (t, n, r, o) => {
453
+ const s = r ? Object.assign(r, { async: !0 }) : { async: !0 };
454
+ let c = t._zod.run({ value: n, issues: [] }, s);
455
+ if (c instanceof Promise && (c = await c), c.issues.length) {
456
+ const i = new (o?.Err ?? e)(c.issues.map((u) => ie(u, s, oe())));
457
+ throw dn(i, o?.callee), i;
458
+ }
459
+ return c.value;
460
+ }, ho = /* @__PURE__ */ po(je), vo = (e) => (t, n, r) => {
461
+ const o = r ? { ...r, async: !1 } : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, o);
462
+ if (s instanceof Promise)
463
+ throw new le();
464
+ return s.issues.length ? {
465
+ success: !1,
466
+ error: new (e ?? lo)(s.issues.map((c) => ie(c, o, oe())))
467
+ } : { success: !0, data: s.value };
468
+ }, pn = /* @__PURE__ */ vo(je), _o = (e) => async (t, n, r) => {
469
+ const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
470
+ let s = t._zod.run({ value: n, issues: [] }, o);
471
+ return s instanceof Promise && (s = await s), s.issues.length ? {
472
+ success: !1,
473
+ error: new e(s.issues.map((c) => ie(c, o, oe())))
474
+ } : { success: !0, data: s.value };
475
+ }, hn = /* @__PURE__ */ _o(je), mo = (e) => {
476
+ const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
477
+ return new RegExp(`^${t}$`);
478
+ }, go = /^-?\d+(?:\.\d+)?$/, yo = /^(?:true|false)$/i, bo = {
479
+ major: 4,
480
+ minor: 3,
481
+ patch: 6
482
+ }, U = /* @__PURE__ */ A("$ZodType", (e, t) => {
483
+ var n;
484
+ e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = bo;
485
+ const r = [...e._zod.def.checks ?? []];
486
+ e._zod.traits.has("$ZodCheck") && r.unshift(e);
487
+ for (const o of r)
488
+ for (const s of o._zod.onattach)
489
+ s(e);
490
+ if (r.length === 0)
491
+ (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
492
+ e._zod.run = e._zod.parse;
493
+ });
494
+ else {
495
+ const o = (c, i, u) => {
496
+ let a = ce(c), d;
497
+ for (const l of i) {
498
+ if (l._zod.def.when) {
499
+ if (!l._zod.def.when(c))
500
+ continue;
501
+ } else if (a)
502
+ continue;
503
+ const m = c.issues.length, h = l._zod.check(c);
504
+ if (h instanceof Promise && u?.async === !1)
505
+ throw new le();
506
+ if (d || h instanceof Promise)
507
+ d = (d ?? Promise.resolve()).then(async () => {
508
+ await h, c.issues.length !== m && (a || (a = ce(c, m)));
509
+ });
510
+ else {
511
+ if (c.issues.length === m)
512
+ continue;
513
+ a || (a = ce(c, m));
514
+ }
515
+ }
516
+ return d ? d.then(() => c) : c;
517
+ }, s = (c, i, u) => {
518
+ if (ce(c))
519
+ return c.aborted = !0, c;
520
+ const a = o(i, r, u);
521
+ if (a instanceof Promise) {
522
+ if (u.async === !1)
523
+ throw new le();
524
+ return a.then((d) => e._zod.parse(d, u));
525
+ }
526
+ return e._zod.parse(a, u);
527
+ };
528
+ e._zod.run = (c, i) => {
529
+ if (i.skipChecks)
530
+ return e._zod.parse(c, i);
531
+ if (i.direction === "backward") {
532
+ const a = e._zod.parse({ value: c.value, issues: [] }, { ...i, skipChecks: !0 });
533
+ return a instanceof Promise ? a.then((d) => s(d, c, i)) : s(a, c, i);
534
+ }
535
+ const u = e._zod.parse(c, i);
536
+ if (u instanceof Promise) {
537
+ if (i.async === !1)
538
+ throw new le();
539
+ return u.then((a) => o(a, r, i));
540
+ }
541
+ return o(u, r, i);
542
+ };
543
+ }
544
+ $(e, "~standard", () => ({
545
+ validate: (o) => {
546
+ try {
547
+ const s = pn(e, o);
548
+ return s.success ? { value: s.data } : { issues: s.error?.issues };
549
+ } catch {
550
+ return hn(e, o).then((c) => c.success ? { value: c.data } : { issues: c.error?.issues });
551
+ }
552
+ },
553
+ vendor: "zod",
554
+ version: 1
555
+ }));
556
+ }), wo = /* @__PURE__ */ A("$ZodString", (e, t) => {
557
+ U.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? mo(e._zod.bag), e._zod.parse = (n, r) => {
558
+ if (t.coerce)
559
+ try {
560
+ n.value = String(n.value);
561
+ } catch {
562
+ }
563
+ return typeof n.value == "string" || n.issues.push({
564
+ expected: "string",
565
+ code: "invalid_type",
566
+ input: n.value,
567
+ inst: e
568
+ }), n;
569
+ };
570
+ }), Co = /* @__PURE__ */ A("$ZodBoolean", (e, t) => {
571
+ U.init(e, t), e._zod.pattern = yo, e._zod.parse = (n, r) => {
572
+ if (t.coerce)
573
+ try {
574
+ n.value = !!n.value;
575
+ } catch {
576
+ }
577
+ const o = n.value;
578
+ return typeof o == "boolean" || n.issues.push({
579
+ expected: "boolean",
580
+ code: "invalid_type",
581
+ input: o,
582
+ inst: e
583
+ }), n;
584
+ };
585
+ });
586
+ function xe(e, t, n, r, o) {
587
+ if (e.issues.length) {
588
+ if (o && !(n in r))
589
+ return;
590
+ t.issues.push(...ae(n, e.issues));
591
+ }
592
+ e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
593
+ }
594
+ function Eo(e) {
595
+ const t = Object.keys(e.shape);
596
+ for (const r of t)
597
+ if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
598
+ throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
599
+ const n = ao(e.shape);
600
+ return {
601
+ ...e,
602
+ keys: t,
603
+ keySet: new Set(t),
604
+ numKeys: t.length,
605
+ optionalKeys: new Set(n)
606
+ };
607
+ }
608
+ function So(e, t, n, r, o, s) {
609
+ const c = [], i = o.keySet, u = o.catchall._zod, a = u.def.type, d = u.optout === "optional";
610
+ for (const l in t) {
611
+ if (i.has(l))
612
+ continue;
613
+ if (a === "never") {
614
+ c.push(l);
615
+ continue;
616
+ }
617
+ const m = u.run({ value: t[l], issues: [] }, r);
618
+ m instanceof Promise ? e.push(m.then((h) => xe(h, n, l, t, d))) : xe(m, n, l, t, d);
619
+ }
620
+ return c.length && n.issues.push({
621
+ code: "unrecognized_keys",
622
+ keys: c,
623
+ input: t,
624
+ inst: s
625
+ }), e.length ? Promise.all(e).then(() => n) : n;
626
+ }
627
+ const Po = /* @__PURE__ */ A("$ZodObject", (e, t) => {
628
+ if (U.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
629
+ const i = t.shape;
630
+ Object.defineProperty(t, "shape", {
631
+ get: () => {
632
+ const u = { ...i };
633
+ return Object.defineProperty(t, "shape", {
634
+ value: u
635
+ }), u;
636
+ }
637
+ });
638
+ }
639
+ const r = ln(() => Eo(t));
640
+ $(e._zod, "propValues", () => {
641
+ const i = t.shape, u = {};
642
+ for (const a in i) {
643
+ const d = i[a]._zod;
644
+ if (d.values) {
645
+ u[a] ?? (u[a] = /* @__PURE__ */ new Set());
646
+ for (const l of d.values)
647
+ u[a].add(l);
648
+ }
649
+ }
650
+ return u;
651
+ });
652
+ const o = De, s = t.catchall;
653
+ let c;
654
+ e._zod.parse = (i, u) => {
655
+ c ?? (c = r.value);
656
+ const a = i.value;
657
+ if (!o(a))
658
+ return i.issues.push({
659
+ expected: "object",
660
+ code: "invalid_type",
661
+ input: a,
662
+ inst: e
663
+ }), i;
664
+ i.value = {};
665
+ const d = [], l = c.shape;
666
+ for (const m of c.keys) {
667
+ const h = l[m], b = h._zod.optout === "optional", p = h._zod.run({ value: a[m], issues: [] }, u);
668
+ p instanceof Promise ? d.push(p.then((_) => xe(_, i, m, a, b))) : xe(p, i, m, a, b);
669
+ }
670
+ return s ? So(d, a, i, u, r.value, e) : d.length ? Promise.all(d).then(() => i) : i;
671
+ };
672
+ });
673
+ function Tt(e, t, n, r) {
674
+ for (const s of e)
675
+ if (s.issues.length === 0)
676
+ return t.value = s.value, t;
677
+ const o = e.filter((s) => !ce(s));
678
+ return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
679
+ code: "invalid_union",
680
+ input: t.value,
681
+ inst: n,
682
+ errors: e.map((s) => s.issues.map((c) => ie(c, r, oe())))
683
+ }), t);
684
+ }
685
+ const Ro = /* @__PURE__ */ A("$ZodUnion", (e, t) => {
686
+ U.init(e, t), $(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), $(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), $(e._zod, "values", () => {
687
+ if (t.options.every((o) => o._zod.values))
688
+ return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
689
+ }), $(e._zod, "pattern", () => {
690
+ if (t.options.every((o) => o._zod.pattern)) {
691
+ const o = t.options.map((s) => s._zod.pattern);
692
+ return new RegExp(`^(${o.map((s) => un(s.source)).join("|")})$`);
693
+ }
694
+ });
695
+ const n = t.options.length === 1, r = t.options[0]._zod.run;
696
+ e._zod.parse = (o, s) => {
697
+ if (n)
698
+ return r(o, s);
699
+ let c = !1;
700
+ const i = [];
701
+ for (const u of t.options) {
702
+ const a = u._zod.run({
703
+ value: o.value,
704
+ issues: []
705
+ }, s);
706
+ if (a instanceof Promise)
707
+ i.push(a), c = !0;
708
+ else {
709
+ if (a.issues.length === 0)
710
+ return a;
711
+ i.push(a);
712
+ }
713
+ }
714
+ return c ? Promise.all(i).then((u) => Tt(u, o, e, s)) : Tt(i, o, e, s);
715
+ };
716
+ }), Oo = /* @__PURE__ */ A("$ZodDiscriminatedUnion", (e, t) => {
717
+ t.inclusive = !1, Ro.init(e, t);
718
+ const n = e._zod.parse;
719
+ $(e._zod, "propValues", () => {
720
+ const o = {};
721
+ for (const s of t.options) {
722
+ const c = s._zod.propValues;
723
+ if (!c || Object.keys(c).length === 0)
724
+ throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);
725
+ for (const [i, u] of Object.entries(c)) {
726
+ o[i] || (o[i] = /* @__PURE__ */ new Set());
727
+ for (const a of u)
728
+ o[i].add(a);
729
+ }
730
+ }
731
+ return o;
732
+ });
733
+ const r = ln(() => {
734
+ const o = t.options, s = /* @__PURE__ */ new Map();
735
+ for (const c of o) {
736
+ const i = c._zod.propValues?.[t.discriminator];
737
+ if (!i || i.size === 0)
738
+ throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);
739
+ for (const u of i) {
740
+ if (s.has(u))
741
+ throw new Error(`Duplicate discriminator value "${String(u)}"`);
742
+ s.set(u, c);
743
+ }
744
+ }
745
+ return s;
746
+ });
747
+ e._zod.parse = (o, s) => {
748
+ const c = o.value;
749
+ if (!De(c))
750
+ return o.issues.push({
751
+ code: "invalid_type",
752
+ expected: "object",
753
+ input: c,
754
+ inst: e
755
+ }), o;
756
+ const i = r.value.get(c?.[t.discriminator]);
757
+ return i ? i._zod.run(o, s) : t.unionFallback ? n(o, s) : (o.issues.push({
758
+ code: "invalid_union",
759
+ errors: [],
760
+ note: "No matching discriminator",
761
+ discriminator: t.discriminator,
762
+ input: c,
763
+ path: [t.discriminator],
764
+ inst: e
765
+ }), o);
766
+ };
767
+ }), Ao = /* @__PURE__ */ A("$ZodRecord", (e, t) => {
768
+ U.init(e, t), e._zod.parse = (n, r) => {
769
+ const o = n.value;
770
+ if (!io(o))
771
+ return n.issues.push({
772
+ expected: "record",
773
+ code: "invalid_type",
774
+ input: o,
775
+ inst: e
776
+ }), n;
777
+ const s = [], c = t.keyType._zod.values;
778
+ if (c) {
779
+ n.value = {};
780
+ const i = /* @__PURE__ */ new Set();
781
+ for (const a of c)
782
+ if (typeof a == "string" || typeof a == "number" || typeof a == "symbol") {
783
+ i.add(typeof a == "number" ? a.toString() : a);
784
+ const d = t.valueType._zod.run({ value: o[a], issues: [] }, r);
785
+ d instanceof Promise ? s.push(d.then((l) => {
786
+ l.issues.length && n.issues.push(...ae(a, l.issues)), n.value[a] = l.value;
787
+ })) : (d.issues.length && n.issues.push(...ae(a, d.issues)), n.value[a] = d.value);
788
+ }
789
+ let u;
790
+ for (const a in o)
791
+ i.has(a) || (u = u ?? [], u.push(a));
792
+ u && u.length > 0 && n.issues.push({
793
+ code: "unrecognized_keys",
794
+ input: o,
795
+ inst: e,
796
+ keys: u
797
+ });
798
+ } else {
799
+ n.value = {};
800
+ for (const i of Reflect.ownKeys(o)) {
801
+ if (i === "__proto__")
802
+ continue;
803
+ let u = t.keyType._zod.run({ value: i, issues: [] }, r);
804
+ if (u instanceof Promise)
805
+ throw new Error("Async schemas not supported in object keys currently");
806
+ if (typeof i == "string" && go.test(i) && u.issues.length) {
807
+ const l = t.keyType._zod.run({ value: Number(i), issues: [] }, r);
808
+ if (l instanceof Promise)
809
+ throw new Error("Async schemas not supported in object keys currently");
810
+ l.issues.length === 0 && (u = l);
811
+ }
812
+ if (u.issues.length) {
813
+ t.mode === "loose" ? n.value[i] = o[i] : n.issues.push({
814
+ code: "invalid_key",
815
+ origin: "record",
816
+ issues: u.issues.map((l) => ie(l, r, oe())),
817
+ input: i,
818
+ path: [i],
819
+ inst: e
820
+ });
821
+ continue;
822
+ }
823
+ const d = t.valueType._zod.run({ value: o[i], issues: [] }, r);
824
+ d instanceof Promise ? s.push(d.then((l) => {
825
+ l.issues.length && n.issues.push(...ae(i, l.issues)), n.value[u.value] = l.value;
826
+ })) : (d.issues.length && n.issues.push(...ae(i, d.issues)), n.value[u.value] = d.value);
827
+ }
828
+ }
829
+ return s.length ? Promise.all(s).then(() => n) : n;
830
+ };
831
+ }), ko = /* @__PURE__ */ A("$ZodLiteral", (e, t) => {
832
+ if (U.init(e, t), t.values.length === 0)
833
+ throw new Error("Cannot create literal schema with no valid values");
834
+ const n = new Set(t.values);
835
+ e._zod.values = n, e._zod.pattern = new RegExp(`^(${t.values.map((r) => typeof r == "string" ? It(r) : r ? It(r.toString()) : String(r)).join("|")})$`), e._zod.parse = (r, o) => {
836
+ const s = r.value;
837
+ return n.has(s) || r.issues.push({
838
+ code: "invalid_value",
839
+ values: t.values,
840
+ input: s,
841
+ inst: e
842
+ }), r;
843
+ };
844
+ });
845
+ function Dt(e, t) {
846
+ return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
847
+ }
848
+ const No = /* @__PURE__ */ A("$ZodOptional", (e, t) => {
849
+ U.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", $(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), $(e._zod, "pattern", () => {
850
+ const n = t.innerType._zod.pattern;
851
+ return n ? new RegExp(`^(${un(n.source)})?$`) : void 0;
852
+ }), e._zod.parse = (n, r) => {
853
+ if (t.innerType._zod.optin === "optional") {
854
+ const o = t.innerType._zod.run(n, r);
855
+ return o instanceof Promise ? o.then((s) => Dt(s, n.value)) : Dt(o, n.value);
856
+ }
857
+ return n.value === void 0 ? n : t.innerType._zod.run(n, r);
858
+ };
859
+ });
860
+ // @__NO_SIDE_EFFECTS__
861
+ function Io(e, t) {
862
+ return new e({
863
+ type: "string",
864
+ ...se()
865
+ });
866
+ }
867
+ // @__NO_SIDE_EFFECTS__
868
+ function To(e, t) {
869
+ return new e({
870
+ type: "boolean",
871
+ ...se()
872
+ });
873
+ }
874
+ const Y = /* @__PURE__ */ A("ZodMiniType", (e, t) => {
875
+ if (!e._zod)
876
+ throw new Error("Uninitialized schema in ZodMiniType.");
877
+ U.init(e, t), e.def = t, e.type = t.type, e.parse = (n, r) => fo(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => pn(e, n, r), e.parseAsync = async (n, r) => ho(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => hn(e, n, r), e.check = (...n) => e.clone({
878
+ ...t,
879
+ checks: [
880
+ ...t.checks ?? [],
881
+ ...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
882
+ ]
883
+ }, { parent: !0 }), e.with = e.check, e.clone = (n, r) => co(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.apply = (n) => n(e);
884
+ }), Do = /* @__PURE__ */ A("ZodMiniString", (e, t) => {
885
+ wo.init(e, t), Y.init(e, t);
886
+ });
887
+ // @__NO_SIDE_EFFECTS__
888
+ function K(e) {
889
+ return /* @__PURE__ */ Io(Do);
890
+ }
891
+ const xo = /* @__PURE__ */ A("ZodMiniBoolean", (e, t) => {
892
+ Co.init(e, t), Y.init(e, t);
893
+ });
894
+ // @__NO_SIDE_EFFECTS__
895
+ function fe(e) {
896
+ return /* @__PURE__ */ To(xo);
897
+ }
898
+ const Mo = /* @__PURE__ */ A("ZodMiniObject", (e, t) => {
899
+ Po.init(e, t), Y.init(e, t), $(e, "shape", () => t.shape);
900
+ });
901
+ // @__NO_SIDE_EFFECTS__
902
+ function vn(e, t) {
903
+ const n = {
904
+ type: "object",
905
+ shape: e ?? {},
906
+ ...se()
907
+ };
908
+ return new Mo(n);
909
+ }
910
+ const zo = /* @__PURE__ */ A("ZodMiniDiscriminatedUnion", (e, t) => {
911
+ Oo.init(e, t), Y.init(e, t);
912
+ });
913
+ // @__NO_SIDE_EFFECTS__
914
+ function Lo(e, t, n) {
915
+ return new zo({
916
+ type: "union",
917
+ options: t,
918
+ discriminator: e,
919
+ ...se()
920
+ });
921
+ }
922
+ const $o = /* @__PURE__ */ A("ZodMiniRecord", (e, t) => {
923
+ Ao.init(e, t), Y.init(e, t);
924
+ });
925
+ // @__NO_SIDE_EFFECTS__
926
+ function Fo(e, t, n) {
927
+ return new $o({
928
+ type: "record",
929
+ keyType: e,
930
+ valueType: t,
931
+ ...se()
932
+ });
933
+ }
934
+ const jo = /* @__PURE__ */ A("ZodMiniLiteral", (e, t) => {
935
+ ko.init(e, t), Y.init(e, t);
936
+ });
937
+ // @__NO_SIDE_EFFECTS__
938
+ function _n(e, t) {
939
+ return new jo({
940
+ type: "literal",
941
+ values: Array.isArray(e) ? e : [e],
942
+ ...se()
943
+ });
944
+ }
945
+ const Wo = /* @__PURE__ */ A("ZodMiniOptional", (e, t) => {
946
+ No.init(e, t), Y.init(e, t);
947
+ });
948
+ // @__NO_SIDE_EFFECTS__
949
+ function B(e) {
950
+ return new Wo({
951
+ type: "optional",
952
+ innerType: e
953
+ });
954
+ }
955
+ const Bo = /* @__PURE__ */ vn({
956
+ variant: /* @__PURE__ */ _n("remote"),
957
+ type: /* @__PURE__ */ B(/* @__PURE__ */ K()),
958
+ src: /* @__PURE__ */ K(),
959
+ async: /* @__PURE__ */ B(/* @__PURE__ */ fe()),
960
+ defer: /* @__PURE__ */ B(/* @__PURE__ */ fe()),
961
+ crossorigin: /* @__PURE__ */ B(/* @__PURE__ */ K()),
962
+ integrity: /* @__PURE__ */ B(/* @__PURE__ */ K())
963
+ }), Uo = /* @__PURE__ */ vn({
964
+ variant: /* @__PURE__ */ _n("inline"),
965
+ type: /* @__PURE__ */ B(/* @__PURE__ */ K()),
966
+ async: /* @__PURE__ */ B(/* @__PURE__ */ fe()),
967
+ defer: /* @__PURE__ */ B(/* @__PURE__ */ fe()),
968
+ content: /* @__PURE__ */ K()
969
+ }), Zo = /* @__PURE__ */ Lo("variant", [
970
+ Bo,
971
+ Uo
972
+ ]);
973
+ function Vo(e, t) {
974
+ const n = f.createContext(t), r = (s) => {
975
+ const { children: c, ...i } = s, u = f.useMemo(() => i, Object.values(i));
976
+ return /* @__PURE__ */ v(n.Provider, { value: u, children: c });
977
+ };
978
+ r.displayName = e + "Provider";
979
+ function o(s) {
980
+ const c = f.useContext(n);
981
+ if (c) return c;
982
+ if (t !== void 0) return t;
983
+ throw new Error(`\`${s}\` must be used within \`${e}\``);
984
+ }
985
+ return [r, o];
986
+ }
987
+ function he(e, t = []) {
988
+ let n = [];
989
+ function r(s, c) {
990
+ const i = f.createContext(c), u = n.length;
991
+ n = [...n, c];
992
+ const a = (l) => {
993
+ const { scope: m, children: h, ...b } = l, p = m?.[e]?.[u] || i, _ = f.useMemo(() => b, Object.values(b));
994
+ return /* @__PURE__ */ v(p.Provider, { value: _, children: h });
995
+ };
996
+ a.displayName = s + "Provider";
997
+ function d(l, m) {
998
+ const h = m?.[e]?.[u] || i, b = f.useContext(h);
999
+ if (b) return b;
1000
+ if (c !== void 0) return c;
1001
+ throw new Error(`\`${l}\` must be used within \`${s}\``);
1002
+ }
1003
+ return [a, d];
1004
+ }
1005
+ const o = () => {
1006
+ const s = n.map((c) => f.createContext(c));
1007
+ return function(i) {
1008
+ const u = i?.[e] || s;
1009
+ return f.useMemo(
1010
+ () => ({ [`__scope${e}`]: { ...i, [e]: u } }),
1011
+ [i, u]
1012
+ );
1013
+ };
1014
+ };
1015
+ return o.scopeName = e, [r, Ho(o, ...t)];
1016
+ }
1017
+ function Ho(...e) {
1018
+ const t = e[0];
1019
+ if (e.length === 1) return t;
1020
+ const n = () => {
1021
+ const r = e.map((o) => ({
1022
+ useScope: o(),
1023
+ scopeName: o.scopeName
1024
+ }));
1025
+ return function(s) {
1026
+ const c = r.reduce((i, { useScope: u, scopeName: a }) => {
1027
+ const l = u(s)[`__scope${a}`];
1028
+ return { ...i, ...l };
1029
+ }, {});
1030
+ return f.useMemo(() => ({ [`__scope${t.scopeName}`]: c }), [c]);
1031
+ };
1032
+ };
1033
+ return n.scopeName = t.scopeName, n;
1034
+ }
1035
+ function xt(e, t) {
1036
+ if (typeof e == "function")
1037
+ return e(t);
1038
+ e != null && (e.current = t);
1039
+ }
1040
+ function mn(...e) {
1041
+ return (t) => {
1042
+ let n = !1;
1043
+ const r = e.map((o) => {
1044
+ const s = xt(o, t);
1045
+ return !n && typeof s == "function" && (n = !0), s;
1046
+ });
1047
+ if (n)
1048
+ return () => {
1049
+ for (let o = 0; o < r.length; o++) {
1050
+ const s = r[o];
1051
+ typeof s == "function" ? s() : xt(e[o], null);
1052
+ }
1053
+ };
1054
+ };
1055
+ }
1056
+ function T(...e) {
1057
+ return f.useCallback(mn(...e), e);
1058
+ }
1059
+ // @__NO_SIDE_EFFECTS__
1060
+ function Me(e) {
1061
+ const t = /* @__PURE__ */ Ko(e), n = f.forwardRef((r, o) => {
1062
+ const { children: s, ...c } = r, i = f.Children.toArray(s), u = i.find(Go);
1063
+ if (u) {
1064
+ const a = u.props.children, d = i.map((l) => l === u ? f.Children.count(a) > 1 ? f.Children.only(null) : f.isValidElement(a) ? a.props.children : null : l);
1065
+ return /* @__PURE__ */ v(t, { ...c, ref: o, children: f.isValidElement(a) ? f.cloneElement(a, void 0, d) : null });
1066
+ }
1067
+ return /* @__PURE__ */ v(t, { ...c, ref: o, children: s });
1068
+ });
1069
+ return n.displayName = `${e}.Slot`, n;
1070
+ }
1071
+ // @__NO_SIDE_EFFECTS__
1072
+ function Ko(e) {
1073
+ const t = f.forwardRef((n, r) => {
1074
+ const { children: o, ...s } = n;
1075
+ if (f.isValidElement(o)) {
1076
+ const c = Xo(o), i = Yo(s, o.props);
1077
+ return o.type !== f.Fragment && (i.ref = r ? mn(r, c) : c), f.cloneElement(o, i);
1078
+ }
1079
+ return f.Children.count(o) > 1 ? f.Children.only(null) : null;
1080
+ });
1081
+ return t.displayName = `${e}.SlotClone`, t;
1082
+ }
1083
+ var qo = /* @__PURE__ */ Symbol("radix.slottable");
1084
+ function Go(e) {
1085
+ return f.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === qo;
1086
+ }
1087
+ function Yo(e, t) {
1088
+ const n = { ...t };
1089
+ for (const r in t) {
1090
+ const o = e[r], s = t[r];
1091
+ /^on[A-Z]/.test(r) ? o && s ? n[r] = (...i) => {
1092
+ const u = s(...i);
1093
+ return o(...i), u;
1094
+ } : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...s } : r === "className" && (n[r] = [o, s].filter(Boolean).join(" "));
1095
+ }
1096
+ return { ...e, ...n };
1097
+ }
1098
+ function Xo(e) {
1099
+ let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
1100
+ return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
1101
+ }
1102
+ function Jo(e) {
1103
+ const t = e + "CollectionProvider", [n, r] = he(t), [o, s] = n(
1104
+ t,
1105
+ { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
1106
+ ), c = (p) => {
1107
+ const { scope: _, children: g } = p, y = O.useRef(null), w = O.useRef(/* @__PURE__ */ new Map()).current;
1108
+ return /* @__PURE__ */ v(o, { scope: _, itemMap: w, collectionRef: y, children: g });
1109
+ };
1110
+ c.displayName = t;
1111
+ const i = e + "CollectionSlot", u = /* @__PURE__ */ Me(i), a = O.forwardRef(
1112
+ (p, _) => {
1113
+ const { scope: g, children: y } = p, w = s(i, g), C = T(_, w.collectionRef);
1114
+ return /* @__PURE__ */ v(u, { ref: C, children: y });
1115
+ }
1116
+ );
1117
+ a.displayName = i;
1118
+ const d = e + "CollectionItemSlot", l = "data-radix-collection-item", m = /* @__PURE__ */ Me(d), h = O.forwardRef(
1119
+ (p, _) => {
1120
+ const { scope: g, children: y, ...w } = p, C = O.useRef(null), S = T(_, C), R = s(d, g);
1121
+ return O.useEffect(() => (R.itemMap.set(C, { ref: C, ...w }), () => {
1122
+ R.itemMap.delete(C);
1123
+ })), /* @__PURE__ */ v(m, { [l]: "", ref: S, children: y });
1124
+ }
1125
+ );
1126
+ h.displayName = d;
1127
+ function b(p) {
1128
+ const _ = s(e + "CollectionConsumer", p);
1129
+ return O.useCallback(() => {
1130
+ const y = _.collectionRef.current;
1131
+ if (!y) return [];
1132
+ const w = Array.from(y.querySelectorAll(`[${l}]`));
1133
+ return Array.from(_.itemMap.values()).sort(
1134
+ (R, E) => w.indexOf(R.ref.current) - w.indexOf(E.ref.current)
1135
+ );
1136
+ }, [_.collectionRef, _.itemMap]);
1137
+ }
1138
+ return [
1139
+ { Provider: c, Slot: a, ItemSlot: h },
1140
+ b,
1141
+ r
1142
+ ];
1143
+ }
1144
+ function M(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
1145
+ return function(o) {
1146
+ if (e?.(o), n === !1 || !o.defaultPrevented)
1147
+ return t?.(o);
1148
+ };
1149
+ }
1150
+ var re = globalThis?.document ? f.useLayoutEffect : () => {
1151
+ }, Qo = f[" useInsertionEffect ".trim().toString()] || re;
1152
+ function ve({
1153
+ prop: e,
1154
+ defaultProp: t,
1155
+ onChange: n = () => {
1156
+ },
1157
+ caller: r
1158
+ }) {
1159
+ const [o, s, c] = es({
1160
+ defaultProp: t,
1161
+ onChange: n
1162
+ }), i = e !== void 0, u = i ? e : o;
1163
+ {
1164
+ const d = f.useRef(e !== void 0);
1165
+ f.useEffect(() => {
1166
+ const l = d.current;
1167
+ l !== i && console.warn(
1168
+ `${r} is changing from ${l ? "controlled" : "uncontrolled"} to ${i ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
1169
+ ), d.current = i;
1170
+ }, [i, r]);
1171
+ }
1172
+ const a = f.useCallback(
1173
+ (d) => {
1174
+ if (i) {
1175
+ const l = ts(d) ? d(e) : d;
1176
+ l !== e && c.current?.(l);
1177
+ } else
1178
+ s(d);
1179
+ },
1180
+ [i, e, s, c]
1181
+ );
1182
+ return [u, a];
1183
+ }
1184
+ function es({
1185
+ defaultProp: e,
1186
+ onChange: t
1187
+ }) {
1188
+ const [n, r] = f.useState(e), o = f.useRef(n), s = f.useRef(t);
1189
+ return Qo(() => {
1190
+ s.current = t;
1191
+ }, [t]), f.useEffect(() => {
1192
+ o.current !== n && (s.current?.(n), o.current = n);
1193
+ }, [n, o]), [n, r, s];
1194
+ }
1195
+ function ts(e) {
1196
+ return typeof e == "function";
1197
+ }
1198
+ var ns = [
1199
+ "a",
1200
+ "button",
1201
+ "div",
1202
+ "form",
1203
+ "h2",
1204
+ "h3",
1205
+ "img",
1206
+ "input",
1207
+ "label",
1208
+ "li",
1209
+ "nav",
1210
+ "ol",
1211
+ "p",
1212
+ "select",
1213
+ "span",
1214
+ "svg",
1215
+ "ul"
1216
+ ], I = ns.reduce((e, t) => {
1217
+ const n = /* @__PURE__ */ Me(`Primitive.${t}`), r = f.forwardRef((o, s) => {
1218
+ const { asChild: c, ...i } = o, u = c ? n : t;
1219
+ return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ v(u, { ...i, ref: s });
1220
+ });
1221
+ return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
1222
+ }, {});
1223
+ function rs(e, t) {
1224
+ e && br.flushSync(() => e.dispatchEvent(t));
1225
+ }
1226
+ function os(e, t) {
1227
+ return f.useReducer((n, r) => t[n][r] ?? n, e);
1228
+ }
1229
+ var We = (e) => {
1230
+ const { present: t, children: n } = e, r = ss(t), o = typeof n == "function" ? n({ present: r.isPresent }) : f.Children.only(n), s = T(r.ref, is(o));
1231
+ return typeof n == "function" || r.isPresent ? f.cloneElement(o, { ref: s }) : null;
1232
+ };
1233
+ We.displayName = "Presence";
1234
+ function ss(e) {
1235
+ const [t, n] = f.useState(), r = f.useRef(null), o = f.useRef(e), s = f.useRef("none"), c = e ? "mounted" : "unmounted", [i, u] = os(c, {
1236
+ mounted: {
1237
+ UNMOUNT: "unmounted",
1238
+ ANIMATION_OUT: "unmountSuspended"
1239
+ },
1240
+ unmountSuspended: {
1241
+ MOUNT: "mounted",
1242
+ ANIMATION_END: "unmounted"
1243
+ },
1244
+ unmounted: {
1245
+ MOUNT: "mounted"
1246
+ }
1247
+ });
1248
+ return f.useEffect(() => {
1249
+ const a = be(r.current);
1250
+ s.current = i === "mounted" ? a : "none";
1251
+ }, [i]), re(() => {
1252
+ const a = r.current, d = o.current;
1253
+ if (d !== e) {
1254
+ const m = s.current, h = be(a);
1255
+ e ? u("MOUNT") : h === "none" || a?.display === "none" ? u("UNMOUNT") : u(d && m !== h ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
1256
+ }
1257
+ }, [e, u]), re(() => {
1258
+ if (t) {
1259
+ let a;
1260
+ const d = t.ownerDocument.defaultView ?? window, l = (h) => {
1261
+ const p = be(r.current).includes(CSS.escape(h.animationName));
1262
+ if (h.target === t && p && (u("ANIMATION_END"), !o.current)) {
1263
+ const _ = t.style.animationFillMode;
1264
+ t.style.animationFillMode = "forwards", a = d.setTimeout(() => {
1265
+ t.style.animationFillMode === "forwards" && (t.style.animationFillMode = _);
1266
+ });
1267
+ }
1268
+ }, m = (h) => {
1269
+ h.target === t && (s.current = be(r.current));
1270
+ };
1271
+ return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", l), t.addEventListener("animationend", l), () => {
1272
+ d.clearTimeout(a), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", l), t.removeEventListener("animationend", l);
1273
+ };
1274
+ } else
1275
+ u("ANIMATION_END");
1276
+ }, [t, u]), {
1277
+ isPresent: ["mounted", "unmountSuspended"].includes(i),
1278
+ ref: f.useCallback((a) => {
1279
+ r.current = a ? getComputedStyle(a) : null, n(a);
1280
+ }, [])
1281
+ };
1282
+ }
1283
+ function be(e) {
1284
+ return e?.animationName || "none";
1285
+ }
1286
+ function is(e) {
1287
+ let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
1288
+ return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
1289
+ }
1290
+ var cs = f[" useId ".trim().toString()] || (() => {
1291
+ }), as = 0;
1292
+ function ue(e) {
1293
+ const [t, n] = f.useState(cs());
1294
+ return re(() => {
1295
+ n((r) => r ?? String(as++));
1296
+ }, [e]), e || (t ? `radix-${t}` : "");
1297
+ }
1298
+ var Be = "Collapsible", [ls, gn] = he(Be), [us, vt] = ls(Be), yn = f.forwardRef(
1299
+ (e, t) => {
1300
+ const {
1301
+ __scopeCollapsible: n,
1302
+ open: r,
1303
+ defaultOpen: o,
1304
+ disabled: s,
1305
+ onOpenChange: c,
1306
+ ...i
1307
+ } = e, [u, a] = ve({
1308
+ prop: r,
1309
+ defaultProp: o ?? !1,
1310
+ onChange: c,
1311
+ caller: Be
1312
+ });
1313
+ return /* @__PURE__ */ v(
1314
+ us,
1315
+ {
1316
+ scope: n,
1317
+ disabled: s,
1318
+ contentId: ue(),
1319
+ open: u,
1320
+ onOpenToggle: f.useCallback(() => a((d) => !d), [a]),
1321
+ children: /* @__PURE__ */ v(
1322
+ I.div,
1323
+ {
1324
+ "data-state": mt(u),
1325
+ "data-disabled": s ? "" : void 0,
1326
+ ...i,
1327
+ ref: t
1328
+ }
1329
+ )
1330
+ }
1331
+ );
1332
+ }
1333
+ );
1334
+ yn.displayName = Be;
1335
+ var bn = "CollapsibleTrigger", wn = f.forwardRef(
1336
+ (e, t) => {
1337
+ const { __scopeCollapsible: n, ...r } = e, o = vt(bn, n);
1338
+ return /* @__PURE__ */ v(
1339
+ I.button,
1340
+ {
1341
+ type: "button",
1342
+ "aria-controls": o.contentId,
1343
+ "aria-expanded": o.open || !1,
1344
+ "data-state": mt(o.open),
1345
+ "data-disabled": o.disabled ? "" : void 0,
1346
+ disabled: o.disabled,
1347
+ ...r,
1348
+ ref: t,
1349
+ onClick: M(e.onClick, o.onOpenToggle)
1350
+ }
1351
+ );
1352
+ }
1353
+ );
1354
+ wn.displayName = bn;
1355
+ var _t = "CollapsibleContent", Cn = f.forwardRef(
1356
+ (e, t) => {
1357
+ const { forceMount: n, ...r } = e, o = vt(_t, e.__scopeCollapsible);
1358
+ return /* @__PURE__ */ v(We, { present: n || o.open, children: ({ present: s }) => /* @__PURE__ */ v(ds, { ...r, ref: t, present: s }) });
1359
+ }
1360
+ );
1361
+ Cn.displayName = _t;
1362
+ var ds = f.forwardRef((e, t) => {
1363
+ const { __scopeCollapsible: n, present: r, children: o, ...s } = e, c = vt(_t, n), [i, u] = f.useState(r), a = f.useRef(null), d = T(t, a), l = f.useRef(0), m = l.current, h = f.useRef(0), b = h.current, p = c.open || i, _ = f.useRef(p), g = f.useRef(void 0);
1364
+ return f.useEffect(() => {
1365
+ const y = requestAnimationFrame(() => _.current = !1);
1366
+ return () => cancelAnimationFrame(y);
1367
+ }, []), re(() => {
1368
+ const y = a.current;
1369
+ if (y) {
1370
+ g.current = g.current || {
1371
+ transitionDuration: y.style.transitionDuration,
1372
+ animationName: y.style.animationName
1373
+ }, y.style.transitionDuration = "0s", y.style.animationName = "none";
1374
+ const w = y.getBoundingClientRect();
1375
+ l.current = w.height, h.current = w.width, _.current || (y.style.transitionDuration = g.current.transitionDuration, y.style.animationName = g.current.animationName), u(r);
1376
+ }
1377
+ }, [c.open, r]), /* @__PURE__ */ v(
1378
+ I.div,
1379
+ {
1380
+ "data-state": mt(c.open),
1381
+ "data-disabled": c.disabled ? "" : void 0,
1382
+ id: c.contentId,
1383
+ hidden: !p,
1384
+ ...s,
1385
+ ref: d,
1386
+ style: {
1387
+ "--radix-collapsible-content-height": m ? `${m}px` : void 0,
1388
+ "--radix-collapsible-content-width": b ? `${b}px` : void 0,
1389
+ ...e.style
1390
+ },
1391
+ children: p && o
1392
+ }
1393
+ );
1394
+ });
1395
+ function mt(e) {
1396
+ return e ? "open" : "closed";
1397
+ }
1398
+ var En = yn, Sn = wn, Pn = Cn, fs = f.createContext(void 0);
1399
+ function ps(e) {
1400
+ const t = f.useContext(fs);
1401
+ return e || t || "ltr";
1402
+ }
1403
+ var z = "Accordion", hs = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [gt, vs, _s] = Jo(z), [Ue] = he(z, [
1404
+ _s,
1405
+ gn
1406
+ ]), yt = gn(), Rn = O.forwardRef(
1407
+ (e, t) => {
1408
+ const { type: n, ...r } = e, o = r, s = r;
1409
+ return /* @__PURE__ */ v(gt.Provider, { scope: e.__scopeAccordion, children: n === "multiple" ? /* @__PURE__ */ v(bs, { ...s, ref: t }) : /* @__PURE__ */ v(ys, { ...o, ref: t }) });
1410
+ }
1411
+ );
1412
+ Rn.displayName = z;
1413
+ var [On, ms] = Ue(z), [An, gs] = Ue(
1414
+ z,
1415
+ { collapsible: !1 }
1416
+ ), ys = O.forwardRef(
1417
+ (e, t) => {
1418
+ const {
1419
+ value: n,
1420
+ defaultValue: r,
1421
+ onValueChange: o = () => {
1422
+ },
1423
+ collapsible: s = !1,
1424
+ ...c
1425
+ } = e, [i, u] = ve({
1426
+ prop: n,
1427
+ defaultProp: r ?? "",
1428
+ onChange: o,
1429
+ caller: z
1430
+ });
1431
+ return /* @__PURE__ */ v(
1432
+ On,
1433
+ {
1434
+ scope: e.__scopeAccordion,
1435
+ value: O.useMemo(() => i ? [i] : [], [i]),
1436
+ onItemOpen: u,
1437
+ onItemClose: O.useCallback(() => s && u(""), [s, u]),
1438
+ children: /* @__PURE__ */ v(An, { scope: e.__scopeAccordion, collapsible: s, children: /* @__PURE__ */ v(kn, { ...c, ref: t }) })
1439
+ }
1440
+ );
1441
+ }
1442
+ ), bs = O.forwardRef((e, t) => {
1443
+ const {
1444
+ value: n,
1445
+ defaultValue: r,
1446
+ onValueChange: o = () => {
1447
+ },
1448
+ ...s
1449
+ } = e, [c, i] = ve({
1450
+ prop: n,
1451
+ defaultProp: r ?? [],
1452
+ onChange: o,
1453
+ caller: z
1454
+ }), u = O.useCallback(
1455
+ (d) => i((l = []) => [...l, d]),
1456
+ [i]
1457
+ ), a = O.useCallback(
1458
+ (d) => i((l = []) => l.filter((m) => m !== d)),
1459
+ [i]
1460
+ );
1461
+ return /* @__PURE__ */ v(
1462
+ On,
1463
+ {
1464
+ scope: e.__scopeAccordion,
1465
+ value: c,
1466
+ onItemOpen: u,
1467
+ onItemClose: a,
1468
+ children: /* @__PURE__ */ v(An, { scope: e.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ v(kn, { ...s, ref: t }) })
1469
+ }
1470
+ );
1471
+ }), [ws, Ze] = Ue(z), kn = O.forwardRef(
1472
+ (e, t) => {
1473
+ const { __scopeAccordion: n, disabled: r, dir: o, orientation: s = "vertical", ...c } = e, i = O.useRef(null), u = T(i, t), a = vs(n), l = ps(o) === "ltr", m = M(e.onKeyDown, (h) => {
1474
+ if (!hs.includes(h.key)) return;
1475
+ const b = h.target, p = a().filter((N) => !N.ref.current?.disabled), _ = p.findIndex((N) => N.ref.current === b), g = p.length;
1476
+ if (_ === -1) return;
1477
+ h.preventDefault();
1478
+ let y = _;
1479
+ const w = 0, C = g - 1, S = () => {
1480
+ y = _ + 1, y > C && (y = w);
1481
+ }, R = () => {
1482
+ y = _ - 1, y < w && (y = C);
1483
+ };
1484
+ switch (h.key) {
1485
+ case "Home":
1486
+ y = w;
1487
+ break;
1488
+ case "End":
1489
+ y = C;
1490
+ break;
1491
+ case "ArrowRight":
1492
+ s === "horizontal" && (l ? S() : R());
1493
+ break;
1494
+ case "ArrowDown":
1495
+ s === "vertical" && S();
1496
+ break;
1497
+ case "ArrowLeft":
1498
+ s === "horizontal" && (l ? R() : S());
1499
+ break;
1500
+ case "ArrowUp":
1501
+ s === "vertical" && R();
1502
+ break;
1503
+ }
1504
+ const E = y % g;
1505
+ p[E].ref.current?.focus();
1506
+ });
1507
+ return /* @__PURE__ */ v(
1508
+ ws,
1509
+ {
1510
+ scope: n,
1511
+ disabled: r,
1512
+ direction: o,
1513
+ orientation: s,
1514
+ children: /* @__PURE__ */ v(gt.Slot, { scope: n, children: /* @__PURE__ */ v(
1515
+ I.div,
1516
+ {
1517
+ ...c,
1518
+ "data-orientation": s,
1519
+ ref: u,
1520
+ onKeyDown: r ? void 0 : m
1521
+ }
1522
+ ) })
1523
+ }
1524
+ );
1525
+ }
1526
+ ), ze = "AccordionItem", [Cs, bt] = Ue(ze), Nn = O.forwardRef(
1527
+ (e, t) => {
1528
+ const { __scopeAccordion: n, value: r, ...o } = e, s = Ze(ze, n), c = ms(ze, n), i = yt(n), u = ue(), a = r && c.value.includes(r) || !1, d = s.disabled || e.disabled;
1529
+ return /* @__PURE__ */ v(
1530
+ Cs,
1531
+ {
1532
+ scope: n,
1533
+ open: a,
1534
+ disabled: d,
1535
+ triggerId: u,
1536
+ children: /* @__PURE__ */ v(
1537
+ En,
1538
+ {
1539
+ "data-orientation": s.orientation,
1540
+ "data-state": Mn(a),
1541
+ ...i,
1542
+ ...o,
1543
+ ref: t,
1544
+ disabled: d,
1545
+ open: a,
1546
+ onOpenChange: (l) => {
1547
+ l ? c.onItemOpen(r) : c.onItemClose(r);
1548
+ }
1549
+ }
1550
+ )
1551
+ }
1552
+ );
1553
+ }
1554
+ );
1555
+ Nn.displayName = ze;
1556
+ var In = "AccordionHeader", Es = O.forwardRef(
1557
+ (e, t) => {
1558
+ const { __scopeAccordion: n, ...r } = e, o = Ze(z, n), s = bt(In, n);
1559
+ return /* @__PURE__ */ v(
1560
+ I.h3,
1561
+ {
1562
+ "data-orientation": o.orientation,
1563
+ "data-state": Mn(s.open),
1564
+ "data-disabled": s.disabled ? "" : void 0,
1565
+ ...r,
1566
+ ref: t
1567
+ }
1568
+ );
1569
+ }
1570
+ );
1571
+ Es.displayName = In;
1572
+ var ct = "AccordionTrigger", Tn = O.forwardRef(
1573
+ (e, t) => {
1574
+ const { __scopeAccordion: n, ...r } = e, o = Ze(z, n), s = bt(ct, n), c = gs(ct, n), i = yt(n);
1575
+ return /* @__PURE__ */ v(gt.ItemSlot, { scope: n, children: /* @__PURE__ */ v(
1576
+ Sn,
1577
+ {
1578
+ "aria-disabled": s.open && !c.collapsible || void 0,
1579
+ "data-orientation": o.orientation,
1580
+ id: s.triggerId,
1581
+ ...i,
1582
+ ...r,
1583
+ ref: t
1584
+ }
1585
+ ) });
1586
+ }
1587
+ );
1588
+ Tn.displayName = ct;
1589
+ var Dn = "AccordionContent", xn = O.forwardRef(
1590
+ (e, t) => {
1591
+ const { __scopeAccordion: n, ...r } = e, o = Ze(z, n), s = bt(Dn, n), c = yt(n);
1592
+ return /* @__PURE__ */ v(
1593
+ Pn,
1594
+ {
1595
+ role: "region",
1596
+ "aria-labelledby": s.triggerId,
1597
+ "data-orientation": o.orientation,
1598
+ ...c,
1599
+ ...r,
1600
+ ref: t,
1601
+ style: {
1602
+ "--radix-accordion-content-height": "var(--radix-collapsible-content-height)",
1603
+ "--radix-accordion-content-width": "var(--radix-collapsible-content-width)",
1604
+ ...e.style
1605
+ }
1606
+ }
1607
+ );
1608
+ }
1609
+ );
1610
+ xn.displayName = Dn;
1611
+ function Mn(e) {
1612
+ return e ? "open" : "closed";
1613
+ }
1614
+ var Ss = Rn, Ps = Nn, Mt = Tn, Rs = xn;
1615
+ const zn = (...e) => e.filter((t, n, r) => !!t && t.trim() !== "" && r.indexOf(t) === n).join(" ").trim();
1616
+ const Os = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
1617
+ const As = (e) => e.replace(
1618
+ /^([A-Z])|[\s-_]+(\w)/g,
1619
+ (t, n, r) => r ? r.toUpperCase() : n.toLowerCase()
1620
+ );
1621
+ const zt = (e) => {
1622
+ const t = As(e);
1623
+ return t.charAt(0).toUpperCase() + t.slice(1);
1624
+ };
1625
+ var ks = {
1626
+ xmlns: "http://www.w3.org/2000/svg",
1627
+ width: 24,
1628
+ height: 24,
1629
+ viewBox: "0 0 24 24",
1630
+ fill: "none",
1631
+ stroke: "currentColor",
1632
+ strokeWidth: 2,
1633
+ strokeLinecap: "round",
1634
+ strokeLinejoin: "round"
1635
+ };
1636
+ const Ns = (e) => {
1637
+ for (const t in e)
1638
+ if (t.startsWith("aria-") || t === "role" || t === "title")
1639
+ return !0;
1640
+ return !1;
1641
+ };
1642
+ const Is = Yt(
1643
+ ({
1644
+ color: e = "currentColor",
1645
+ size: t = 24,
1646
+ strokeWidth: n = 2,
1647
+ absoluteStrokeWidth: r,
1648
+ className: o = "",
1649
+ children: s,
1650
+ iconNode: c,
1651
+ ...i
1652
+ }, u) => nt(
1653
+ "svg",
1654
+ {
1655
+ ref: u,
1656
+ ...ks,
1657
+ width: t,
1658
+ height: t,
1659
+ stroke: e,
1660
+ strokeWidth: r ? Number(n) * 24 / Number(t) : n,
1661
+ className: zn("lucide", o),
1662
+ ...!s && !Ns(i) && { "aria-hidden": "true" },
1663
+ ...i
1664
+ },
1665
+ [
1666
+ ...c.map(([a, d]) => nt(a, d)),
1667
+ ...Array.isArray(s) ? s : [s]
1668
+ ]
1669
+ )
1670
+ );
1671
+ const Ln = (e, t) => {
1672
+ const n = Yt(
1673
+ ({ className: r, ...o }, s) => nt(Is, {
1674
+ ref: s,
1675
+ iconNode: t,
1676
+ className: zn(
1677
+ `lucide-${Os(zt(e))}`,
1678
+ `lucide-${e}`,
1679
+ r
1680
+ ),
1681
+ ...o
1682
+ })
1683
+ );
1684
+ return n.displayName = zt(e), n;
1685
+ };
1686
+ const Ts = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], Ds = Ln("chevron-down", Ts);
1687
+ const xs = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], Ms = Ln("chevron-up", xs);
1688
+ function zs(e) {
1689
+ const t = f.useRef({ value: e, previous: e });
1690
+ return f.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
1691
+ }
1692
+ function Ls(e) {
1693
+ const [t, n] = f.useState(void 0);
1694
+ return re(() => {
1695
+ if (e) {
1696
+ n({ width: e.offsetWidth, height: e.offsetHeight });
1697
+ const r = new ResizeObserver((o) => {
1698
+ if (!Array.isArray(o) || !o.length)
1699
+ return;
1700
+ const s = o[0];
1701
+ let c, i;
1702
+ if ("borderBoxSize" in s) {
1703
+ const u = s.borderBoxSize, a = Array.isArray(u) ? u[0] : u;
1704
+ c = a.inlineSize, i = a.blockSize;
1705
+ } else
1706
+ c = e.offsetWidth, i = e.offsetHeight;
1707
+ n({ width: c, height: i });
1708
+ });
1709
+ return r.observe(e, { box: "border-box" }), () => r.unobserve(e);
1710
+ } else
1711
+ n(void 0);
1712
+ }, [e]), t;
1713
+ }
1714
+ var Ve = "Switch", [$s] = he(Ve), [Fs, js] = $s(Ve), $n = f.forwardRef(
1715
+ (e, t) => {
1716
+ const {
1717
+ __scopeSwitch: n,
1718
+ name: r,
1719
+ checked: o,
1720
+ defaultChecked: s,
1721
+ required: c,
1722
+ disabled: i,
1723
+ value: u = "on",
1724
+ onCheckedChange: a,
1725
+ form: d,
1726
+ ...l
1727
+ } = e, [m, h] = f.useState(null), b = T(t, (w) => h(w)), p = f.useRef(!1), _ = m ? d || !!m.closest("form") : !0, [g, y] = ve({
1728
+ prop: o,
1729
+ defaultProp: s ?? !1,
1730
+ onChange: a,
1731
+ caller: Ve
1732
+ });
1733
+ return /* @__PURE__ */ v(Fs, { scope: n, checked: g, disabled: i, children: [
1734
+ /* @__PURE__ */ v(
1735
+ I.button,
1736
+ {
1737
+ type: "button",
1738
+ role: "switch",
1739
+ "aria-checked": g,
1740
+ "aria-required": c,
1741
+ "data-state": Bn(g),
1742
+ "data-disabled": i ? "" : void 0,
1743
+ disabled: i,
1744
+ value: u,
1745
+ ...l,
1746
+ ref: b,
1747
+ onClick: M(e.onClick, (w) => {
1748
+ y((C) => !C), _ && (p.current = w.isPropagationStopped(), p.current || w.stopPropagation());
1749
+ })
1750
+ }
1751
+ ),
1752
+ _ && /* @__PURE__ */ v(
1753
+ Wn,
1754
+ {
1755
+ control: m,
1756
+ bubbles: !p.current,
1757
+ name: r,
1758
+ value: u,
1759
+ checked: g,
1760
+ required: c,
1761
+ disabled: i,
1762
+ form: d,
1763
+ style: { transform: "translateX(-100%)" }
1764
+ }
1765
+ )
1766
+ ] });
1767
+ }
1768
+ );
1769
+ $n.displayName = Ve;
1770
+ var Fn = "SwitchThumb", jn = f.forwardRef(
1771
+ (e, t) => {
1772
+ const { __scopeSwitch: n, ...r } = e, o = js(Fn, n);
1773
+ return /* @__PURE__ */ v(
1774
+ I.span,
1775
+ {
1776
+ "data-state": Bn(o.checked),
1777
+ "data-disabled": o.disabled ? "" : void 0,
1778
+ ...r,
1779
+ ref: t
1780
+ }
1781
+ );
1782
+ }
1783
+ );
1784
+ jn.displayName = Fn;
1785
+ var Ws = "SwitchBubbleInput", Wn = f.forwardRef(
1786
+ ({
1787
+ __scopeSwitch: e,
1788
+ control: t,
1789
+ checked: n,
1790
+ bubbles: r = !0,
1791
+ ...o
1792
+ }, s) => {
1793
+ const c = f.useRef(null), i = T(c, s), u = zs(n), a = Ls(t);
1794
+ return f.useEffect(() => {
1795
+ const d = c.current;
1796
+ if (!d) return;
1797
+ const l = window.HTMLInputElement.prototype, h = Object.getOwnPropertyDescriptor(
1798
+ l,
1799
+ "checked"
1800
+ ).set;
1801
+ if (u !== n && h) {
1802
+ const b = new Event("click", { bubbles: r });
1803
+ h.call(d, n), d.dispatchEvent(b);
1804
+ }
1805
+ }, [u, n, r]), /* @__PURE__ */ v(
1806
+ "input",
1807
+ {
1808
+ type: "checkbox",
1809
+ "aria-hidden": !0,
1810
+ defaultChecked: n,
1811
+ ...o,
1812
+ tabIndex: -1,
1813
+ ref: i,
1814
+ style: {
1815
+ ...o.style,
1816
+ ...a,
1817
+ position: "absolute",
1818
+ pointerEvents: "none",
1819
+ opacity: 0,
1820
+ margin: 0
1821
+ }
1822
+ }
1823
+ );
1824
+ }
1825
+ );
1826
+ Wn.displayName = Ws;
1827
+ function Bn(e) {
1828
+ return e ? "checked" : "unchecked";
1829
+ }
1830
+ var Bs = $n, Us = jn;
1831
+ const Zs = "_root_dibqz_1", Vs = "_thumb_dibqz_38", we = {
1832
+ root: Zs,
1833
+ switch: "_switch_dibqz_8",
1834
+ thumb: Vs
1835
+ }, Hs = ({ label: e, id: t, ...n }) => /* @__PURE__ */ v("div", { className: we.root, children: [
1836
+ e && /* @__PURE__ */ v(q, { className: we.label, as: "label", htmlFor: t, children: e }),
1837
+ /* @__PURE__ */ v(Bs, { className: we.switch, ...n, children: /* @__PURE__ */ v(Us, { className: we.thumb }) })
1838
+ ] }), Ks = /* @__PURE__ */ Fo(/* @__PURE__ */ K(), /* @__PURE__ */ fe()), Un = yr(null), qs = ({
1839
+ children: e,
1840
+ items: t,
1841
+ localStorageKey: n
1842
+ }) => {
1843
+ function r(b) {
1844
+ const p = localStorage.getItem(b);
1845
+ if (!p) return null;
1846
+ const { success: _, data: g } = Ks.safeParse(
1847
+ JSON.parse(p)
1848
+ );
1849
+ return _ ? g : null;
1850
+ }
1851
+ const o = H(
1852
+ () => Object.fromEntries(
1853
+ t.map((b) => [b.value, b.defaultSelected ?? !1])
1854
+ ),
1855
+ [t]
1856
+ ), [s, c] = de(
1857
+ r(n) ?? o
1858
+ ), [i, u] = de(
1859
+ r(n)
1860
+ );
1861
+ function a(b, p) {
1862
+ const _ = s ? { ...s, [b]: p } : { [b]: p };
1863
+ c(_);
1864
+ }
1865
+ Xt(() => {
1866
+ let b = [];
1867
+ i !== null && (b = Object.entries(i).filter(([_, g]) => g).map(([_]) => _));
1868
+ const p = t.filter(
1869
+ (_) => b.includes(_.value)
1870
+ );
1871
+ for (const _ of t) {
1872
+ const g = document.head.querySelector(`#${_.value}`);
1873
+ g && g.remove();
1874
+ }
1875
+ for (const _ of p) {
1876
+ const g = document.createElement("script");
1877
+ if (g.id = _.value, !_.script) {
1878
+ _.required || console.warn("CookieBanner: Missing script for", _.value);
1879
+ continue;
1880
+ }
1881
+ const { success: y, data: w } = Zo.safeParse(
1882
+ _.script
1883
+ );
1884
+ if (!y) {
1885
+ console.error(
1886
+ "CookieBanner: Invalid script definition for",
1887
+ _.value
1888
+ );
1889
+ continue;
1890
+ }
1891
+ switch (g.type = w.type ?? "text/javascript", g.async = w.async ?? !1, g.defer = w.defer ?? !1, w.variant) {
1892
+ case "inline":
1893
+ g.textContent = w.content;
1894
+ break;
1895
+ case "remote":
1896
+ g.src = w.src, g.crossOrigin = w.crossorigin ?? null, g.integrity = w.integrity ?? "";
1897
+ break;
1898
+ }
1899
+ document.head.appendChild(g);
1900
+ }
1901
+ }, [i, t]);
1902
+ function d(b) {
1903
+ u(b), localStorage.setItem(n, JSON.stringify(b));
1904
+ }
1905
+ const l = St(() => {
1906
+ const b = Object.fromEntries(
1907
+ t.map((p) => [p.value, !1])
1908
+ );
1909
+ c(b), d(b);
1910
+ }, [t]), m = St(() => {
1911
+ d(s);
1912
+ }, [s]), h = H(() => {
1913
+ if (!i) return !1;
1914
+ const b = Object.keys(i);
1915
+ return t.map((_) => _.value).every((_) => b.includes(_));
1916
+ }, [i, t]);
1917
+ return /* @__PURE__ */ v(
1918
+ Un.Provider,
1919
+ {
1920
+ value: {
1921
+ selection: s,
1922
+ toggleSelection: a,
1923
+ onDeclineAll: l,
1924
+ onSave: m,
1925
+ selectionTaken: h
1926
+ },
1927
+ children: e
1928
+ }
1929
+ );
1930
+ };
1931
+ function Zn() {
1932
+ const e = gr(Un);
1933
+ if (!e)
1934
+ throw new Error("useSelection must be used within a SelectionProvider");
1935
+ return e;
1936
+ }
1937
+ const Gs = ({
1938
+ value: e,
1939
+ label: t,
1940
+ sublabel: n,
1941
+ required: r = !1,
1942
+ description: o,
1943
+ openItem: s
1944
+ }) => {
1945
+ const { toggleSelection: c, selection: i } = Zn(), u = H(
1946
+ () => i?.[e] ?? !1,
1947
+ [i, e]
1948
+ );
1949
+ Xt(() => {
1950
+ c(e, u);
1951
+ }, [e, u]);
1952
+ const a = H(
1953
+ () => r ? !0 : u,
1954
+ [r, u]
1955
+ ), d = H(
1956
+ () => (m) => r ? () => {
1957
+ } : c(e, m),
1958
+ [r, c, e]
1959
+ ), l = H(() => r, [r]);
1960
+ return /* @__PURE__ */ v(Ps, { value: e, className: Z.root, children: [
1961
+ /* @__PURE__ */ v("div", { className: Z.header, children: [
1962
+ /* @__PURE__ */ v(Mt, { asChild: !0, children: /* @__PURE__ */ v("div", { className: Z.label, children: [
1963
+ /* @__PURE__ */ v(q, { weight: "bold", children: t }),
1964
+ n && /* @__PURE__ */ v(q, { size: "caption", color: "muted", children: n })
1965
+ ] }) }),
1966
+ /* @__PURE__ */ v("div", { className: Z.actions, children: [
1967
+ /* @__PURE__ */ v(
1968
+ Hs,
1969
+ {
1970
+ checked: a,
1971
+ onCheckedChange: d,
1972
+ disabled: l
1973
+ }
1974
+ ),
1975
+ /* @__PURE__ */ v(Mt, { asChild: !0, children: /* @__PURE__ */ v(
1976
+ Ds,
1977
+ {
1978
+ size: 16,
1979
+ className: it({
1980
+ [Z.chevron]: !0,
1981
+ [Z.open]: s === e
1982
+ })
1983
+ }
1984
+ ) })
1985
+ ] })
1986
+ ] }),
1987
+ o && /* @__PURE__ */ v(Rs, { className: Z.description, children: /* @__PURE__ */ v(
1988
+ q,
1989
+ {
1990
+ size: "caption",
1991
+ dangerouslySetInnerHTML: { __html: o }
1992
+ }
1993
+ ) })
1994
+ ] });
1995
+ };
1996
+ function pe(e) {
1997
+ const t = f.useRef(e);
1998
+ return f.useEffect(() => {
1999
+ t.current = e;
2000
+ }), f.useMemo(() => (...n) => t.current?.(...n), []);
2001
+ }
2002
+ function Ys(e, t = globalThis?.document) {
2003
+ const n = pe(e);
2004
+ f.useEffect(() => {
2005
+ const r = (o) => {
2006
+ o.key === "Escape" && n(o);
2007
+ };
2008
+ return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
2009
+ }, [n, t]);
2010
+ }
2011
+ var Xs = "DismissableLayer", at = "dismissableLayer.update", Js = "dismissableLayer.pointerDownOutside", Qs = "dismissableLayer.focusOutside", Lt, Vn = f.createContext({
2012
+ layers: /* @__PURE__ */ new Set(),
2013
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
2014
+ branches: /* @__PURE__ */ new Set()
2015
+ }), Hn = f.forwardRef(
2016
+ (e, t) => {
2017
+ const {
2018
+ disableOutsidePointerEvents: n = !1,
2019
+ onEscapeKeyDown: r,
2020
+ onPointerDownOutside: o,
2021
+ onFocusOutside: s,
2022
+ onInteractOutside: c,
2023
+ onDismiss: i,
2024
+ ...u
2025
+ } = e, a = f.useContext(Vn), [d, l] = f.useState(null), m = d?.ownerDocument ?? globalThis?.document, [, h] = f.useState({}), b = T(t, (E) => l(E)), p = Array.from(a.layers), [_] = [...a.layersWithOutsidePointerEventsDisabled].slice(-1), g = p.indexOf(_), y = d ? p.indexOf(d) : -1, w = a.layersWithOutsidePointerEventsDisabled.size > 0, C = y >= g, S = ni((E) => {
2026
+ const N = E.target, k = [...a.branches].some((D) => D.contains(N));
2027
+ !C || k || (o?.(E), c?.(E), E.defaultPrevented || i?.());
2028
+ }, m), R = ri((E) => {
2029
+ const N = E.target;
2030
+ [...a.branches].some((D) => D.contains(N)) || (s?.(E), c?.(E), E.defaultPrevented || i?.());
2031
+ }, m);
2032
+ return Ys((E) => {
2033
+ y === a.layers.size - 1 && (r?.(E), !E.defaultPrevented && i && (E.preventDefault(), i()));
2034
+ }, m), f.useEffect(() => {
2035
+ if (d)
2036
+ return n && (a.layersWithOutsidePointerEventsDisabled.size === 0 && (Lt = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), a.layersWithOutsidePointerEventsDisabled.add(d)), a.layers.add(d), $t(), () => {
2037
+ n && a.layersWithOutsidePointerEventsDisabled.size === 1 && (m.body.style.pointerEvents = Lt);
2038
+ };
2039
+ }, [d, m, n, a]), f.useEffect(() => () => {
2040
+ d && (a.layers.delete(d), a.layersWithOutsidePointerEventsDisabled.delete(d), $t());
2041
+ }, [d, a]), f.useEffect(() => {
2042
+ const E = () => h({});
2043
+ return document.addEventListener(at, E), () => document.removeEventListener(at, E);
2044
+ }, []), /* @__PURE__ */ v(
2045
+ I.div,
2046
+ {
2047
+ ...u,
2048
+ ref: b,
2049
+ style: {
2050
+ pointerEvents: w ? C ? "auto" : "none" : void 0,
2051
+ ...e.style
2052
+ },
2053
+ onFocusCapture: M(e.onFocusCapture, R.onFocusCapture),
2054
+ onBlurCapture: M(e.onBlurCapture, R.onBlurCapture),
2055
+ onPointerDownCapture: M(
2056
+ e.onPointerDownCapture,
2057
+ S.onPointerDownCapture
2058
+ )
2059
+ }
2060
+ );
2061
+ }
2062
+ );
2063
+ Hn.displayName = Xs;
2064
+ var ei = "DismissableLayerBranch", ti = f.forwardRef((e, t) => {
2065
+ const n = f.useContext(Vn), r = f.useRef(null), o = T(t, r);
2066
+ return f.useEffect(() => {
2067
+ const s = r.current;
2068
+ if (s)
2069
+ return n.branches.add(s), () => {
2070
+ n.branches.delete(s);
2071
+ };
2072
+ }, [n.branches]), /* @__PURE__ */ v(I.div, { ...e, ref: o });
2073
+ });
2074
+ ti.displayName = ei;
2075
+ function ni(e, t = globalThis?.document) {
2076
+ const n = pe(e), r = f.useRef(!1), o = f.useRef(() => {
2077
+ });
2078
+ return f.useEffect(() => {
2079
+ const s = (i) => {
2080
+ if (i.target && !r.current) {
2081
+ let u = function() {
2082
+ Kn(
2083
+ Js,
2084
+ n,
2085
+ a,
2086
+ { discrete: !0 }
2087
+ );
2088
+ };
2089
+ const a = { originalEvent: i };
2090
+ i.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = u, t.addEventListener("click", o.current, { once: !0 })) : u();
2091
+ } else
2092
+ t.removeEventListener("click", o.current);
2093
+ r.current = !1;
2094
+ }, c = window.setTimeout(() => {
2095
+ t.addEventListener("pointerdown", s);
2096
+ }, 0);
2097
+ return () => {
2098
+ window.clearTimeout(c), t.removeEventListener("pointerdown", s), t.removeEventListener("click", o.current);
2099
+ };
2100
+ }, [t, n]), {
2101
+ // ensures we check React component tree (not just DOM tree)
2102
+ onPointerDownCapture: () => r.current = !0
2103
+ };
2104
+ }
2105
+ function ri(e, t = globalThis?.document) {
2106
+ const n = pe(e), r = f.useRef(!1);
2107
+ return f.useEffect(() => {
2108
+ const o = (s) => {
2109
+ s.target && !r.current && Kn(Qs, n, { originalEvent: s }, {
2110
+ discrete: !1
2111
+ });
2112
+ };
2113
+ return t.addEventListener("focusin", o), () => t.removeEventListener("focusin", o);
2114
+ }, [t, n]), {
2115
+ onFocusCapture: () => r.current = !0,
2116
+ onBlurCapture: () => r.current = !1
2117
+ };
2118
+ }
2119
+ function $t() {
2120
+ const e = new CustomEvent(at);
2121
+ document.dispatchEvent(e);
2122
+ }
2123
+ function Kn(e, t, n, { discrete: r }) {
2124
+ const o = n.originalEvent.target, s = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
2125
+ t && o.addEventListener(e, t, { once: !0 }), r ? rs(o, s) : o.dispatchEvent(s);
2126
+ }
2127
+ var Ge = "focusScope.autoFocusOnMount", Ye = "focusScope.autoFocusOnUnmount", Ft = { bubbles: !1, cancelable: !0 }, oi = "FocusScope", qn = f.forwardRef((e, t) => {
2128
+ const {
2129
+ loop: n = !1,
2130
+ trapped: r = !1,
2131
+ onMountAutoFocus: o,
2132
+ onUnmountAutoFocus: s,
2133
+ ...c
2134
+ } = e, [i, u] = f.useState(null), a = pe(o), d = pe(s), l = f.useRef(null), m = T(t, (p) => u(p)), h = f.useRef({
2135
+ paused: !1,
2136
+ pause() {
2137
+ this.paused = !0;
2138
+ },
2139
+ resume() {
2140
+ this.paused = !1;
2141
+ }
2142
+ }).current;
2143
+ f.useEffect(() => {
2144
+ if (r) {
2145
+ let p = function(w) {
2146
+ if (h.paused || !i) return;
2147
+ const C = w.target;
2148
+ i.contains(C) ? l.current = C : W(l.current, { select: !0 });
2149
+ }, _ = function(w) {
2150
+ if (h.paused || !i) return;
2151
+ const C = w.relatedTarget;
2152
+ C !== null && (i.contains(C) || W(l.current, { select: !0 }));
2153
+ }, g = function(w) {
2154
+ if (document.activeElement === document.body)
2155
+ for (const S of w)
2156
+ S.removedNodes.length > 0 && W(i);
2157
+ };
2158
+ document.addEventListener("focusin", p), document.addEventListener("focusout", _);
2159
+ const y = new MutationObserver(g);
2160
+ return i && y.observe(i, { childList: !0, subtree: !0 }), () => {
2161
+ document.removeEventListener("focusin", p), document.removeEventListener("focusout", _), y.disconnect();
2162
+ };
2163
+ }
2164
+ }, [r, i, h.paused]), f.useEffect(() => {
2165
+ if (i) {
2166
+ Wt.add(h);
2167
+ const p = document.activeElement;
2168
+ if (!i.contains(p)) {
2169
+ const g = new CustomEvent(Ge, Ft);
2170
+ i.addEventListener(Ge, a), i.dispatchEvent(g), g.defaultPrevented || (si(ui(Gn(i)), { select: !0 }), document.activeElement === p && W(i));
2171
+ }
2172
+ return () => {
2173
+ i.removeEventListener(Ge, a), setTimeout(() => {
2174
+ const g = new CustomEvent(Ye, Ft);
2175
+ i.addEventListener(Ye, d), i.dispatchEvent(g), g.defaultPrevented || W(p ?? document.body, { select: !0 }), i.removeEventListener(Ye, d), Wt.remove(h);
2176
+ }, 0);
2177
+ };
2178
+ }
2179
+ }, [i, a, d, h]);
2180
+ const b = f.useCallback(
2181
+ (p) => {
2182
+ if (!n && !r || h.paused) return;
2183
+ const _ = p.key === "Tab" && !p.altKey && !p.ctrlKey && !p.metaKey, g = document.activeElement;
2184
+ if (_ && g) {
2185
+ const y = p.currentTarget, [w, C] = ii(y);
2186
+ w && C ? !p.shiftKey && g === C ? (p.preventDefault(), n && W(w, { select: !0 })) : p.shiftKey && g === w && (p.preventDefault(), n && W(C, { select: !0 })) : g === y && p.preventDefault();
2187
+ }
2188
+ },
2189
+ [n, r, h.paused]
2190
+ );
2191
+ return /* @__PURE__ */ v(I.div, { tabIndex: -1, ...c, ref: m, onKeyDown: b });
2192
+ });
2193
+ qn.displayName = oi;
2194
+ function si(e, { select: t = !1 } = {}) {
2195
+ const n = document.activeElement;
2196
+ for (const r of e)
2197
+ if (W(r, { select: t }), document.activeElement !== n) return;
2198
+ }
2199
+ function ii(e) {
2200
+ const t = Gn(e), n = jt(t, e), r = jt(t.reverse(), e);
2201
+ return [n, r];
2202
+ }
2203
+ function Gn(e) {
2204
+ const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
2205
+ acceptNode: (r) => {
2206
+ const o = r.tagName === "INPUT" && r.type === "hidden";
2207
+ return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
2208
+ }
2209
+ });
2210
+ for (; n.nextNode(); ) t.push(n.currentNode);
2211
+ return t;
2212
+ }
2213
+ function jt(e, t) {
2214
+ for (const n of e)
2215
+ if (!ci(n, { upTo: t })) return n;
2216
+ }
2217
+ function ci(e, { upTo: t }) {
2218
+ if (getComputedStyle(e).visibility === "hidden") return !0;
2219
+ for (; e; ) {
2220
+ if (t !== void 0 && e === t) return !1;
2221
+ if (getComputedStyle(e).display === "none") return !0;
2222
+ e = e.parentElement;
2223
+ }
2224
+ return !1;
2225
+ }
2226
+ function ai(e) {
2227
+ return e instanceof HTMLInputElement && "select" in e;
2228
+ }
2229
+ function W(e, { select: t = !1 } = {}) {
2230
+ if (e && e.focus) {
2231
+ const n = document.activeElement;
2232
+ e.focus({ preventScroll: !0 }), e !== n && ai(e) && t && e.select();
2233
+ }
2234
+ }
2235
+ var Wt = li();
2236
+ function li() {
2237
+ let e = [];
2238
+ return {
2239
+ add(t) {
2240
+ const n = e[0];
2241
+ t !== n && n?.pause(), e = Bt(e, t), e.unshift(t);
2242
+ },
2243
+ remove(t) {
2244
+ e = Bt(e, t), e[0]?.resume();
2245
+ }
2246
+ };
2247
+ }
2248
+ function Bt(e, t) {
2249
+ const n = [...e], r = n.indexOf(t);
2250
+ return r !== -1 && n.splice(r, 1), n;
2251
+ }
2252
+ function ui(e) {
2253
+ return e.filter((t) => t.tagName !== "A");
2254
+ }
2255
+ var Xe = 0;
2256
+ function di() {
2257
+ f.useEffect(() => {
2258
+ const e = document.querySelectorAll("[data-radix-focus-guard]");
2259
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? Ut()), document.body.insertAdjacentElement("beforeend", e[1] ?? Ut()), Xe++, () => {
2260
+ Xe === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Xe--;
2261
+ };
2262
+ }, []);
2263
+ }
2264
+ function Ut() {
2265
+ const e = document.createElement("span");
2266
+ return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
2267
+ }
2268
+ var L = function() {
2269
+ return L = Object.assign || function(t) {
2270
+ for (var n, r = 1, o = arguments.length; r < o; r++) {
2271
+ n = arguments[r];
2272
+ for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && (t[s] = n[s]);
2273
+ }
2274
+ return t;
2275
+ }, L.apply(this, arguments);
2276
+ };
2277
+ function Yn(e, t) {
2278
+ var n = {};
2279
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
2280
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
2281
+ for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
2282
+ t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
2283
+ return n;
2284
+ }
2285
+ function fi(e, t, n) {
2286
+ if (n || arguments.length === 2) for (var r = 0, o = t.length, s; r < o; r++)
2287
+ (s || !(r in t)) && (s || (s = Array.prototype.slice.call(t, 0, r)), s[r] = t[r]);
2288
+ return e.concat(s || Array.prototype.slice.call(t));
2289
+ }
2290
+ var Ae = "right-scroll-bar-position", ke = "width-before-scroll-bar", pi = "with-scroll-bars-hidden", hi = "--removed-body-scroll-bar-size";
2291
+ function Je(e, t) {
2292
+ return typeof e == "function" ? e(t) : e && (e.current = t), e;
2293
+ }
2294
+ function vi(e, t) {
2295
+ var n = de(function() {
2296
+ return {
2297
+ // value
2298
+ value: e,
2299
+ // last callback
2300
+ callback: t,
2301
+ // "memoized" public interface
2302
+ facade: {
2303
+ get current() {
2304
+ return n.value;
2305
+ },
2306
+ set current(r) {
2307
+ var o = n.value;
2308
+ o !== r && (n.value = r, n.callback(r, o));
2309
+ }
2310
+ }
2311
+ };
2312
+ })[0];
2313
+ return n.callback = t, n.facade;
2314
+ }
2315
+ var _i = typeof window < "u" ? f.useLayoutEffect : f.useEffect, Zt = /* @__PURE__ */ new WeakMap();
2316
+ function mi(e, t) {
2317
+ var n = vi(null, function(r) {
2318
+ return e.forEach(function(o) {
2319
+ return Je(o, r);
2320
+ });
2321
+ });
2322
+ return _i(function() {
2323
+ var r = Zt.get(n);
2324
+ if (r) {
2325
+ var o = new Set(r), s = new Set(e), c = n.current;
2326
+ o.forEach(function(i) {
2327
+ s.has(i) || Je(i, null);
2328
+ }), s.forEach(function(i) {
2329
+ o.has(i) || Je(i, c);
2330
+ });
2331
+ }
2332
+ Zt.set(n, e);
2333
+ }, [e]), n;
2334
+ }
2335
+ function gi(e) {
2336
+ return e;
2337
+ }
2338
+ function yi(e, t) {
2339
+ t === void 0 && (t = gi);
2340
+ var n = [], r = !1, o = {
2341
+ read: function() {
2342
+ if (r)
2343
+ throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
2344
+ return n.length ? n[n.length - 1] : e;
2345
+ },
2346
+ useMedium: function(s) {
2347
+ var c = t(s, r);
2348
+ return n.push(c), function() {
2349
+ n = n.filter(function(i) {
2350
+ return i !== c;
2351
+ });
2352
+ };
2353
+ },
2354
+ assignSyncMedium: function(s) {
2355
+ for (r = !0; n.length; ) {
2356
+ var c = n;
2357
+ n = [], c.forEach(s);
2358
+ }
2359
+ n = {
2360
+ push: function(i) {
2361
+ return s(i);
2362
+ },
2363
+ filter: function() {
2364
+ return n;
2365
+ }
2366
+ };
2367
+ },
2368
+ assignMedium: function(s) {
2369
+ r = !0;
2370
+ var c = [];
2371
+ if (n.length) {
2372
+ var i = n;
2373
+ n = [], i.forEach(s), c = n;
2374
+ }
2375
+ var u = function() {
2376
+ var d = c;
2377
+ c = [], d.forEach(s);
2378
+ }, a = function() {
2379
+ return Promise.resolve().then(u);
2380
+ };
2381
+ a(), n = {
2382
+ push: function(d) {
2383
+ c.push(d), a();
2384
+ },
2385
+ filter: function(d) {
2386
+ return c = c.filter(d), n;
2387
+ }
2388
+ };
2389
+ }
2390
+ };
2391
+ return o;
2392
+ }
2393
+ function bi(e) {
2394
+ e === void 0 && (e = {});
2395
+ var t = yi(null);
2396
+ return t.options = L({ async: !0, ssr: !1 }, e), t;
2397
+ }
2398
+ var Xn = function(e) {
2399
+ var t = e.sideCar, n = Yn(e, ["sideCar"]);
2400
+ if (!t)
2401
+ throw new Error("Sidecar: please provide `sideCar` property to import the right car");
2402
+ var r = t.read();
2403
+ if (!r)
2404
+ throw new Error("Sidecar medium not found");
2405
+ return f.createElement(r, L({}, n));
2406
+ };
2407
+ Xn.isSideCarExport = !0;
2408
+ function wi(e, t) {
2409
+ return e.useMedium(t), Xn;
2410
+ }
2411
+ var Jn = bi(), Qe = function() {
2412
+ }, He = f.forwardRef(function(e, t) {
2413
+ var n = f.useRef(null), r = f.useState({
2414
+ onScrollCapture: Qe,
2415
+ onWheelCapture: Qe,
2416
+ onTouchMoveCapture: Qe
2417
+ }), o = r[0], s = r[1], c = e.forwardProps, i = e.children, u = e.className, a = e.removeScrollBar, d = e.enabled, l = e.shards, m = e.sideCar, h = e.noRelative, b = e.noIsolation, p = e.inert, _ = e.allowPinchZoom, g = e.as, y = g === void 0 ? "div" : g, w = e.gapMode, C = Yn(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = m, R = mi([n, t]), E = L(L({}, C), o);
2418
+ return f.createElement(
2419
+ f.Fragment,
2420
+ null,
2421
+ d && f.createElement(S, { sideCar: Jn, removeScrollBar: a, shards: l, noRelative: h, noIsolation: b, inert: p, setCallbacks: s, allowPinchZoom: !!_, lockRef: n, gapMode: w }),
2422
+ c ? f.cloneElement(f.Children.only(i), L(L({}, E), { ref: R })) : f.createElement(y, L({}, E, { className: u, ref: R }), i)
2423
+ );
2424
+ });
2425
+ He.defaultProps = {
2426
+ enabled: !0,
2427
+ removeScrollBar: !0,
2428
+ inert: !1
2429
+ };
2430
+ He.classNames = {
2431
+ fullWidth: ke,
2432
+ zeroRight: Ae
2433
+ };
2434
+ var Ci = function() {
2435
+ if (typeof __webpack_nonce__ < "u")
2436
+ return __webpack_nonce__;
2437
+ };
2438
+ function Ei() {
2439
+ if (!document)
2440
+ return null;
2441
+ var e = document.createElement("style");
2442
+ e.type = "text/css";
2443
+ var t = Ci();
2444
+ return t && e.setAttribute("nonce", t), e;
2445
+ }
2446
+ function Si(e, t) {
2447
+ e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
2448
+ }
2449
+ function Pi(e) {
2450
+ var t = document.head || document.getElementsByTagName("head")[0];
2451
+ t.appendChild(e);
2452
+ }
2453
+ var Ri = function() {
2454
+ var e = 0, t = null;
2455
+ return {
2456
+ add: function(n) {
2457
+ e == 0 && (t = Ei()) && (Si(t, n), Pi(t)), e++;
2458
+ },
2459
+ remove: function() {
2460
+ e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
2461
+ }
2462
+ };
2463
+ }, Oi = function() {
2464
+ var e = Ri();
2465
+ return function(t, n) {
2466
+ f.useEffect(function() {
2467
+ return e.add(t), function() {
2468
+ e.remove();
2469
+ };
2470
+ }, [t && n]);
2471
+ };
2472
+ }, Qn = function() {
2473
+ var e = Oi(), t = function(n) {
2474
+ var r = n.styles, o = n.dynamic;
2475
+ return e(r, o), null;
2476
+ };
2477
+ return t;
2478
+ }, Ai = {
2479
+ left: 0,
2480
+ top: 0,
2481
+ right: 0,
2482
+ gap: 0
2483
+ }, et = function(e) {
2484
+ return parseInt(e || "", 10) || 0;
2485
+ }, ki = function(e) {
2486
+ var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
2487
+ return [et(n), et(r), et(o)];
2488
+ }, Ni = function(e) {
2489
+ if (e === void 0 && (e = "margin"), typeof window > "u")
2490
+ return Ai;
2491
+ var t = ki(e), n = document.documentElement.clientWidth, r = window.innerWidth;
2492
+ return {
2493
+ left: t[0],
2494
+ top: t[1],
2495
+ right: t[2],
2496
+ gap: Math.max(0, r - n + t[2] - t[0])
2497
+ };
2498
+ }, Ii = Qn(), ee = "data-scroll-locked", Ti = function(e, t, n, r) {
2499
+ var o = e.left, s = e.top, c = e.right, i = e.gap;
2500
+ return n === void 0 && (n = "margin"), `
2501
+ .`.concat(pi, ` {
2502
+ overflow: hidden `).concat(r, `;
2503
+ padding-right: `).concat(i, "px ").concat(r, `;
2504
+ }
2505
+ body[`).concat(ee, `] {
2506
+ overflow: hidden `).concat(r, `;
2507
+ overscroll-behavior: contain;
2508
+ `).concat([
2509
+ t && "position: relative ".concat(r, ";"),
2510
+ n === "margin" && `
2511
+ padding-left: `.concat(o, `px;
2512
+ padding-top: `).concat(s, `px;
2513
+ padding-right: `).concat(c, `px;
2514
+ margin-left:0;
2515
+ margin-top:0;
2516
+ margin-right: `).concat(i, "px ").concat(r, `;
2517
+ `),
2518
+ n === "padding" && "padding-right: ".concat(i, "px ").concat(r, ";")
2519
+ ].filter(Boolean).join(""), `
2520
+ }
2521
+
2522
+ .`).concat(Ae, ` {
2523
+ right: `).concat(i, "px ").concat(r, `;
2524
+ }
2525
+
2526
+ .`).concat(ke, ` {
2527
+ margin-right: `).concat(i, "px ").concat(r, `;
2528
+ }
2529
+
2530
+ .`).concat(Ae, " .").concat(Ae, ` {
2531
+ right: 0 `).concat(r, `;
2532
+ }
2533
+
2534
+ .`).concat(ke, " .").concat(ke, ` {
2535
+ margin-right: 0 `).concat(r, `;
2536
+ }
2537
+
2538
+ body[`).concat(ee, `] {
2539
+ `).concat(hi, ": ").concat(i, `px;
2540
+ }
2541
+ `);
2542
+ }, Vt = function() {
2543
+ var e = parseInt(document.body.getAttribute(ee) || "0", 10);
2544
+ return isFinite(e) ? e : 0;
2545
+ }, Di = function() {
2546
+ f.useEffect(function() {
2547
+ return document.body.setAttribute(ee, (Vt() + 1).toString()), function() {
2548
+ var e = Vt() - 1;
2549
+ e <= 0 ? document.body.removeAttribute(ee) : document.body.setAttribute(ee, e.toString());
2550
+ };
2551
+ }, []);
2552
+ }, xi = function(e) {
2553
+ var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
2554
+ Di();
2555
+ var s = f.useMemo(function() {
2556
+ return Ni(o);
2557
+ }, [o]);
2558
+ return f.createElement(Ii, { styles: Ti(s, !t, o, n ? "" : "!important") });
2559
+ }, lt = !1;
2560
+ if (typeof window < "u")
2561
+ try {
2562
+ var Ce = Object.defineProperty({}, "passive", {
2563
+ get: function() {
2564
+ return lt = !0, !0;
2565
+ }
2566
+ });
2567
+ window.addEventListener("test", Ce, Ce), window.removeEventListener("test", Ce, Ce);
2568
+ } catch {
2569
+ lt = !1;
2570
+ }
2571
+ var X = lt ? { passive: !1 } : !1, Mi = function(e) {
2572
+ return e.tagName === "TEXTAREA";
2573
+ }, er = function(e, t) {
2574
+ if (!(e instanceof Element))
2575
+ return !1;
2576
+ var n = window.getComputedStyle(e);
2577
+ return (
2578
+ // not-not-scrollable
2579
+ n[t] !== "hidden" && // contains scroll inside self
2580
+ !(n.overflowY === n.overflowX && !Mi(e) && n[t] === "visible")
2581
+ );
2582
+ }, zi = function(e) {
2583
+ return er(e, "overflowY");
2584
+ }, Li = function(e) {
2585
+ return er(e, "overflowX");
2586
+ }, Ht = function(e, t) {
2587
+ var n = t.ownerDocument, r = t;
2588
+ do {
2589
+ typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
2590
+ var o = tr(e, r);
2591
+ if (o) {
2592
+ var s = nr(e, r), c = s[1], i = s[2];
2593
+ if (c > i)
2594
+ return !0;
2595
+ }
2596
+ r = r.parentNode;
2597
+ } while (r && r !== n.body);
2598
+ return !1;
2599
+ }, $i = function(e) {
2600
+ var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
2601
+ return [
2602
+ t,
2603
+ n,
2604
+ r
2605
+ ];
2606
+ }, Fi = function(e) {
2607
+ var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
2608
+ return [
2609
+ t,
2610
+ n,
2611
+ r
2612
+ ];
2613
+ }, tr = function(e, t) {
2614
+ return e === "v" ? zi(t) : Li(t);
2615
+ }, nr = function(e, t) {
2616
+ return e === "v" ? $i(t) : Fi(t);
2617
+ }, ji = function(e, t) {
2618
+ return e === "h" && t === "rtl" ? -1 : 1;
2619
+ }, Wi = function(e, t, n, r, o) {
2620
+ var s = ji(e, window.getComputedStyle(t).direction), c = s * r, i = n.target, u = t.contains(i), a = !1, d = c > 0, l = 0, m = 0;
2621
+ do {
2622
+ if (!i)
2623
+ break;
2624
+ var h = nr(e, i), b = h[0], p = h[1], _ = h[2], g = p - _ - s * b;
2625
+ (b || g) && tr(e, i) && (l += g, m += b);
2626
+ var y = i.parentNode;
2627
+ i = y && y.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? y.host : y;
2628
+ } while (
2629
+ // portaled content
2630
+ !u && i !== document.body || // self content
2631
+ u && (t.contains(i) || t === i)
2632
+ );
2633
+ return (d && Math.abs(l) < 1 || !d && Math.abs(m) < 1) && (a = !0), a;
2634
+ }, Ee = function(e) {
2635
+ return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
2636
+ }, Kt = function(e) {
2637
+ return [e.deltaX, e.deltaY];
2638
+ }, qt = function(e) {
2639
+ return e && "current" in e ? e.current : e;
2640
+ }, Bi = function(e, t) {
2641
+ return e[0] === t[0] && e[1] === t[1];
2642
+ }, Ui = function(e) {
2643
+ return `
2644
+ .block-interactivity-`.concat(e, ` {pointer-events: none;}
2645
+ .allow-interactivity-`).concat(e, ` {pointer-events: all;}
2646
+ `);
2647
+ }, Zi = 0, J = [];
2648
+ function Vi(e) {
2649
+ var t = f.useRef([]), n = f.useRef([0, 0]), r = f.useRef(), o = f.useState(Zi++)[0], s = f.useState(Qn)[0], c = f.useRef(e);
2650
+ f.useEffect(function() {
2651
+ c.current = e;
2652
+ }, [e]), f.useEffect(function() {
2653
+ if (e.inert) {
2654
+ document.body.classList.add("block-interactivity-".concat(o));
2655
+ var p = fi([e.lockRef.current], (e.shards || []).map(qt), !0).filter(Boolean);
2656
+ return p.forEach(function(_) {
2657
+ return _.classList.add("allow-interactivity-".concat(o));
2658
+ }), function() {
2659
+ document.body.classList.remove("block-interactivity-".concat(o)), p.forEach(function(_) {
2660
+ return _.classList.remove("allow-interactivity-".concat(o));
2661
+ });
2662
+ };
2663
+ }
2664
+ }, [e.inert, e.lockRef.current, e.shards]);
2665
+ var i = f.useCallback(function(p, _) {
2666
+ if ("touches" in p && p.touches.length === 2 || p.type === "wheel" && p.ctrlKey)
2667
+ return !c.current.allowPinchZoom;
2668
+ var g = Ee(p), y = n.current, w = "deltaX" in p ? p.deltaX : y[0] - g[0], C = "deltaY" in p ? p.deltaY : y[1] - g[1], S, R = p.target, E = Math.abs(w) > Math.abs(C) ? "h" : "v";
2669
+ if ("touches" in p && E === "h" && R.type === "range")
2670
+ return !1;
2671
+ var N = window.getSelection(), k = N && N.anchorNode, D = k ? k === R || k.contains(R) : !1;
2672
+ if (D)
2673
+ return !1;
2674
+ var _e = Ht(E, R);
2675
+ if (!_e)
2676
+ return !0;
2677
+ if (_e ? S = E : (S = E === "v" ? "h" : "v", _e = Ht(E, R)), !_e)
2678
+ return !1;
2679
+ if (!r.current && "changedTouches" in p && (w || C) && (r.current = S), !S)
2680
+ return !0;
2681
+ var Et = r.current || S;
2682
+ return Wi(Et, _, p, Et === "h" ? w : C);
2683
+ }, []), u = f.useCallback(function(p) {
2684
+ var _ = p;
2685
+ if (!(!J.length || J[J.length - 1] !== s)) {
2686
+ var g = "deltaY" in _ ? Kt(_) : Ee(_), y = t.current.filter(function(S) {
2687
+ return S.name === _.type && (S.target === _.target || _.target === S.shadowParent) && Bi(S.delta, g);
2688
+ })[0];
2689
+ if (y && y.should) {
2690
+ _.cancelable && _.preventDefault();
2691
+ return;
2692
+ }
2693
+ if (!y) {
2694
+ var w = (c.current.shards || []).map(qt).filter(Boolean).filter(function(S) {
2695
+ return S.contains(_.target);
2696
+ }), C = w.length > 0 ? i(_, w[0]) : !c.current.noIsolation;
2697
+ C && _.cancelable && _.preventDefault();
2698
+ }
2699
+ }
2700
+ }, []), a = f.useCallback(function(p, _, g, y) {
2701
+ var w = { name: p, delta: _, target: g, should: y, shadowParent: Hi(g) };
2702
+ t.current.push(w), setTimeout(function() {
2703
+ t.current = t.current.filter(function(C) {
2704
+ return C !== w;
2705
+ });
2706
+ }, 1);
2707
+ }, []), d = f.useCallback(function(p) {
2708
+ n.current = Ee(p), r.current = void 0;
2709
+ }, []), l = f.useCallback(function(p) {
2710
+ a(p.type, Kt(p), p.target, i(p, e.lockRef.current));
2711
+ }, []), m = f.useCallback(function(p) {
2712
+ a(p.type, Ee(p), p.target, i(p, e.lockRef.current));
2713
+ }, []);
2714
+ f.useEffect(function() {
2715
+ return J.push(s), e.setCallbacks({
2716
+ onScrollCapture: l,
2717
+ onWheelCapture: l,
2718
+ onTouchMoveCapture: m
2719
+ }), document.addEventListener("wheel", u, X), document.addEventListener("touchmove", u, X), document.addEventListener("touchstart", d, X), function() {
2720
+ J = J.filter(function(p) {
2721
+ return p !== s;
2722
+ }), document.removeEventListener("wheel", u, X), document.removeEventListener("touchmove", u, X), document.removeEventListener("touchstart", d, X);
2723
+ };
2724
+ }, []);
2725
+ var h = e.removeScrollBar, b = e.inert;
2726
+ return f.createElement(
2727
+ f.Fragment,
2728
+ null,
2729
+ b ? f.createElement(s, { styles: Ui(o) }) : null,
2730
+ h ? f.createElement(xi, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
2731
+ );
2732
+ }
2733
+ function Hi(e) {
2734
+ for (var t = null; e !== null; )
2735
+ e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
2736
+ return t;
2737
+ }
2738
+ const Ki = wi(Jn, Vi);
2739
+ var rr = f.forwardRef(function(e, t) {
2740
+ return f.createElement(He, L({}, e, { ref: t, sideCar: Ki }));
2741
+ });
2742
+ rr.classNames = He.classNames;
2743
+ var qi = function(e) {
2744
+ if (typeof document > "u")
2745
+ return null;
2746
+ var t = Array.isArray(e) ? e[0] : e;
2747
+ return t.ownerDocument.body;
2748
+ }, Q = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), Pe = {}, tt = 0, or = function(e) {
2749
+ return e && (e.host || or(e.parentNode));
2750
+ }, Gi = function(e, t) {
2751
+ return t.map(function(n) {
2752
+ if (e.contains(n))
2753
+ return n;
2754
+ var r = or(n);
2755
+ return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
2756
+ }).filter(function(n) {
2757
+ return !!n;
2758
+ });
2759
+ }, Yi = function(e, t, n, r) {
2760
+ var o = Gi(t, Array.isArray(e) ? e : [e]);
2761
+ Pe[n] || (Pe[n] = /* @__PURE__ */ new WeakMap());
2762
+ var s = Pe[n], c = [], i = /* @__PURE__ */ new Set(), u = new Set(o), a = function(l) {
2763
+ !l || i.has(l) || (i.add(l), a(l.parentNode));
2764
+ };
2765
+ o.forEach(a);
2766
+ var d = function(l) {
2767
+ !l || u.has(l) || Array.prototype.forEach.call(l.children, function(m) {
2768
+ if (i.has(m))
2769
+ d(m);
2770
+ else
2771
+ try {
2772
+ var h = m.getAttribute(r), b = h !== null && h !== "false", p = (Q.get(m) || 0) + 1, _ = (s.get(m) || 0) + 1;
2773
+ Q.set(m, p), s.set(m, _), c.push(m), p === 1 && b && Se.set(m, !0), _ === 1 && m.setAttribute(n, "true"), b || m.setAttribute(r, "true");
2774
+ } catch (g) {
2775
+ console.error("aria-hidden: cannot operate on ", m, g);
2776
+ }
2777
+ });
2778
+ };
2779
+ return d(t), i.clear(), tt++, function() {
2780
+ c.forEach(function(l) {
2781
+ var m = Q.get(l) - 1, h = s.get(l) - 1;
2782
+ Q.set(l, m), s.set(l, h), m || (Se.has(l) || l.removeAttribute(r), Se.delete(l)), h || l.removeAttribute(n);
2783
+ }), tt--, tt || (Q = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), Pe = {});
2784
+ };
2785
+ }, Xi = function(e, t, n) {
2786
+ n === void 0 && (n = "data-aria-hidden");
2787
+ var r = Array.from(Array.isArray(e) ? e : [e]), o = qi(e);
2788
+ return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Yi(r, o, n, "aria-hidden")) : function() {
2789
+ return null;
2790
+ };
2791
+ }, Ke = "Dialog", [sr] = he(Ke), [Ji, F] = sr(Ke), ir = (e) => {
2792
+ const {
2793
+ __scopeDialog: t,
2794
+ children: n,
2795
+ open: r,
2796
+ defaultOpen: o,
2797
+ onOpenChange: s,
2798
+ modal: c = !0
2799
+ } = e, i = f.useRef(null), u = f.useRef(null), [a, d] = ve({
2800
+ prop: r,
2801
+ defaultProp: o ?? !1,
2802
+ onChange: s,
2803
+ caller: Ke
2804
+ });
2805
+ return /* @__PURE__ */ v(
2806
+ Ji,
2807
+ {
2808
+ scope: t,
2809
+ triggerRef: i,
2810
+ contentRef: u,
2811
+ contentId: ue(),
2812
+ titleId: ue(),
2813
+ descriptionId: ue(),
2814
+ open: a,
2815
+ onOpenChange: d,
2816
+ onOpenToggle: f.useCallback(() => d((l) => !l), [d]),
2817
+ modal: c,
2818
+ children: n
2819
+ }
2820
+ );
2821
+ };
2822
+ ir.displayName = Ke;
2823
+ var cr = "DialogTrigger", Qi = f.forwardRef(
2824
+ (e, t) => {
2825
+ const { __scopeDialog: n, ...r } = e, o = F(cr, n), s = T(t, o.triggerRef);
2826
+ return /* @__PURE__ */ v(
2827
+ I.button,
2828
+ {
2829
+ type: "button",
2830
+ "aria-haspopup": "dialog",
2831
+ "aria-expanded": o.open,
2832
+ "aria-controls": o.contentId,
2833
+ "data-state": Ct(o.open),
2834
+ ...r,
2835
+ ref: s,
2836
+ onClick: M(e.onClick, o.onOpenToggle)
2837
+ }
2838
+ );
2839
+ }
2840
+ );
2841
+ Qi.displayName = cr;
2842
+ var ec = "DialogPortal", [_c, ar] = sr(ec, {
2843
+ forceMount: void 0
2844
+ }), Le = "DialogOverlay", tc = f.forwardRef(
2845
+ (e, t) => {
2846
+ const n = ar(Le, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = F(Le, e.__scopeDialog);
2847
+ return s.modal ? /* @__PURE__ */ v(We, { present: r || s.open, children: /* @__PURE__ */ v(rc, { ...o, ref: t }) }) : null;
2848
+ }
2849
+ );
2850
+ tc.displayName = Le;
2851
+ var nc = /* @__PURE__ */ Me("DialogOverlay.RemoveScroll"), rc = f.forwardRef(
2852
+ (e, t) => {
2853
+ const { __scopeDialog: n, ...r } = e, o = F(Le, n);
2854
+ return (
2855
+ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
2856
+ // ie. when `Overlay` and `Content` are siblings
2857
+ /* @__PURE__ */ v(rr, { as: nc, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ v(
2858
+ I.div,
2859
+ {
2860
+ "data-state": Ct(o.open),
2861
+ ...r,
2862
+ ref: t,
2863
+ style: { pointerEvents: "auto", ...r.style }
2864
+ }
2865
+ ) })
2866
+ );
2867
+ }
2868
+ ), G = "DialogContent", lr = f.forwardRef(
2869
+ (e, t) => {
2870
+ const n = ar(G, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = F(G, e.__scopeDialog);
2871
+ return /* @__PURE__ */ v(We, { present: r || s.open, children: s.modal ? /* @__PURE__ */ v(oc, { ...o, ref: t }) : /* @__PURE__ */ v(sc, { ...o, ref: t }) });
2872
+ }
2873
+ );
2874
+ lr.displayName = G;
2875
+ var oc = f.forwardRef(
2876
+ (e, t) => {
2877
+ const n = F(G, e.__scopeDialog), r = f.useRef(null), o = T(t, n.contentRef, r);
2878
+ return f.useEffect(() => {
2879
+ const s = r.current;
2880
+ if (s) return Xi(s);
2881
+ }, []), /* @__PURE__ */ v(
2882
+ ur,
2883
+ {
2884
+ ...e,
2885
+ ref: o,
2886
+ trapFocus: n.open,
2887
+ disableOutsidePointerEvents: !0,
2888
+ onCloseAutoFocus: M(e.onCloseAutoFocus, (s) => {
2889
+ s.preventDefault(), n.triggerRef.current?.focus();
2890
+ }),
2891
+ onPointerDownOutside: M(e.onPointerDownOutside, (s) => {
2892
+ const c = s.detail.originalEvent, i = c.button === 0 && c.ctrlKey === !0;
2893
+ (c.button === 2 || i) && s.preventDefault();
2894
+ }),
2895
+ onFocusOutside: M(
2896
+ e.onFocusOutside,
2897
+ (s) => s.preventDefault()
2898
+ )
2899
+ }
2900
+ );
2901
+ }
2902
+ ), sc = f.forwardRef(
2903
+ (e, t) => {
2904
+ const n = F(G, e.__scopeDialog), r = f.useRef(!1), o = f.useRef(!1);
2905
+ return /* @__PURE__ */ v(
2906
+ ur,
2907
+ {
2908
+ ...e,
2909
+ ref: t,
2910
+ trapFocus: !1,
2911
+ disableOutsidePointerEvents: !1,
2912
+ onCloseAutoFocus: (s) => {
2913
+ e.onCloseAutoFocus?.(s), s.defaultPrevented || (r.current || n.triggerRef.current?.focus(), s.preventDefault()), r.current = !1, o.current = !1;
2914
+ },
2915
+ onInteractOutside: (s) => {
2916
+ e.onInteractOutside?.(s), s.defaultPrevented || (r.current = !0, s.detail.originalEvent.type === "pointerdown" && (o.current = !0));
2917
+ const c = s.target;
2918
+ n.triggerRef.current?.contains(c) && s.preventDefault(), s.detail.originalEvent.type === "focusin" && o.current && s.preventDefault();
2919
+ }
2920
+ }
2921
+ );
2922
+ }
2923
+ ), ur = f.forwardRef(
2924
+ (e, t) => {
2925
+ const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...c } = e, i = F(G, n), u = f.useRef(null), a = T(t, u);
2926
+ return di(), /* @__PURE__ */ v(te, { children: [
2927
+ /* @__PURE__ */ v(
2928
+ qn,
2929
+ {
2930
+ asChild: !0,
2931
+ loop: !0,
2932
+ trapped: r,
2933
+ onMountAutoFocus: o,
2934
+ onUnmountAutoFocus: s,
2935
+ children: /* @__PURE__ */ v(
2936
+ Hn,
2937
+ {
2938
+ role: "dialog",
2939
+ id: i.contentId,
2940
+ "aria-describedby": i.descriptionId,
2941
+ "aria-labelledby": i.titleId,
2942
+ "data-state": Ct(i.open),
2943
+ ...c,
2944
+ ref: a,
2945
+ onDismiss: () => i.onOpenChange(!1)
2946
+ }
2947
+ )
2948
+ }
2949
+ ),
2950
+ /* @__PURE__ */ v(te, { children: [
2951
+ /* @__PURE__ */ v(ic, { titleId: i.titleId }),
2952
+ /* @__PURE__ */ v(ac, { contentRef: u, descriptionId: i.descriptionId })
2953
+ ] })
2954
+ ] });
2955
+ }
2956
+ ), wt = "DialogTitle", dr = f.forwardRef(
2957
+ (e, t) => {
2958
+ const { __scopeDialog: n, ...r } = e, o = F(wt, n);
2959
+ return /* @__PURE__ */ v(I.h2, { id: o.titleId, ...r, ref: t });
2960
+ }
2961
+ );
2962
+ dr.displayName = wt;
2963
+ var fr = "DialogDescription", pr = f.forwardRef(
2964
+ (e, t) => {
2965
+ const { __scopeDialog: n, ...r } = e, o = F(fr, n);
2966
+ return /* @__PURE__ */ v(I.p, { id: o.descriptionId, ...r, ref: t });
2967
+ }
2968
+ );
2969
+ pr.displayName = fr;
2970
+ var hr = "DialogClose", vr = f.forwardRef(
2971
+ (e, t) => {
2972
+ const { __scopeDialog: n, ...r } = e, o = F(hr, n);
2973
+ return /* @__PURE__ */ v(
2974
+ I.button,
2975
+ {
2976
+ type: "button",
2977
+ ...r,
2978
+ ref: t,
2979
+ onClick: M(e.onClick, () => o.onOpenChange(!1))
2980
+ }
2981
+ );
2982
+ }
2983
+ );
2984
+ vr.displayName = hr;
2985
+ function Ct(e) {
2986
+ return e ? "open" : "closed";
2987
+ }
2988
+ var _r = "DialogTitleWarning", [mc, mr] = Vo(_r, {
2989
+ contentName: G,
2990
+ titleName: wt,
2991
+ docsSlug: "dialog"
2992
+ }), ic = ({ titleId: e }) => {
2993
+ const t = mr(_r), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2994
+
2995
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
2996
+
2997
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
2998
+ return f.useEffect(() => {
2999
+ e && (document.getElementById(e) || console.error(n));
3000
+ }, [n, e]), null;
3001
+ }, cc = "DialogDescriptionWarning", ac = ({ contentRef: e, descriptionId: t }) => {
3002
+ const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${mr(cc).contentName}}.`;
3003
+ return f.useEffect(() => {
3004
+ const o = e.current?.getAttribute("aria-describedby");
3005
+ t && o && (document.getElementById(t) || console.warn(r));
3006
+ }, [r, e, t]), null;
3007
+ }, lc = ir, uc = lr, dc = dr, fc = pr, Gt = vr;
3008
+ const pc = ({
3009
+ noTarget: e = !0,
3010
+ heading: t = "We use cookies.",
3011
+ subheading: n = "Please define your selection below.",
3012
+ selectLabel: r = "Select",
3013
+ hideLabel: o = "Hide",
3014
+ saveLabel: s = "Save selection",
3015
+ declineLabel: c = "Decline all",
3016
+ defaultSettingsOpen: i = !0,
3017
+ privacyPolicy: u,
3018
+ items: a
3019
+ }) => {
3020
+ const { onSave: d, onDeclineAll: l, selectionTaken: m } = Zn(), [h, b] = de(void 0), [p, _] = de(i);
3021
+ return /* @__PURE__ */ v(lc, { open: !m, children: /* @__PURE__ */ v(
3022
+ uc,
3023
+ {
3024
+ className: ht(x.root, e ? x.noTarget : ""),
3025
+ children: /* @__PURE__ */ v(
3026
+ En,
3027
+ {
3028
+ open: p,
3029
+ onOpenChange: _,
3030
+ className: x.collapsible,
3031
+ children: [
3032
+ /* @__PURE__ */ v("div", { className: x.header, children: [
3033
+ /* @__PURE__ */ v("div", { className: x.heading, children: [
3034
+ /* @__PURE__ */ v(dc, { asChild: !0, children: /* @__PURE__ */ v(q, { weight: "bold", children: t }) }),
3035
+ /* @__PURE__ */ v(fc, { asChild: !0, children: /* @__PURE__ */ v(q, { size: "caption", color: "muted", children: n }) })
3036
+ ] }),
3037
+ /* @__PURE__ */ v(Sn, { asChild: !0, children: /* @__PURE__ */ v(qe, { variant: "ghost", children: [
3038
+ p ? o : r,
3039
+ " ",
3040
+ /* @__PURE__ */ v(
3041
+ Ms,
3042
+ {
3043
+ size: 12,
3044
+ className: it({
3045
+ [x.chevron]: !0,
3046
+ [x.open]: p
3047
+ })
3048
+ }
3049
+ )
3050
+ ] }) })
3051
+ ] }),
3052
+ /* @__PURE__ */ v(
3053
+ Pn,
3054
+ {
3055
+ className: it({
3056
+ [x.settings]: !0
3057
+ }),
3058
+ children: /* @__PURE__ */ v(
3059
+ Ss,
3060
+ {
3061
+ type: "single",
3062
+ collapsible: !0,
3063
+ value: h,
3064
+ onValueChange: b,
3065
+ children: a.map((g) => /* @__PURE__ */ v(Gs, { ...g, openItem: h }, g.value))
3066
+ }
3067
+ )
3068
+ }
3069
+ ),
3070
+ /* @__PURE__ */ v("div", { className: x.footer, children: [
3071
+ /* @__PURE__ */ v("div", { className: x.legal, children: u && /* @__PURE__ */ v(q, { size: "caption", children: /* @__PURE__ */ v("a", { href: u.url, target: "_blank", children: u.label }) }) }),
3072
+ /* @__PURE__ */ v("div", { className: x.actions, children: [
3073
+ /* @__PURE__ */ v(Gt, { asChild: !0, children: /* @__PURE__ */ v(qe, { variant: "neutral", onClick: () => l(), children: c }) }),
3074
+ /* @__PURE__ */ v(Gt, { asChild: !0, children: /* @__PURE__ */ v(qe, { variant: "brand", onClick: () => d(), children: s }) })
3075
+ ] })
3076
+ ] })
3077
+ ]
3078
+ }
3079
+ )
3080
+ }
3081
+ ) });
3082
+ }, hc = ({
3083
+ localStorageKey: e = "cb-selection",
3084
+ items: t,
3085
+ ...n
3086
+ }) => {
3087
+ const r = H(
3088
+ () => t.filter((o) => !o.required).map((o) => ({
3089
+ value: o.value,
3090
+ script: o.script,
3091
+ defaultSelected: o.defaultSelected,
3092
+ required: o.required
3093
+ })),
3094
+ [t]
3095
+ );
3096
+ return /* @__PURE__ */ v(qs, { items: r, localStorageKey: e, children: /* @__PURE__ */ v(pc, { items: t, ...n }) });
3097
+ };
3098
+ function gc(e, t) {
3099
+ const n = t === void 0;
3100
+ let r;
3101
+ if (typeof t == "string") {
3102
+ const o = document.querySelector(t);
3103
+ if (!o)
3104
+ throw new Error(`Element with selector "${t}" not found`);
3105
+ r = o;
3106
+ } else
3107
+ r = t;
3108
+ Ar(/* @__PURE__ */ v(hc, { noTarget: n, ...e }), r ?? document.body);
3109
+ }
3110
+ export {
3111
+ gc as mountBanner
3112
+ };