@appforgeapps/uiforge 0.1.0 → 0.5.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.
package/dist/uiforge.js CHANGED
@@ -1,507 +1,541 @@
1
- import { jsx as e, jsxs as d, Fragment as _e } from "react/jsx-runtime";
2
- import { useState as j, useMemo as te, useCallback as L, useRef as G, useEffect as ne } from "react";
3
- const It = ({
1
+ import { jsx as n, jsxs as y, Fragment as ye } from "react/jsx-runtime";
2
+ import { useState as te, useMemo as oe, useCallback as B, useRef as ne, useEffect as ae, createElement as Ne, PureComponent as Qe, createContext as Xe, useContext as et } from "react";
3
+ const qr = ({
4
4
  variant: t = "primary",
5
- size: n = "medium",
6
- children: r,
5
+ size: e = "medium",
6
+ theme: r = "light",
7
+ density: i = "default",
8
+ children: a,
9
+ className: m = "",
10
+ ...s
11
+ }) => {
12
+ const l = "uiforge-button", $ = `${l}--${t}`, L = `${l}--${e}`, k = `${l}--${r}`, E = i === "condensed" ? `${l}--condensed` : "", P = [l, $, L, k, E, m].filter(Boolean).join(" ");
13
+ return /* @__PURE__ */ n("button", { className: P, "data-theme": r, ...s, children: a });
14
+ }, Kr = ({
15
+ isOpen: t,
16
+ controlsId: e,
17
+ ariaLabel: r = "Toggle menu",
7
18
  className: i = "",
8
- ...h
19
+ size: a = "medium",
20
+ ...m
9
21
  }) => {
10
- const p = "uiforge-button", u = `${p}--${t}`, f = `${p}--${n}`, k = `${p} ${u} ${f} ${i}`.trim();
11
- return /* @__PURE__ */ e("button", { className: k, ...h, children: r });
12
- }, Bt = ({
22
+ const s = "uiforge-hamburger-button", l = [
23
+ s,
24
+ `${s}--${a}`,
25
+ t && `${s}--open`,
26
+ i
27
+ ].filter(Boolean).join(" ");
28
+ return /* @__PURE__ */ y(
29
+ "button",
30
+ {
31
+ type: "button",
32
+ className: l,
33
+ "aria-expanded": t,
34
+ "aria-controls": e,
35
+ "aria-label": r,
36
+ ...m,
37
+ children: [
38
+ /* @__PURE__ */ n("span", { className: `${s}__bar`, "aria-hidden": "true" }),
39
+ /* @__PURE__ */ n("span", { className: `${s}__bar`, "aria-hidden": "true" }),
40
+ /* @__PURE__ */ n("span", { className: `${s}__bar`, "aria-hidden": "true" })
41
+ ]
42
+ }
43
+ );
44
+ }, Zr = ({
13
45
  columns: t,
14
- data: n,
15
- selectable: r = !1,
16
- selectedRows: i,
17
- getRowKey: h = (ie, X) => X,
18
- onSelectionChange: p,
19
- onCellEdit: u,
20
- actionButtons: f = [],
21
- searchable: k = !1,
22
- searchPlaceholder: Z = "Search...",
23
- onSearch: H,
24
- customFilter: F,
25
- pagination: s,
26
- onPageChange: S,
27
- onPageSizeChange: D,
28
- pageSizeOptions: q = [10, 25, 50, 100],
29
- className: A = "",
30
- loading: C = !1,
31
- emptyMessage: z = "No data available"
46
+ data: e,
47
+ theme: r = "light",
48
+ selectable: i = !1,
49
+ selectedRows: a,
50
+ getRowKey: m = (O, C) => C,
51
+ onSelectionChange: s,
52
+ onCellEdit: l,
53
+ actionButtons: $ = [],
54
+ searchable: L = !1,
55
+ searchPlaceholder: k = "Search...",
56
+ onSearch: E,
57
+ customFilter: P,
58
+ pagination: c,
59
+ onPageChange: _,
60
+ onPageSizeChange: o,
61
+ pageSizeOptions: d = [10, 25, 50, 100],
62
+ className: u = "",
63
+ loading: g = !1,
64
+ emptyMessage: S = "No data available"
32
65
  }) => {
33
- const [ie, X] = j(/* @__PURE__ */ new Set()), [$, J] = j(""), [I, O] = j(null), [P, a] = j(""), v = i ?? ie, g = te(() => !k || !$ ? n : n.filter((l) => F ? F(l, $) : Object.values(l).some((x) => x == null ? !1 : String(x).toLowerCase().includes($.toLowerCase()))), [n, $, k, F]), y = te(() => {
34
- if (!s || s.serverSide)
35
- return g;
36
- const l = s.currentPage * s.pageSize, x = l + s.pageSize;
37
- return g.slice(l, x);
38
- }, [g, s]), K = te(() => s ? s.serverSide && s.totalItems !== void 0 ? Math.ceil(s.totalItems / s.pageSize) : Math.ceil(g.length / s.pageSize) : 1, [s, g.length]), T = L(() => n.filter((l, x) => {
39
- const w = h(l, x);
40
- return v.has(w);
41
- }), [n, v, h]), le = L(
42
- (l) => {
43
- const x = /* @__PURE__ */ new Set();
44
- l && y.forEach((w) => {
45
- const N = n.indexOf(w), ae = h(w, N);
46
- x.add(ae);
47
- }), i === void 0 && X(x), p?.(x, l ? y : []);
66
+ const [O, C] = te(/* @__PURE__ */ new Set()), [b, M] = te(""), [A, U] = te(null), [R, F] = te(""), f = a ?? O, N = oe(() => !L || !b ? e : e.filter((p) => P ? P(p, b) : Object.values(p).some((T) => T == null ? !1 : String(T).toLowerCase().includes(b.toLowerCase()))), [e, b, L, P]), x = oe(() => {
67
+ if (!c || c.serverSide)
68
+ return N;
69
+ const p = c.currentPage * c.pageSize, T = p + c.pageSize;
70
+ return N.slice(p, T);
71
+ }, [N, c]), w = oe(() => c ? c.serverSide && c.totalItems !== void 0 ? Math.ceil(c.totalItems / c.pageSize) : Math.ceil(N.length / c.pageSize) : 1, [c, N.length]), se = B(() => e.filter((p, T) => {
72
+ const W = m(p, T);
73
+ return f.has(W);
74
+ }), [e, f, m]), J = B(
75
+ (p) => {
76
+ const T = /* @__PURE__ */ new Set();
77
+ p && x.forEach((W) => {
78
+ const Z = e.indexOf(W), de = m(W, Z);
79
+ T.add(de);
80
+ }), a === void 0 && C(T), s?.(T, p ? x : []);
48
81
  },
49
- [y, n, h, p, i]
50
- ), re = L(
51
- (l, x, w) => {
52
- const N = new Set(v);
53
- w ? N.add(l) : N.delete(l), i === void 0 && X(N);
54
- const ae = n.filter((B, he) => {
55
- const ue = h(B, he);
56
- return N.has(ue);
82
+ [x, e, m, s, a]
83
+ ), ie = B(
84
+ (p, T, W) => {
85
+ const Z = new Set(f);
86
+ W ? Z.add(p) : Z.delete(p), a === void 0 && C(Z);
87
+ const de = e.filter((K, fe) => {
88
+ const ge = m(K, fe);
89
+ return Z.has(ge);
57
90
  });
58
- p?.(N, ae);
91
+ s?.(Z, de);
59
92
  },
60
- [v, n, h, p, i]
61
- ), Q = L(
62
- (l) => {
63
- J(l), H?.(l);
93
+ [f, e, m, s, a]
94
+ ), ee = B(
95
+ (p) => {
96
+ M(p), E?.(p);
64
97
  },
65
- [H]
66
- ), oe = L(
67
- (l, x, w) => {
68
- O({ rowKey: l, columnKey: x }), a(w);
98
+ [E]
99
+ ), ce = B(
100
+ (p, T, W) => {
101
+ U({ rowKey: p, columnKey: T }), F(W);
69
102
  },
70
103
  []
71
- ), ce = L(
72
- (l, x, w) => {
73
- u?.(l, x, P, w), O(null), a("");
104
+ ), le = B(
105
+ (p, T, W) => {
106
+ l?.(p, T, R, W), U(null), F("");
74
107
  },
75
- [P, u]
76
- ), c = L(() => {
77
- O(null), a("");
78
- }, []), E = L(
79
- (l) => {
80
- s && S?.(l, s.pageSize);
108
+ [R, l]
109
+ ), j = B(() => {
110
+ U(null), F("");
111
+ }, []), he = B(
112
+ (p) => {
113
+ c && _?.(p, c.pageSize);
81
114
  },
82
- [s, S]
83
- ), _ = L(
84
- (l) => {
85
- D?.(l), s && S?.(0, l);
115
+ [c, _]
116
+ ), G = B(
117
+ (p) => {
118
+ o?.(p), c && _?.(0, p);
86
119
  },
87
- [D, S, s]
88
- ), M = te(() => y.length === 0 ? !1 : y.every((l) => {
89
- const x = n.indexOf(l), w = h(l, x);
90
- return v.has(w);
91
- }), [y, v, n, h]), U = te(() => y.length === 0 ? !1 : y.some((x) => {
92
- const w = n.indexOf(x), N = h(x, w);
93
- return v.has(N);
94
- }) && !M, [y, v, M, n, h]), m = "uiforge-grid";
95
- return /* @__PURE__ */ d("div", { className: `${m} ${A}`.trim(), children: [
96
- (k || f.length > 0) && /* @__PURE__ */ d("div", { className: `${m}__toolbar`, children: [
97
- k && /* @__PURE__ */ e("div", { className: `${m}__search`, children: /* @__PURE__ */ e(
120
+ [o, _, c]
121
+ ), re = oe(() => x.length === 0 ? !1 : x.every((p) => {
122
+ const T = e.indexOf(p), W = m(p, T);
123
+ return f.has(W);
124
+ }), [x, f, e, m]), me = oe(() => x.length === 0 ? !1 : x.some((T) => {
125
+ const W = e.indexOf(T), Z = m(T, W);
126
+ return f.has(Z);
127
+ }) && !re, [x, f, re, e, m]), I = "uiforge-grid", q = `${I}--${r}`;
128
+ return /* @__PURE__ */ y("div", { className: `${I} ${q} ${u}`.trim(), "data-theme": r, children: [
129
+ (L || $.length > 0) && /* @__PURE__ */ y("div", { className: `${I}__toolbar`, children: [
130
+ L && /* @__PURE__ */ n("div", { className: `${I}__search`, children: /* @__PURE__ */ n(
98
131
  "input",
99
132
  {
100
133
  type: "text",
101
- className: `${m}__search-input`,
102
- placeholder: Z,
103
- value: $,
104
- onChange: (l) => Q(l.target.value),
134
+ className: `${I}__search-input`,
135
+ placeholder: k,
136
+ value: b,
137
+ onChange: (p) => ee(p.target.value),
105
138
  "aria-label": "Search"
106
139
  }
107
140
  ) }),
108
- f.length > 0 && /* @__PURE__ */ e("div", { className: `${m}__actions`, children: f.map((l, x) => {
109
- const w = l.disabled || l.requiresSelection && v.size === 0;
110
- return /* @__PURE__ */ e(
141
+ $.length > 0 && /* @__PURE__ */ n("div", { className: `${I}__actions`, children: $.map((p, T) => {
142
+ const W = p.disabled || p.requiresSelection && f.size === 0;
143
+ return /* @__PURE__ */ n(
111
144
  "button",
112
145
  {
113
- className: `${m}__action-button ${m}__action-button--${l.variant || "primary"}`,
114
- onClick: () => l.onClick(T()),
115
- disabled: w,
116
- children: l.label
146
+ className: `${I}__action-button ${I}__action-button--${p.variant || "primary"}`,
147
+ onClick: () => p.onClick(se()),
148
+ disabled: W,
149
+ children: p.label
117
150
  },
118
- x
151
+ T
119
152
  );
120
153
  }) })
121
154
  ] }),
122
- /* @__PURE__ */ e("div", { className: `${m}__table-container`, children: /* @__PURE__ */ d("table", { className: `${m}__table`, role: "table", children: [
123
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ d("tr", { children: [
124
- r && /* @__PURE__ */ e("th", { className: `${m}__header-cell ${m}__header-cell--checkbox`, children: /* @__PURE__ */ e(
155
+ /* @__PURE__ */ n("div", { className: `${I}__table-container`, children: /* @__PURE__ */ y("table", { className: `${I}__table`, role: "table", children: [
156
+ /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ y("tr", { children: [
157
+ i && /* @__PURE__ */ n("th", { className: `${I}__header-cell ${I}__header-cell--checkbox`, children: /* @__PURE__ */ n(
125
158
  "input",
126
159
  {
127
160
  type: "checkbox",
128
- checked: M,
129
- ref: (l) => {
130
- l && (l.indeterminate = U);
161
+ checked: re,
162
+ ref: (p) => {
163
+ p && (p.indeterminate = me);
131
164
  },
132
- onChange: (l) => le(l.target.checked),
165
+ onChange: (p) => J(p.target.checked),
133
166
  "aria-label": "Select all rows"
134
167
  }
135
168
  ) }),
136
- t.map((l) => /* @__PURE__ */ e(
169
+ t.map((p) => /* @__PURE__ */ n(
137
170
  "th",
138
171
  {
139
- className: `${m}__header-cell`,
140
- style: { width: l.width },
141
- children: l.header
172
+ className: `${I}__header-cell`,
173
+ style: { width: p.width },
174
+ children: p.header
142
175
  },
143
- l.key
176
+ p.key
144
177
  ))
145
178
  ] }) }),
146
- /* @__PURE__ */ e("tbody", { children: C ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
179
+ /* @__PURE__ */ n("tbody", { children: g ? /* @__PURE__ */ n("tr", { children: /* @__PURE__ */ n(
147
180
  "td",
148
181
  {
149
- colSpan: t.length + (r ? 1 : 0),
150
- className: `${m}__loading-cell`,
182
+ colSpan: t.length + (i ? 1 : 0),
183
+ className: `${I}__loading-cell`,
151
184
  children: "Loading..."
152
185
  }
153
- ) }) : y.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
186
+ ) }) : x.length === 0 ? /* @__PURE__ */ n("tr", { children: /* @__PURE__ */ n(
154
187
  "td",
155
188
  {
156
- colSpan: t.length + (r ? 1 : 0),
157
- className: `${m}__empty-cell`,
158
- children: z
189
+ colSpan: t.length + (i ? 1 : 0),
190
+ className: `${I}__empty-cell`,
191
+ children: S
159
192
  }
160
- ) }) : y.map((l, x) => {
161
- const w = n.indexOf(l), N = h(l, w), ae = v.has(N);
162
- return /* @__PURE__ */ d(
193
+ ) }) : x.map((p, T) => {
194
+ const W = e.indexOf(p), Z = m(p, W), de = f.has(Z);
195
+ return /* @__PURE__ */ y(
163
196
  "tr",
164
197
  {
165
- className: `${m}__row ${ae ? `${m}__row--selected` : ""}`,
198
+ className: `${I}__row ${de ? `${I}__row--selected` : ""}`,
166
199
  children: [
167
- r && /* @__PURE__ */ e("td", { className: `${m}__cell ${m}__cell--checkbox`, children: /* @__PURE__ */ e(
200
+ i && /* @__PURE__ */ n("td", { className: `${I}__cell ${I}__cell--checkbox`, children: /* @__PURE__ */ n(
168
201
  "input",
169
202
  {
170
203
  type: "checkbox",
171
- checked: ae,
172
- onChange: (B) => re(N, l, B.target.checked),
173
- "aria-label": `Select row ${x + 1}`
204
+ checked: de,
205
+ onChange: (K) => ie(Z, p, K.target.checked),
206
+ "aria-label": `Select row ${T + 1}`
174
207
  }
175
208
  ) }),
176
- t.map((B) => {
177
- const he = B.field ? l[B.field] : void 0, ue = I?.rowKey === N && I?.columnKey === B.key;
178
- return /* @__PURE__ */ e("td", { className: `${m}__cell`, children: ue ? /* @__PURE__ */ d("div", { className: `${m}__edit-cell`, children: [
179
- /* @__PURE__ */ e(
209
+ t.map((K) => {
210
+ const fe = K.field ? p[K.field] : void 0, ge = A?.rowKey === Z && A?.columnKey === K.key;
211
+ return /* @__PURE__ */ n("td", { className: `${I}__cell`, children: ge ? /* @__PURE__ */ y("div", { className: `${I}__edit-cell`, children: [
212
+ /* @__PURE__ */ n(
180
213
  "input",
181
214
  {
182
215
  type: "text",
183
- className: `${m}__edit-input`,
184
- value: String(P ?? ""),
185
- onChange: (se) => a(se.target.value),
186
- onKeyDown: (se) => {
187
- se.key === "Enter" ? ce(N, B.key, l) : se.key === "Escape" && c();
216
+ className: `${I}__edit-input`,
217
+ value: String(R ?? ""),
218
+ onChange: (ue) => F(ue.target.value),
219
+ onKeyDown: (ue) => {
220
+ ue.key === "Enter" ? le(Z, K.key, p) : ue.key === "Escape" && j();
188
221
  },
189
222
  autoFocus: !0,
190
- "aria-label": `Edit ${B.header}`
223
+ "aria-label": `Edit ${K.header}`
191
224
  }
192
225
  ),
193
- /* @__PURE__ */ e(
226
+ /* @__PURE__ */ n(
194
227
  "button",
195
228
  {
196
- className: `${m}__edit-button ${m}__edit-button--save`,
197
- onClick: () => ce(N, B.key, l),
229
+ className: `${I}__edit-button ${I}__edit-button--save`,
230
+ onClick: () => le(Z, K.key, p),
198
231
  "aria-label": "Save",
199
232
  children: "✓"
200
233
  }
201
234
  ),
202
- /* @__PURE__ */ e(
235
+ /* @__PURE__ */ n(
203
236
  "button",
204
237
  {
205
- className: `${m}__edit-button ${m}__edit-button--cancel`,
206
- onClick: c,
238
+ className: `${I}__edit-button ${I}__edit-button--cancel`,
239
+ onClick: j,
207
240
  "aria-label": "Cancel",
208
241
  children: "✕"
209
242
  }
210
243
  )
211
- ] }) : /* @__PURE__ */ e(
244
+ ] }) : /* @__PURE__ */ n(
212
245
  "div",
213
246
  {
214
- className: `${m}__cell-content ${B.editable ? `${m}__cell-content--editable` : ""}`,
247
+ className: `${I}__cell-content ${K.editable ? `${I}__cell-content--editable` : ""}`,
215
248
  onClick: () => {
216
- B.editable && oe(N, B.key, he);
249
+ K.editable && ce(Z, K.key, fe);
217
250
  },
218
- onKeyDown: (se) => {
219
- B.editable && (se.key === "Enter" || se.key === " ") && oe(N, B.key, he);
251
+ onKeyDown: (ue) => {
252
+ K.editable && (ue.key === "Enter" || ue.key === " ") && ce(Z, K.key, fe);
220
253
  },
221
- tabIndex: B.editable ? 0 : void 0,
222
- role: B.editable ? "button" : void 0,
223
- "aria-label": B.editable ? `Edit ${B.header}` : void 0,
224
- children: B.render ? B.render(he, l, w) : String(he ?? "")
254
+ tabIndex: K.editable ? 0 : void 0,
255
+ role: K.editable ? "button" : void 0,
256
+ "aria-label": K.editable ? `Edit ${K.header}` : void 0,
257
+ children: K.render ? K.render(fe, p, W) : String(fe ?? "")
225
258
  }
226
- ) }, B.key);
259
+ ) }, K.key);
227
260
  })
228
261
  ]
229
262
  },
230
- N
263
+ Z
231
264
  );
232
265
  }) })
233
266
  ] }) }),
234
- s && K > 1 && /* @__PURE__ */ d("div", { className: `${m}__pagination`, children: [
235
- /* @__PURE__ */ e("div", { className: `${m}__pagination-info`, children: s.serverSide && s.totalItems !== void 0 ? /* @__PURE__ */ d(_e, { children: [
267
+ c && w > 1 && /* @__PURE__ */ y("div", { className: `${I}__pagination`, children: [
268
+ /* @__PURE__ */ n("div", { className: `${I}__pagination-info`, children: c.serverSide && c.totalItems !== void 0 ? /* @__PURE__ */ y(ye, { children: [
236
269
  "Showing ",
237
- s.currentPage * s.pageSize + 1,
270
+ c.currentPage * c.pageSize + 1,
238
271
  " to",
239
272
  " ",
240
273
  Math.min(
241
- (s.currentPage + 1) * s.pageSize,
242
- s.totalItems
274
+ (c.currentPage + 1) * c.pageSize,
275
+ c.totalItems
243
276
  ),
244
277
  " ",
245
278
  "of ",
246
- s.totalItems,
279
+ c.totalItems,
247
280
  " items"
248
- ] }) : /* @__PURE__ */ d(_e, { children: [
281
+ ] }) : /* @__PURE__ */ y(ye, { children: [
249
282
  "Showing ",
250
- s.currentPage * s.pageSize + 1,
283
+ c.currentPage * c.pageSize + 1,
251
284
  " to",
252
285
  " ",
253
- Math.min((s.currentPage + 1) * s.pageSize, g.length),
286
+ Math.min((c.currentPage + 1) * c.pageSize, N.length),
254
287
  " ",
255
288
  "of ",
256
- g.length,
289
+ N.length,
257
290
  " items"
258
291
  ] }) }),
259
- /* @__PURE__ */ d("div", { className: `${m}__pagination-controls`, children: [
260
- /* @__PURE__ */ e(
292
+ /* @__PURE__ */ y("div", { className: `${I}__pagination-controls`, children: [
293
+ /* @__PURE__ */ n(
261
294
  "button",
262
295
  {
263
- className: `${m}__pagination-button`,
264
- onClick: () => E(s.currentPage - 1),
265
- disabled: s.currentPage === 0,
296
+ className: `${I}__pagination-button`,
297
+ onClick: () => he(c.currentPage - 1),
298
+ disabled: c.currentPage === 0,
266
299
  "aria-label": "Previous page",
267
300
  children: "‹"
268
301
  }
269
302
  ),
270
- Array.from({ length: K }, (l, x) => x).map((l) => l === 0 || l === K - 1 || Math.abs(l - s.currentPage) <= 1 ? /* @__PURE__ */ e(
303
+ Array.from({ length: w }, (p, T) => T).map((p) => p === 0 || p === w - 1 || Math.abs(p - c.currentPage) <= 1 ? /* @__PURE__ */ n(
271
304
  "button",
272
305
  {
273
- className: `${m}__pagination-button ${l === s.currentPage ? `${m}__pagination-button--active` : ""}`,
274
- onClick: () => E(l),
275
- "aria-label": `Page ${l + 1}`,
276
- "aria-current": l === s.currentPage ? "page" : void 0,
277
- children: l + 1
306
+ className: `${I}__pagination-button ${p === c.currentPage ? `${I}__pagination-button--active` : ""}`,
307
+ onClick: () => he(p),
308
+ "aria-label": `Page ${p + 1}`,
309
+ "aria-current": p === c.currentPage ? "page" : void 0,
310
+ children: p + 1
278
311
  },
279
- l
280
- ) : l === s.currentPage - 2 || l === s.currentPage + 2 ? /* @__PURE__ */ e("span", { className: `${m}__pagination-ellipsis`, children: "..." }, l) : null),
281
- /* @__PURE__ */ e(
312
+ p
313
+ ) : p === c.currentPage - 2 || p === c.currentPage + 2 ? /* @__PURE__ */ n("span", { className: `${I}__pagination-ellipsis`, children: "..." }, p) : null),
314
+ /* @__PURE__ */ n(
282
315
  "button",
283
316
  {
284
- className: `${m}__pagination-button`,
285
- onClick: () => E(s.currentPage + 1),
286
- disabled: s.currentPage >= K - 1,
317
+ className: `${I}__pagination-button`,
318
+ onClick: () => he(c.currentPage + 1),
319
+ disabled: c.currentPage >= w - 1,
287
320
  "aria-label": "Next page",
288
321
  children: "›"
289
322
  }
290
323
  )
291
324
  ] }),
292
- /* @__PURE__ */ d("div", { className: `${m}__page-size`, children: [
293
- /* @__PURE__ */ e("label", { htmlFor: "page-size-select", children: "Items per page:" }),
294
- /* @__PURE__ */ e(
325
+ /* @__PURE__ */ y("div", { className: `${I}__page-size`, children: [
326
+ /* @__PURE__ */ n("label", { htmlFor: "page-size-select", children: "Items per page:" }),
327
+ /* @__PURE__ */ n(
295
328
  "select",
296
329
  {
297
330
  id: "page-size-select",
298
- className: `${m}__page-size-select`,
299
- value: s.pageSize,
300
- onChange: (l) => _(Number(l.target.value)),
301
- children: q.map((l) => /* @__PURE__ */ e("option", { value: l, children: l }, l))
331
+ className: `${I}__page-size-select`,
332
+ value: c.pageSize,
333
+ onChange: (p) => G(Number(p.target.value)),
334
+ children: d.map((p) => /* @__PURE__ */ n("option", { value: p, children: p }, p))
302
335
  }
303
336
  )
304
337
  ] })
305
338
  ] })
306
339
  ] });
307
- }, Ie = () => `block-${Date.now()}-${Math.random().toString(36).substring(2, 11)}`, me = (t = "paragraph") => ({
308
- id: Ie(),
340
+ }, tt = () => `block-${Date.now()}-${Math.random().toString(36).substring(2, 11)}`, Le = (t = "paragraph") => ({
341
+ id: tt(),
309
342
  type: t,
310
343
  content: "",
311
344
  format: {}
312
- }), St = ({
345
+ }), Gr = ({
313
346
  initialBlocks: t = [],
314
- onChange: n,
347
+ onChange: e,
315
348
  placeholder: r = "Start typing...",
316
349
  readOnly: i = !1,
317
- className: h = "",
318
- maxHeight: p
350
+ theme: a = "light",
351
+ className: m = "",
352
+ maxHeight: s
319
353
  }) => {
320
- const [u, f] = j(
321
- t.length > 0 ? t : [me()]
322
- ), [k, Z] = j(null), [H, F] = j(null), [s, S] = j(!1), D = G(null);
323
- ne(() => {
324
- n && n(u);
325
- }, [u, n]);
326
- const q = L((a, v) => {
327
- f((g) => g.map((y) => y.id === a ? { ...y, ...v } : y));
328
- }, []), A = L((a = "paragraph", v) => {
329
- const g = me(a);
330
- f((y) => {
331
- if (!v)
332
- return [...y, g];
333
- const K = y.findIndex((le) => le.id === v), T = [...y];
334
- return T.splice(K + 1, 0, g), T;
335
- }), Z(g.id);
336
- }, []), C = L((a) => {
337
- f((v) => {
338
- const g = v.filter((y) => y.id !== a);
339
- return g.length > 0 ? g : [me()];
354
+ const [l, $] = te(
355
+ t.length > 0 ? t : [Le()]
356
+ ), [L, k] = te(null), [E, P] = te(null), [c, _] = te(!1), o = ne(null);
357
+ ae(() => {
358
+ e && e(l);
359
+ }, [l, e]);
360
+ const d = B((f, N) => {
361
+ $((x) => x.map((w) => w.id === f ? { ...w, ...N } : w));
362
+ }, []), u = B((f = "paragraph", N) => {
363
+ const x = Le(f);
364
+ $((w) => {
365
+ if (!N)
366
+ return [...w, x];
367
+ const se = w.findIndex((ie) => ie.id === N), J = [...w];
368
+ return J.splice(se + 1, 0, x), J;
369
+ }), k(x.id);
370
+ }, []), g = B((f) => {
371
+ $((N) => {
372
+ const x = N.filter((w) => w.id !== f);
373
+ return x.length > 0 ? x : [Le()];
340
374
  });
341
- }, []), z = L((a, v) => {
342
- f((g) => {
343
- const y = g.findIndex((re) => re.id === a), K = g.findIndex((re) => re.id === v);
344
- if (y === -1 || K === -1) return g;
345
- const T = [...g], [le] = T.splice(y, 1);
346
- return T.splice(K, 0, le), T;
375
+ }, []), S = B((f, N) => {
376
+ $((x) => {
377
+ const w = x.findIndex((ee) => ee.id === f), se = x.findIndex((ee) => ee.id === N);
378
+ if (w === -1 || se === -1) return x;
379
+ const J = [...x], [ie] = J.splice(w, 1);
380
+ return J.splice(se, 0, ie), J;
347
381
  });
348
- }, []), ie = L(
349
- (a, v) => {
350
- i || (F(v), a.dataTransfer.effectAllowed = "move");
382
+ }, []), O = B(
383
+ (f, N) => {
384
+ i || (P(N), f.dataTransfer.effectAllowed = "move");
351
385
  },
352
386
  [i]
353
- ), X = L((a) => {
354
- a.preventDefault(), a.dataTransfer.dropEffect = "move";
355
- }, []), $ = L(
356
- (a, v) => {
357
- a.preventDefault(), H && H !== v && z(H, v), F(null);
387
+ ), C = B((f) => {
388
+ f.preventDefault(), f.dataTransfer.dropEffect = "move";
389
+ }, []), b = B(
390
+ (f, N) => {
391
+ f.preventDefault(), E && E !== N && S(E, N), P(null);
358
392
  },
359
- [H, z]
360
- ), J = L(() => {
361
- F(null);
362
- }, []), I = L(
363
- (a) => {
364
- k && f(
365
- (v) => v.map((g) => {
366
- if (g.id === k) {
367
- const y = g.format || {};
393
+ [E, S]
394
+ ), M = B(() => {
395
+ P(null);
396
+ }, []), A = B(
397
+ (f) => {
398
+ L && $(
399
+ (N) => N.map((x) => {
400
+ if (x.id === L) {
401
+ const w = x.format || {};
368
402
  return {
369
- ...g,
403
+ ...x,
370
404
  format: {
371
- ...y,
372
- [a]: !y[a]
405
+ ...w,
406
+ [f]: !w[f]
373
407
  }
374
408
  };
375
409
  }
376
- return g;
410
+ return x;
377
411
  })
378
412
  );
379
413
  },
380
- [k]
381
- ), O = L(
382
- (a, v) => {
383
- q(a, { type: v });
414
+ [L]
415
+ ), U = B(
416
+ (f, N) => {
417
+ d(f, { type: N });
384
418
  },
385
- [q]
386
- ), P = L(
387
- (a, v) => {
419
+ [d]
420
+ ), R = B(
421
+ (f, N) => {
388
422
  if (!i) {
389
- if ((a.metaKey || a.ctrlKey) && a.key === "b")
390
- a.preventDefault(), I("bold");
391
- else if ((a.metaKey || a.ctrlKey) && a.key === "i")
392
- a.preventDefault(), I("italic");
393
- else if ((a.metaKey || a.ctrlKey) && a.key === "u")
394
- a.preventDefault(), I("underline");
395
- else if (a.key === "Enter" && !a.shiftKey) {
396
- const g = u.find((y) => y.id === v);
397
- g && g.type !== "code" && (a.preventDefault(), A("paragraph", v));
398
- } else if (a.key === "Backspace") {
399
- const g = u.find((y) => y.id === v);
400
- g && !g.content && u.length > 1 && (a.preventDefault(), C(v));
423
+ if ((f.metaKey || f.ctrlKey) && f.key === "b")
424
+ f.preventDefault(), A("bold");
425
+ else if ((f.metaKey || f.ctrlKey) && f.key === "i")
426
+ f.preventDefault(), A("italic");
427
+ else if ((f.metaKey || f.ctrlKey) && f.key === "u")
428
+ f.preventDefault(), A("underline");
429
+ else if (f.key === "Enter" && !f.shiftKey) {
430
+ const x = l.find((w) => w.id === N);
431
+ x && x.type !== "code" && (f.preventDefault(), u("paragraph", N));
432
+ } else if (f.key === "Backspace") {
433
+ const x = l.find((w) => w.id === N);
434
+ x && !x.content && l.length > 1 && (f.preventDefault(), g(N));
401
435
  }
402
436
  }
403
437
  },
404
- [i, u, I, A, C]
405
- );
406
- return /* @__PURE__ */ d("div", { className: `uiforge-blocks-editor ${h}`, ref: D, style: { maxHeight: p }, children: [
407
- !i && s && k && /* @__PURE__ */ e(
408
- Be,
438
+ [i, l, A, u, g]
439
+ ), F = `uiforge-blocks-editor--${a}`;
440
+ return /* @__PURE__ */ y("div", { className: `uiforge-blocks-editor ${F} ${m}`, ref: o, style: { maxHeight: s }, "data-theme": a, children: [
441
+ !i && c && L && /* @__PURE__ */ n(
442
+ rt,
409
443
  {
410
- selectedBlock: u.find((a) => a.id === k),
411
- onFormatToggle: I,
412
- onBlockTypeChange: (a) => O(k, a)
444
+ selectedBlock: l.find((f) => f.id === L),
445
+ onFormatToggle: A,
446
+ onBlockTypeChange: (f) => U(L, f)
413
447
  }
414
448
  ),
415
- /* @__PURE__ */ e("div", { className: "uiforge-blocks-editor__content", children: u.map((a, v) => /* @__PURE__ */ e(
416
- Se,
449
+ /* @__PURE__ */ n("div", { className: "uiforge-blocks-editor__content", children: l.map((f, N) => /* @__PURE__ */ n(
450
+ nt,
417
451
  {
418
- block: a,
419
- isSelected: k === a.id,
420
- isDragging: H === a.id,
452
+ block: f,
453
+ isSelected: L === f.id,
454
+ isDragging: E === f.id,
421
455
  readOnly: i,
422
- placeholder: v === 0 && u.length === 1 ? r : void 0,
456
+ placeholder: N === 0 && l.length === 1 ? r : void 0,
423
457
  onSelect: () => {
424
- Z(a.id), S(!0);
458
+ k(f.id), _(!0);
425
459
  },
426
- onChange: (g) => q(a.id, g),
427
- onDelete: () => C(a.id),
428
- onDragStart: (g) => ie(g, a.id),
429
- onDragOver: X,
430
- onDrop: (g) => $(g, a.id),
431
- onDragEnd: J,
432
- onKeyDown: (g) => P(g, a.id)
460
+ onChange: (x) => d(f.id, x),
461
+ onDelete: () => g(f.id),
462
+ onDragStart: (x) => O(x, f.id),
463
+ onDragOver: C,
464
+ onDrop: (x) => b(x, f.id),
465
+ onDragEnd: M,
466
+ onKeyDown: (x) => R(x, f.id)
433
467
  },
434
- a.id
468
+ f.id
435
469
  )) }),
436
- !i && /* @__PURE__ */ e(De, { onAddBlock: A })
470
+ !i && /* @__PURE__ */ n(it, { onAddBlock: u })
437
471
  ] });
438
- }, Be = ({ selectedBlock: t, onFormatToggle: n, onBlockTypeChange: r }) => {
472
+ }, rt = ({ selectedBlock: t, onFormatToggle: e, onBlockTypeChange: r }) => {
439
473
  if (!t) return null;
440
474
  const i = t.format || {};
441
- return /* @__PURE__ */ d("div", { className: "uiforge-blocks-editor__toolbar", role: "toolbar", "aria-label": "Text formatting", children: [
442
- /* @__PURE__ */ e("div", { className: "uiforge-blocks-editor__toolbar-group", children: /* @__PURE__ */ d(
475
+ return /* @__PURE__ */ y("div", { className: "uiforge-blocks-editor__toolbar", role: "toolbar", "aria-label": "Text formatting", children: [
476
+ /* @__PURE__ */ n("div", { className: "uiforge-blocks-editor__toolbar-group", children: /* @__PURE__ */ y(
443
477
  "select",
444
478
  {
445
479
  value: t.type,
446
- onChange: (h) => r(h.target.value),
480
+ onChange: (a) => r(a.target.value),
447
481
  className: "uiforge-blocks-editor__toolbar-select",
448
482
  "aria-label": "Block type",
449
483
  children: [
450
- /* @__PURE__ */ e("option", { value: "paragraph", children: "Paragraph" }),
451
- /* @__PURE__ */ e("option", { value: "heading1", children: "Heading 1" }),
452
- /* @__PURE__ */ e("option", { value: "heading2", children: "Heading 2" }),
453
- /* @__PURE__ */ e("option", { value: "heading3", children: "Heading 3" }),
454
- /* @__PURE__ */ e("option", { value: "list", children: "List" }),
455
- /* @__PURE__ */ e("option", { value: "quote", children: "Quote" }),
456
- /* @__PURE__ */ e("option", { value: "code", children: "Code" }),
457
- /* @__PURE__ */ e("option", { value: "image", children: "Image" })
484
+ /* @__PURE__ */ n("option", { value: "paragraph", children: "Paragraph" }),
485
+ /* @__PURE__ */ n("option", { value: "heading1", children: "Heading 1" }),
486
+ /* @__PURE__ */ n("option", { value: "heading2", children: "Heading 2" }),
487
+ /* @__PURE__ */ n("option", { value: "heading3", children: "Heading 3" }),
488
+ /* @__PURE__ */ n("option", { value: "list", children: "List" }),
489
+ /* @__PURE__ */ n("option", { value: "quote", children: "Quote" }),
490
+ /* @__PURE__ */ n("option", { value: "code", children: "Code" }),
491
+ /* @__PURE__ */ n("option", { value: "image", children: "Image" })
458
492
  ]
459
493
  }
460
494
  ) }),
461
- /* @__PURE__ */ e("div", { className: "uiforge-blocks-editor__toolbar-divider" }),
462
- /* @__PURE__ */ d("div", { className: "uiforge-blocks-editor__toolbar-group", children: [
463
- /* @__PURE__ */ e(
495
+ /* @__PURE__ */ n("div", { className: "uiforge-blocks-editor__toolbar-divider" }),
496
+ /* @__PURE__ */ y("div", { className: "uiforge-blocks-editor__toolbar-group", children: [
497
+ /* @__PURE__ */ n(
464
498
  "button",
465
499
  {
466
500
  type: "button",
467
501
  className: `uiforge-blocks-editor__toolbar-button ${i.bold ? "active" : ""}`,
468
- onClick: () => n("bold"),
502
+ onClick: () => e("bold"),
469
503
  title: "Bold (Ctrl+B)",
470
504
  "aria-label": "Bold",
471
505
  "aria-pressed": i.bold,
472
- children: /* @__PURE__ */ e("strong", { children: "B" })
506
+ children: /* @__PURE__ */ n("strong", { children: "B" })
473
507
  }
474
508
  ),
475
- /* @__PURE__ */ e(
509
+ /* @__PURE__ */ n(
476
510
  "button",
477
511
  {
478
512
  type: "button",
479
513
  className: `uiforge-blocks-editor__toolbar-button ${i.italic ? "active" : ""}`,
480
- onClick: () => n("italic"),
514
+ onClick: () => e("italic"),
481
515
  title: "Italic (Ctrl+I)",
482
516
  "aria-label": "Italic",
483
517
  "aria-pressed": i.italic,
484
- children: /* @__PURE__ */ e("em", { children: "I" })
518
+ children: /* @__PURE__ */ n("em", { children: "I" })
485
519
  }
486
520
  ),
487
- /* @__PURE__ */ e(
521
+ /* @__PURE__ */ n(
488
522
  "button",
489
523
  {
490
524
  type: "button",
491
525
  className: `uiforge-blocks-editor__toolbar-button ${i.underline ? "active" : ""}`,
492
- onClick: () => n("underline"),
526
+ onClick: () => e("underline"),
493
527
  title: "Underline (Ctrl+U)",
494
528
  "aria-label": "Underline",
495
529
  "aria-pressed": i.underline,
496
- children: /* @__PURE__ */ e("u", { children: "U" })
530
+ children: /* @__PURE__ */ n("u", { children: "U" })
497
531
  }
498
532
  ),
499
- /* @__PURE__ */ e(
533
+ /* @__PURE__ */ n(
500
534
  "button",
501
535
  {
502
536
  type: "button",
503
537
  className: `uiforge-blocks-editor__toolbar-button ${i.code ? "active" : ""}`,
504
- onClick: () => n("code"),
538
+ onClick: () => e("code"),
505
539
  title: "Inline Code",
506
540
  "aria-label": "Code",
507
541
  "aria-pressed": i.code,
@@ -510,120 +544,120 @@ const It = ({
510
544
  )
511
545
  ] })
512
546
  ] });
513
- }, Se = ({
547
+ }, nt = ({
514
548
  block: t,
515
- isSelected: n,
549
+ isSelected: e,
516
550
  isDragging: r,
517
551
  readOnly: i,
518
- placeholder: h,
519
- onSelect: p,
520
- onChange: u,
521
- onDelete: f,
522
- onDragStart: k,
523
- onDragOver: Z,
524
- onDrop: H,
525
- onDragEnd: F,
526
- onKeyDown: s
552
+ placeholder: a,
553
+ onSelect: m,
554
+ onChange: s,
555
+ onDelete: l,
556
+ onDragStart: $,
557
+ onDragOver: L,
558
+ onDrop: k,
559
+ onDragEnd: E,
560
+ onKeyDown: P
527
561
  }) => {
528
- const S = [
562
+ const c = [
529
563
  "uiforge-blocks-editor__block",
530
564
  `uiforge-blocks-editor__block--${t.type}`,
531
- n ? "uiforge-blocks-editor__block--selected" : "",
565
+ e ? "uiforge-blocks-editor__block--selected" : "",
532
566
  r ? "uiforge-blocks-editor__block--dragging" : ""
533
- ].filter(Boolean).join(" "), D = [
567
+ ].filter(Boolean).join(" "), _ = [
534
568
  "uiforge-blocks-editor__block-text",
535
569
  t.format?.bold ? "uiforge-blocks-editor__block-text--bold" : "",
536
570
  t.format?.italic ? "uiforge-blocks-editor__block-text--italic" : "",
537
571
  t.format?.underline ? "uiforge-blocks-editor__block-text--underline" : "",
538
572
  t.format?.code ? "uiforge-blocks-editor__block-text--code" : ""
539
- ].filter(Boolean).join(" "), q = (C) => {
540
- u({ content: C.target.value });
541
- }, A = () => {
542
- const C = {
573
+ ].filter(Boolean).join(" "), o = (u) => {
574
+ s({ content: u.target.value });
575
+ }, d = () => {
576
+ const u = {
543
577
  value: t.content,
544
- onChange: q,
545
- onFocus: p,
546
- onKeyDown: s,
547
- placeholder: h,
578
+ onChange: o,
579
+ onFocus: m,
580
+ onKeyDown: P,
581
+ placeholder: a,
548
582
  readOnly: i,
549
- className: D
583
+ className: _
550
584
  };
551
585
  switch (t.type) {
552
586
  case "heading1":
553
- return /* @__PURE__ */ e(
587
+ return /* @__PURE__ */ n(
554
588
  "input",
555
589
  {
556
- ...C,
590
+ ...u,
557
591
  type: "text",
558
- className: `${D} uiforge-blocks-editor__heading1`,
559
- placeholder: h || "Heading 1"
592
+ className: `${_} uiforge-blocks-editor__heading1`,
593
+ placeholder: a || "Heading 1"
560
594
  }
561
595
  );
562
596
  case "heading2":
563
- return /* @__PURE__ */ e(
597
+ return /* @__PURE__ */ n(
564
598
  "input",
565
599
  {
566
- ...C,
600
+ ...u,
567
601
  type: "text",
568
- className: `${D} uiforge-blocks-editor__heading2`,
569
- placeholder: h || "Heading 2"
602
+ className: `${_} uiforge-blocks-editor__heading2`,
603
+ placeholder: a || "Heading 2"
570
604
  }
571
605
  );
572
606
  case "heading3":
573
- return /* @__PURE__ */ e(
607
+ return /* @__PURE__ */ n(
574
608
  "input",
575
609
  {
576
- ...C,
610
+ ...u,
577
611
  type: "text",
578
- className: `${D} uiforge-blocks-editor__heading3`,
579
- placeholder: h || "Heading 3"
612
+ className: `${_} uiforge-blocks-editor__heading3`,
613
+ placeholder: a || "Heading 3"
580
614
  }
581
615
  );
582
616
  case "code":
583
- return /* @__PURE__ */ e(
617
+ return /* @__PURE__ */ n(
584
618
  "textarea",
585
619
  {
586
- ...C,
587
- className: `${D} uiforge-blocks-editor__code`,
588
- placeholder: h || "Code block",
620
+ ...u,
621
+ className: `${_} uiforge-blocks-editor__code`,
622
+ placeholder: a || "Code block",
589
623
  rows: 4
590
624
  }
591
625
  );
592
626
  case "quote":
593
- return /* @__PURE__ */ e(
627
+ return /* @__PURE__ */ n(
594
628
  "textarea",
595
629
  {
596
- ...C,
597
- className: `${D} uiforge-blocks-editor__quote`,
598
- placeholder: h || "Quote",
630
+ ...u,
631
+ className: `${_} uiforge-blocks-editor__quote`,
632
+ placeholder: a || "Quote",
599
633
  rows: 2
600
634
  }
601
635
  );
602
636
  case "image":
603
- return /* @__PURE__ */ d("div", { className: "uiforge-blocks-editor__image-block", children: [
604
- /* @__PURE__ */ e(
637
+ return /* @__PURE__ */ y("div", { className: "uiforge-blocks-editor__image-block", children: [
638
+ /* @__PURE__ */ n(
605
639
  "input",
606
640
  {
607
641
  type: "text",
608
642
  value: t.imageUrl || "",
609
- onChange: (z) => u({ imageUrl: z.target.value }),
643
+ onChange: (g) => s({ imageUrl: g.target.value }),
610
644
  placeholder: "Image URL",
611
645
  className: "uiforge-blocks-editor__image-url",
612
646
  readOnly: i
613
647
  }
614
648
  ),
615
- /* @__PURE__ */ e(
649
+ /* @__PURE__ */ n(
616
650
  "input",
617
651
  {
618
652
  type: "text",
619
653
  value: t.imageAlt || "",
620
- onChange: (z) => u({ imageAlt: z.target.value }),
654
+ onChange: (g) => s({ imageAlt: g.target.value }),
621
655
  placeholder: "Alt text",
622
656
  className: "uiforge-blocks-editor__image-alt",
623
657
  readOnly: i
624
658
  }
625
659
  ),
626
- t.imageUrl && /* @__PURE__ */ e(
660
+ t.imageUrl && /* @__PURE__ */ n(
627
661
  "img",
628
662
  {
629
663
  src: t.imageUrl,
@@ -633,31 +667,31 @@ const It = ({
633
667
  )
634
668
  ] });
635
669
  default:
636
- return /* @__PURE__ */ e(
670
+ return /* @__PURE__ */ n(
637
671
  "textarea",
638
672
  {
639
- ...C,
640
- className: `${D} uiforge-blocks-editor__paragraph`,
641
- placeholder: h || "Start typing...",
673
+ ...u,
674
+ className: `${_} uiforge-blocks-editor__paragraph`,
675
+ placeholder: a || "Start typing...",
642
676
  rows: 1,
643
677
  style: { minHeight: "1.5em" }
644
678
  }
645
679
  );
646
680
  }
647
681
  };
648
- return /* @__PURE__ */ d(
682
+ return /* @__PURE__ */ y(
649
683
  "div",
650
684
  {
651
- className: S,
685
+ className: c,
652
686
  draggable: !i,
653
- onDragStart: k,
654
- onDragOver: Z,
655
- onDrop: H,
656
- onDragEnd: F,
687
+ onDragStart: $,
688
+ onDragOver: L,
689
+ onDrop: k,
690
+ onDragEnd: E,
657
691
  "data-block-id": t.id,
658
692
  children: [
659
- !i && /* @__PURE__ */ d("div", { className: "uiforge-blocks-editor__block-controls", children: [
660
- /* @__PURE__ */ e(
693
+ !i && /* @__PURE__ */ y("div", { className: "uiforge-blocks-editor__block-controls", children: [
694
+ /* @__PURE__ */ n(
661
695
  "button",
662
696
  {
663
697
  type: "button",
@@ -667,37 +701,37 @@ const It = ({
667
701
  children: "⋮⋮"
668
702
  }
669
703
  ),
670
- /* @__PURE__ */ e(
704
+ /* @__PURE__ */ n(
671
705
  "button",
672
706
  {
673
707
  type: "button",
674
708
  className: "uiforge-blocks-editor__delete-button",
675
- onClick: f,
709
+ onClick: l,
676
710
  title: "Delete block",
677
711
  "aria-label": "Delete block",
678
712
  children: "×"
679
713
  }
680
714
  )
681
715
  ] }),
682
- /* @__PURE__ */ e("div", { className: "uiforge-blocks-editor__block-content", children: A() })
716
+ /* @__PURE__ */ n("div", { className: "uiforge-blocks-editor__block-content", children: d() })
683
717
  ]
684
718
  }
685
719
  );
686
- }, De = ({ onAddBlock: t }) => {
687
- const [n, r] = j(!1);
688
- return /* @__PURE__ */ d("div", { className: "uiforge-blocks-editor__block-menu", children: [
689
- /* @__PURE__ */ e(
720
+ }, it = ({ onAddBlock: t }) => {
721
+ const [e, r] = te(!1);
722
+ return /* @__PURE__ */ y("div", { className: "uiforge-blocks-editor__block-menu", children: [
723
+ /* @__PURE__ */ n(
690
724
  "button",
691
725
  {
692
726
  type: "button",
693
727
  className: "uiforge-blocks-editor__add-button",
694
- onClick: () => r(!n),
728
+ onClick: () => r(!e),
695
729
  "aria-label": "Add block",
696
- "aria-expanded": n,
730
+ "aria-expanded": e,
697
731
  children: "+ Add Block"
698
732
  }
699
733
  ),
700
- n && /* @__PURE__ */ e("div", { className: "uiforge-blocks-editor__block-menu-dropdown", children: [
734
+ e && /* @__PURE__ */ n("div", { className: "uiforge-blocks-editor__block-menu-dropdown", children: [
701
735
  { type: "paragraph", label: "Paragraph", icon: "¶" },
702
736
  { type: "heading1", label: "Heading 1", icon: "H1" },
703
737
  { type: "heading2", label: "Heading 2", icon: "H2" },
@@ -706,37 +740,37 @@ const It = ({
706
740
  { type: "quote", label: "Quote", icon: '"' },
707
741
  { type: "code", label: "Code", icon: "</>" },
708
742
  { type: "image", label: "Image", icon: "🖼" }
709
- ].map(({ type: h, label: p, icon: u }) => /* @__PURE__ */ d(
743
+ ].map(({ type: a, label: m, icon: s }) => /* @__PURE__ */ y(
710
744
  "button",
711
745
  {
712
746
  type: "button",
713
747
  className: "uiforge-blocks-editor__block-menu-item",
714
748
  onClick: () => {
715
- t(h), r(!1);
749
+ t(a), r(!1);
716
750
  },
717
751
  children: [
718
- /* @__PURE__ */ e("span", { className: "uiforge-blocks-editor__block-menu-icon", children: u }),
719
- /* @__PURE__ */ e("span", { children: p })
752
+ /* @__PURE__ */ n("span", { className: "uiforge-blocks-editor__block-menu-icon", children: s }),
753
+ /* @__PURE__ */ n("span", { children: m })
720
754
  ]
721
755
  },
722
- h
756
+ a
723
757
  )) })
724
758
  ] });
725
759
  };
726
- function pe(t) {
760
+ function Me(t) {
727
761
  return t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
728
762
  }
729
- function Ve(t) {
730
- const n = t.trim(), r = ["javascript:", "data:", "vbscript:", "file:"], i = n.toLowerCase();
731
- for (const h of r)
732
- if (i.startsWith(h))
763
+ function at(t) {
764
+ const e = t.trim(), r = ["javascript:", "data:", "vbscript:", "file:"], i = e.toLowerCase();
765
+ for (const a of r)
766
+ if (i.startsWith(a))
733
767
  return "";
734
- return n;
768
+ return e;
735
769
  }
736
- function Dt(t) {
737
- return t.map((n) => {
738
- let r = pe(n.content);
739
- switch (n.format?.bold && (r = `<strong>${r}</strong>`), n.format?.italic && (r = `<em>${r}</em>`), n.format?.underline && (r = `<u>${r}</u>`), n.format?.code && (r = `<code>${r}</code>`), n.type) {
770
+ function Yr(t) {
771
+ return t.map((e) => {
772
+ let r = Me(e.content);
773
+ switch (e.format?.bold && (r = `<strong>${r}</strong>`), e.format?.italic && (r = `<em>${r}</em>`), e.format?.underline && (r = `<u>${r}</u>`), e.format?.code && (r = `<code>${r}</code>`), e.type) {
740
774
  case "heading1":
741
775
  return `<h1>${r}</h1>`;
742
776
  case "heading2":
@@ -746,10 +780,10 @@ function Dt(t) {
746
780
  case "quote":
747
781
  return `<blockquote>${r}</blockquote>`;
748
782
  case "code":
749
- return `<pre><code>${pe(n.content)}</code></pre>`;
783
+ return `<pre><code>${Me(e.content)}</code></pre>`;
750
784
  case "image": {
751
- const i = Ve(n.imageUrl || ""), h = pe(n.imageAlt || "");
752
- return i ? `<img src="${i}" alt="${h}" />` : "";
785
+ const i = at(e.imageUrl || ""), a = Me(e.imageAlt || "");
786
+ return i ? `<img src="${i}" alt="${a}" />` : "";
753
787
  }
754
788
  case "list":
755
789
  return `<ul><li>${r}</li></ul>`;
@@ -759,10 +793,10 @@ function Dt(t) {
759
793
  }).join(`
760
794
  `);
761
795
  }
762
- function Vt(t) {
763
- return t.map((n) => {
764
- let r = n.content;
765
- switch (n.format?.bold && (r = `**${r}**`), n.format?.italic && (r = `*${r}*`), n.format?.code && (r = `\`${r}\``), n.type) {
796
+ function Jr(t) {
797
+ return t.map((e) => {
798
+ let r = e.content;
799
+ switch (e.format?.bold && (r = `**${r}**`), e.format?.italic && (r = `*${r}*`), e.format?.code && (r = `\`${r}\``), e.type) {
766
800
  case "heading1":
767
801
  return `# ${r}`;
768
802
  case "heading2":
@@ -773,10 +807,10 @@ function Vt(t) {
773
807
  return `> ${r}`;
774
808
  case "code":
775
809
  return `\`\`\`
776
- ${n.content}
810
+ ${e.content}
777
811
  \`\`\``;
778
812
  case "image":
779
- return `![${n.imageAlt || ""}](${n.imageUrl || ""})`;
813
+ return `![${e.imageAlt || ""}](${e.imageUrl || ""})`;
780
814
  case "list":
781
815
  return `- ${r}`;
782
816
  default:
@@ -786,244 +820,247 @@ ${n.content}
786
820
 
787
821
  `);
788
822
  }
789
- function Ht(t) {
823
+ function Qr(t) {
790
824
  return JSON.stringify(t, null, 2);
791
825
  }
792
- const At = ({
826
+ const Xr = ({
793
827
  options: t = [],
794
- value: n,
828
+ value: e,
795
829
  onChange: r,
796
830
  onSearch: i,
797
- placeholder: h = "Select an option...",
798
- disabled: p = !1,
799
- clearable: u = !1,
800
- className: f = "",
801
- renderOption: k,
802
- renderValue: Z,
803
- loading: H = !1,
804
- maxHeight: F = "300px",
805
- debounceMs: s = 300,
806
- searchable: S = !0,
807
- noOptionsMessage: D = "No options found",
808
- ariaLabel: q,
809
- enableCache: A = !1,
810
- cacheTTL: C,
811
- refreshOnOpen: z = !1,
812
- onClearCache: ie,
813
- onForceRefresh: X
831
+ theme: a = "light",
832
+ placeholder: m = "Select an option...",
833
+ disabled: s = !1,
834
+ clearable: l = !1,
835
+ className: $ = "",
836
+ renderOption: L,
837
+ renderValue: k,
838
+ loading: E = !1,
839
+ maxHeight: P = "300px",
840
+ debounceMs: c = 300,
841
+ searchable: _ = !0,
842
+ noOptionsMessage: o = "No options found",
843
+ ariaLabel: d,
844
+ enableCache: u = !1,
845
+ cacheTTL: g,
846
+ refreshOnOpen: S = !1,
847
+ onClearCache: O,
848
+ onForceRefresh: C
814
849
  }) => {
815
- const [$, J] = j(!1), [I, O] = j(""), [P, a] = j([]), [v, g] = j(0), [y, K] = j(!1), T = G(null), le = G(null), re = G(null), Q = G(null), oe = G(null), ce = G(i), c = G(null), E = G(!1), _ = G(/* @__PURE__ */ new Map()), M = G(A), U = G(C), m = L((o, b = 0) => o.reduce((Y, V) => {
816
- const R = { ...V, level: b };
817
- return Y.push(R), V.children && V.children.length > 0 && Y.push(...m(V.children, b + 1)), Y;
818
- }, []), []), l = (o) => typeof o == "string" && (o.startsWith("http://") || o.startsWith("https://") || o.startsWith("data:") || o.startsWith("/")), x = te(() => m(P.length > 0 ? P : t).find((b) => b.value === n) || null, [n, t, P, m]), w = L((o, b) => {
819
- if (!b.trim()) return o;
820
- const Y = b.toLowerCase(), V = (R) => R.reduce((ee, de) => {
821
- const ge = de.label.toLowerCase().includes(Y), fe = de.children ? V(de.children) : [];
822
- return (ge || fe.length > 0) && ee.push({
823
- ...de,
824
- children: fe.length > 0 ? fe : de.children
825
- }), ee;
850
+ const [b, M] = te(!1), [A, U] = te(""), [R, F] = te([]), [f, N] = te(0), [x, w] = te(!1), se = ne(null), J = ne(null), ie = ne(null), ee = ne(null), ce = ne(null), le = ne(i), j = ne(null), he = ne(!1), G = ne(/* @__PURE__ */ new Map()), re = ne(u), me = ne(g), I = B((h, z = 0) => h.reduce((X, Y) => {
851
+ const H = { ...Y, level: z };
852
+ return X.push(H), Y.children && Y.children.length > 0 && X.push(...I(Y.children, z + 1)), X;
853
+ }, []), []), q = (h) => typeof h == "string" && (h.startsWith("http://") || h.startsWith("https://") || h.startsWith("data:") || h.startsWith("/")), p = oe(() => I(R.length > 0 ? R : t).find((z) => z.value === e) || null, [e, t, R, I]), T = B((h, z) => {
854
+ if (!z.trim()) return h;
855
+ const X = z.toLowerCase(), Y = (H) => H.reduce((pe, ve) => {
856
+ const xe = ve.label.toLowerCase().includes(X), we = ve.children ? Y(ve.children) : [];
857
+ return (xe || we.length > 0) && pe.push({
858
+ ...ve,
859
+ children: we.length > 0 ? we : ve.children
860
+ }), pe;
826
861
  }, []);
827
- return V(o);
862
+ return Y(h);
828
863
  }, []);
829
- ne(() => {
830
- ce.current = i, oe.current = null;
831
- }, [i]), ne(() => {
832
- M.current = A;
833
- }, [A]), ne(() => {
834
- U.current = C;
835
- }, [C]), ne(() => {
836
- ie && ie(() => {
837
- _.current.clear();
838
- }), X && X(() => {
839
- if (!ce.current) return;
840
- c.current && c.current.abort(), c.current = new AbortController();
841
- const o = c.current.signal;
842
- K(!0), (async () => {
864
+ ae(() => {
865
+ le.current = i, ce.current = null;
866
+ }, [i]), ae(() => {
867
+ re.current = u;
868
+ }, [u]), ae(() => {
869
+ me.current = g;
870
+ }, [g]), ae(() => {
871
+ O && O(() => {
872
+ G.current.clear();
873
+ }), C && C(() => {
874
+ if (!le.current) return;
875
+ j.current && j.current.abort(), j.current = new AbortController();
876
+ const h = j.current.signal;
877
+ w(!0), (async () => {
843
878
  try {
844
- const b = Date.now(), Y = I, V = _.current.get(Y), R = V && (!U.current || b - V.timestamp < U.current);
845
- let ee;
846
- M.current && R ? ee = V.data : (ee = await (ce.current ? ce.current(I, o) : i?.(I, o) ?? []), !o.aborted && M.current && _.current.set(Y, { data: ee, timestamp: b })), o.aborted || (a(ee), oe.current = I);
847
- } catch (b) {
848
- console.error(b), a([]);
879
+ const z = Date.now(), X = A, Y = G.current.get(X), H = Y && (!me.current || z - Y.timestamp < me.current);
880
+ let pe;
881
+ re.current && H ? pe = Y.data : (pe = await (le.current ? le.current(A, h) : i?.(A, h) ?? []), !h.aborted && re.current && G.current.set(X, { data: pe, timestamp: z })), h.aborted || (F(pe), ce.current = A);
882
+ } catch (z) {
883
+ console.error(z), F([]);
849
884
  } finally {
850
- K(!1);
885
+ w(!1);
851
886
  }
852
887
  })();
853
888
  });
854
- }, [ie, X, I]), ne(() => {
855
- if (i && $) {
856
- const o = oe.current === I, b = !E.current && $;
857
- return o && !(z && b) ? void 0 : (Q.current && clearTimeout(Q.current), Q.current = setTimeout(async () => {
858
- c.current && c.current.abort(), c.current = new AbortController();
859
- const V = c.current.signal;
860
- K(!0);
889
+ }, [O, C, A, i]), ae(() => {
890
+ if (i && b) {
891
+ const h = ce.current === A, z = !he.current && b;
892
+ return h && !(S && z) ? void 0 : (ee.current && clearTimeout(ee.current), ee.current = setTimeout(async () => {
893
+ j.current && j.current.abort(), j.current = new AbortController();
894
+ const Y = j.current.signal;
895
+ w(!0);
861
896
  try {
862
- let R;
863
- const ee = I, de = _.current.get(ee), ge = Date.now(), fe = de && (!U.current || ge - de.timestamp < U.current);
864
- if (M.current && fe ? R = de.data : (R = await (ce.current ? ce.current(I, V) : i(I, V)), !V.aborted && M.current && _.current.set(ee, { data: R, timestamp: ge })), V.aborted) return;
865
- a(R), oe.current = I;
866
- } catch (R) {
867
- console.error("Error fetching options:", R), a([]);
897
+ let H;
898
+ const pe = A, ve = G.current.get(pe), xe = Date.now(), we = ve && (!me.current || xe - ve.timestamp < me.current);
899
+ if (re.current && we ? H = ve.data : (H = await (le.current ? le.current(A, Y) : i(A, Y)), !Y.aborted && re.current && G.current.set(pe, { data: H, timestamp: xe })), Y.aborted) return;
900
+ F(H), ce.current = A;
901
+ } catch (H) {
902
+ console.error("Error fetching options:", H), F([]);
868
903
  } finally {
869
- K(!1);
904
+ w(!1);
870
905
  }
871
- }, s), () => {
872
- Q.current && clearTimeout(Q.current), c.current && (c.current.abort(), c.current = null);
906
+ }, c), () => {
907
+ ee.current && clearTimeout(ee.current), j.current && (j.current.abort(), j.current = null);
873
908
  });
874
- } else i || a(w(t, I));
875
- E.current = $;
876
- }, [I, $, t, s, w, z]), ne(() => {
877
- i || a(t);
878
- }, [t, i]), ne(() => {
879
- const o = (b) => {
880
- T.current && !T.current.contains(b.target) && (J(!1), O(""));
909
+ } else i || F(T(t, A));
910
+ he.current = b;
911
+ }, [A, b, t, c, T, S, i]), ae(() => {
912
+ i || F(t);
913
+ }, [t, i]), ae(() => {
914
+ const h = (z) => {
915
+ se.current && !se.current.contains(z.target) && (M(!1), U(""));
881
916
  };
882
- return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
917
+ return document.addEventListener("mousedown", h), () => document.removeEventListener("mousedown", h);
883
918
  }, []);
884
- const N = te(() => m(P.length > 0 ? P : t).filter((b) => !b.disabled), [P, t, m]), ae = te(() => m(P.length > 0 ? P : t), [P, t, m]), B = te(() => {
885
- const o = /* @__PURE__ */ new Map();
886
- return ae.forEach((b) => {
887
- const Y = JSON.stringify({ value: b.value, label: b.label }), V = N.findIndex(
888
- (R) => R.value === b.value && R.label === b.label
919
+ const W = oe(() => I(R.length > 0 ? R : t).filter((z) => !z.disabled), [R, t, I]), Z = oe(() => I(R.length > 0 ? R : t), [R, t, I]), de = oe(() => {
920
+ const h = /* @__PURE__ */ new Map();
921
+ return Z.forEach((z) => {
922
+ const X = JSON.stringify({ value: z.value, label: z.label }), Y = W.findIndex(
923
+ (H) => H.value === z.value && H.label === z.label
889
924
  );
890
- o.set(Y, V);
891
- }), o;
892
- }, [ae, N]), he = (o) => {
893
- if (!p)
894
- switch (o.key) {
925
+ h.set(X, Y);
926
+ }), h;
927
+ }, [Z, W]), K = (h) => {
928
+ if (!s)
929
+ switch (h.key) {
895
930
  case "ArrowDown":
896
- o.preventDefault(), $ ? g((b) => b < N.length - 1 ? b + 1 : 0) : J(!0);
931
+ h.preventDefault(), b ? N((z) => z < W.length - 1 ? z + 1 : 0) : M(!0);
897
932
  break;
898
933
  case "ArrowUp":
899
- o.preventDefault(), $ && g((b) => b > 0 ? b - 1 : N.length - 1);
934
+ h.preventDefault(), b && N((z) => z > 0 ? z - 1 : W.length - 1);
900
935
  break;
901
936
  case "Enter":
902
- o.preventDefault(), $ && N[v] ? ue(N[v]) : J(!$);
937
+ h.preventDefault(), b && W[f] ? fe(W[f]) : M(!b);
903
938
  break;
904
939
  case "Escape":
905
- o.preventDefault(), J(!1), O("");
940
+ h.preventDefault(), M(!1), U("");
906
941
  break;
907
942
  case "Tab":
908
- $ && (J(!1), O(""));
943
+ b && (M(!1), U(""));
909
944
  break;
910
945
  }
911
946
  };
912
- ne(() => {
913
- if ($ && re.current) {
914
- const o = re.current.querySelector(
915
- `[data-index="${v}"]`
947
+ ae(() => {
948
+ if (b && ie.current) {
949
+ const h = ie.current.querySelector(
950
+ `[data-index="${f}"]`
916
951
  );
917
- o && typeof o.scrollIntoView == "function" && o.scrollIntoView({ block: "nearest" });
918
- }
919
- }, [v, $]);
920
- const ue = (o) => {
921
- o.disabled || (r?.(o.value, o), J(!1), O(""), g(0));
922
- }, se = (o) => {
923
- o.stopPropagation(), r?.(null, null), O("");
924
- }, Ce = () => {
925
- p || J((o) => {
926
- const b = !o;
927
- return b && setTimeout(() => le.current?.focus(), 0), b;
952
+ h && typeof h.scrollIntoView == "function" && h.scrollIntoView({ block: "nearest" });
953
+ }
954
+ }, [f, b]);
955
+ const fe = (h) => {
956
+ h.disabled || (r?.(h.value, h), M(!1), U(""), N(0));
957
+ }, ge = (h) => {
958
+ h.stopPropagation(), r?.(null, null), U("");
959
+ }, ue = () => {
960
+ s || M((h) => {
961
+ const z = !h;
962
+ return z && setTimeout(() => J.current?.focus(), 0), z;
928
963
  });
929
964
  };
930
- ne(() => {
931
- $ || (oe.current = null);
932
- }, [$]);
933
- const $e = (o) => {
934
- O(o.target.value), $ || J(!0), g(0);
935
- }, Ne = (o) => {
936
- const b = (o.level || 0) * 20;
937
- return /* @__PURE__ */ d("div", { className: "uiforge-combobox-option-content", style: { paddingLeft: `${b}px` }, children: [
938
- o.icon && /* @__PURE__ */ e("span", { className: "uiforge-combobox-option-icon", children: l(o.icon) ? /* @__PURE__ */ e(
965
+ ae(() => {
966
+ b || (ce.current = null);
967
+ }, [b]);
968
+ const Se = (h) => {
969
+ U(h.target.value), b || M(!0), N(0);
970
+ }, _e = (h) => {
971
+ const z = (h.level || 0) * 20;
972
+ return /* @__PURE__ */ y("div", { className: "uiforge-combobox-option-content", style: { paddingLeft: `${z}px` }, children: [
973
+ h.icon && /* @__PURE__ */ n("span", { className: "uiforge-combobox-option-icon", children: q(h.icon) ? /* @__PURE__ */ n(
939
974
  "img",
940
975
  {
941
- src: o.icon,
976
+ src: h.icon,
942
977
  alt: "",
943
978
  className: "uiforge-combobox-option-icon-img"
944
979
  }
945
- ) : o.icon }),
946
- /* @__PURE__ */ e("span", { className: "uiforge-combobox-option-label", children: o.label })
980
+ ) : h.icon }),
981
+ /* @__PURE__ */ n("span", { className: "uiforge-combobox-option-label", children: h.label })
947
982
  ] });
948
- }, Me = (o) => o ? /* @__PURE__ */ d("div", { className: "uiforge-combobox-value-content", children: [
949
- o.icon && /* @__PURE__ */ e("span", { className: "uiforge-combobox-value-icon", children: l(o.icon) ? /* @__PURE__ */ e("img", { src: o.icon, alt: "", className: "uiforge-combobox-value-icon-img" }) : o.icon }),
950
- /* @__PURE__ */ e("span", { className: "uiforge-combobox-value-label", children: o.label })
951
- ] }) : h, W = "uiforge-combobox", Le = [
952
- W,
953
- $ && `${W}--open`,
954
- p && `${W}--disabled`,
955
- f
983
+ }, v = (h) => h ? /* @__PURE__ */ y("div", { className: "uiforge-combobox-value-content", children: [
984
+ h.icon && /* @__PURE__ */ n("span", { className: "uiforge-combobox-value-icon", children: q(h.icon) ? /* @__PURE__ */ n("img", { src: h.icon, alt: "", className: "uiforge-combobox-value-icon-img" }) : h.icon }),
985
+ /* @__PURE__ */ n("span", { className: "uiforge-combobox-value-label", children: h.label })
986
+ ] }) : m, D = "uiforge-combobox", V = `${D}--${a}`, Q = [
987
+ D,
988
+ V,
989
+ b && `${D}--open`,
990
+ s && `${D}--disabled`,
991
+ $
956
992
  ].filter(Boolean).join(" ");
957
- return /* @__PURE__ */ d(
993
+ return /* @__PURE__ */ y(
958
994
  "div",
959
995
  {
960
- ref: T,
961
- className: Le,
962
- onKeyDown: he,
996
+ ref: se,
997
+ className: Q,
998
+ onKeyDown: K,
963
999
  role: "combobox",
964
- "aria-expanded": $,
1000
+ "aria-expanded": b,
965
1001
  "aria-haspopup": "listbox",
966
- "aria-label": q,
967
- "aria-disabled": p,
968
- tabIndex: p ? -1 : 0,
1002
+ "aria-label": d,
1003
+ "aria-disabled": s,
1004
+ tabIndex: s ? -1 : 0,
1005
+ "data-theme": a,
969
1006
  children: [
970
- /* @__PURE__ */ d("div", { className: `${W}-control`, onClick: Ce, children: [
971
- S && $ ? /* @__PURE__ */ e(
1007
+ /* @__PURE__ */ y("div", { className: `${D}-control`, onClick: ue, children: [
1008
+ _ && b ? /* @__PURE__ */ n(
972
1009
  "input",
973
1010
  {
974
- ref: le,
1011
+ ref: J,
975
1012
  type: "text",
976
- className: `${W}-input`,
977
- value: I,
978
- onChange: $e,
979
- placeholder: h,
980
- disabled: p,
1013
+ className: `${D}-input`,
1014
+ value: A,
1015
+ onChange: Se,
1016
+ placeholder: m,
1017
+ disabled: s,
981
1018
  "aria-autocomplete": "list",
982
- "aria-controls": `${W}-listbox`
1019
+ "aria-controls": `${D}-listbox`
983
1020
  }
984
- ) : /* @__PURE__ */ e("div", { className: `${W}-value`, children: Z ? Z(x) : Me(x) }),
985
- /* @__PURE__ */ d("div", { className: `${W}-indicators`, children: [
986
- u && n !== null && n !== void 0 && !p && /* @__PURE__ */ e(
1021
+ ) : /* @__PURE__ */ n("div", { className: `${D}-value`, children: k ? k(p) : v(p) }),
1022
+ /* @__PURE__ */ y("div", { className: `${D}-indicators`, children: [
1023
+ l && e !== null && e !== void 0 && !s && /* @__PURE__ */ n(
987
1024
  "button",
988
1025
  {
989
1026
  type: "button",
990
- className: `${W}-clear`,
991
- onClick: se,
1027
+ className: `${D}-clear`,
1028
+ onClick: ge,
992
1029
  "aria-label": "Clear selection",
993
1030
  tabIndex: -1,
994
1031
  children: "×"
995
1032
  }
996
1033
  ),
997
- /* @__PURE__ */ e("span", { className: `${W}-arrow`, children: "▼" })
1034
+ /* @__PURE__ */ n("span", { className: `${D}-arrow`, children: "▼" })
998
1035
  ] })
999
1036
  ] }),
1000
- $ && /* @__PURE__ */ e(
1037
+ b && /* @__PURE__ */ n(
1001
1038
  "div",
1002
1039
  {
1003
- ref: re,
1004
- className: `${W}-dropdown`,
1005
- style: { maxHeight: F },
1040
+ ref: ie,
1041
+ className: `${D}-dropdown`,
1042
+ style: { maxHeight: P },
1006
1043
  role: "listbox",
1007
- id: `${W}-listbox`,
1008
- children: H || y ? /* @__PURE__ */ e("div", { className: `${W}-loading`, children: "Loading..." }) : N.length === 0 ? /* @__PURE__ */ e("div", { className: `${W}-no-options`, children: D }) : ae.map((o) => {
1009
- const b = JSON.stringify({ value: o.value, label: o.label }), Y = B.get(b) ?? -1, V = o.value === n, R = Y === v, ee = [
1010
- `${W}-option`,
1011
- V && `${W}-option--selected`,
1012
- R && `${W}-option--highlighted`,
1013
- o.disabled && `${W}-option--disabled`
1044
+ id: `${D}-listbox`,
1045
+ children: E || x ? /* @__PURE__ */ n("div", { className: `${D}-loading`, children: "Loading..." }) : W.length === 0 ? /* @__PURE__ */ n("div", { className: `${D}-no-options`, children: o }) : Z.map((h) => {
1046
+ const z = JSON.stringify({ value: h.value, label: h.label }), X = de.get(z) ?? -1, Y = h.value === e, H = X === f, pe = [
1047
+ `${D}-option`,
1048
+ Y && `${D}-option--selected`,
1049
+ H && `${D}-option--highlighted`,
1050
+ h.disabled && `${D}-option--disabled`
1014
1051
  ].filter(Boolean).join(" ");
1015
- return /* @__PURE__ */ e(
1052
+ return /* @__PURE__ */ n(
1016
1053
  "div",
1017
1054
  {
1018
- className: ee,
1019
- onClick: () => ue(o),
1055
+ className: pe,
1056
+ onClick: () => fe(h),
1020
1057
  role: "option",
1021
- "aria-selected": V,
1022
- "aria-disabled": o.disabled,
1023
- "data-index": Y,
1024
- children: k ? k(o) : Ne(o)
1058
+ "aria-selected": Y,
1059
+ "aria-disabled": h.disabled,
1060
+ "data-index": X,
1061
+ children: L ? L(h) : _e(h)
1025
1062
  },
1026
- b
1063
+ z
1027
1064
  );
1028
1065
  })
1029
1066
  }
@@ -1031,51 +1068,425 @@ const At = ({
1031
1068
  ]
1032
1069
  }
1033
1070
  );
1034
- }, He = ({
1071
+ };
1072
+ function Ue() {
1073
+ return Ue = Object.assign ? Object.assign.bind() : function(t) {
1074
+ for (var e = 1; e < arguments.length; e++) {
1075
+ var r = arguments[e];
1076
+ for (var i in r) ({}).hasOwnProperty.call(r, i) && (t[i] = r[i]);
1077
+ }
1078
+ return t;
1079
+ }, Ue.apply(null, arguments);
1080
+ }
1081
+ function Re(t) {
1082
+ if (t === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1083
+ return t;
1084
+ }
1085
+ function Ve(t, e) {
1086
+ return Ve = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, i) {
1087
+ return r.__proto__ = i, r;
1088
+ }, Ve(t, e);
1089
+ }
1090
+ function ot(t, e) {
1091
+ t.prototype = Object.create(e.prototype), t.prototype.constructor = t, Ve(t, e);
1092
+ }
1093
+ var Te = Number.isNaN || function(e) {
1094
+ return typeof e == "number" && e !== e;
1095
+ };
1096
+ function st(t, e) {
1097
+ return !!(t === e || Te(t) && Te(e));
1098
+ }
1099
+ function lt(t, e) {
1100
+ if (t.length !== e.length)
1101
+ return !1;
1102
+ for (var r = 0; r < t.length; r++)
1103
+ if (!st(t[r], e[r]))
1104
+ return !1;
1105
+ return !0;
1106
+ }
1107
+ function Ae(t, e) {
1108
+ e === void 0 && (e = lt);
1109
+ var r, i = [], a, m = !1;
1110
+ function s() {
1111
+ for (var l = [], $ = 0; $ < arguments.length; $++)
1112
+ l[$] = arguments[$];
1113
+ return m && r === this && e(l, i) || (a = t.apply(this, l), m = !0, r = this, i = l), a;
1114
+ }
1115
+ return s;
1116
+ }
1117
+ var ct = typeof performance == "object" && typeof performance.now == "function", Be = ct ? function() {
1118
+ return performance.now();
1119
+ } : function() {
1120
+ return Date.now();
1121
+ };
1122
+ function je(t) {
1123
+ cancelAnimationFrame(t.id);
1124
+ }
1125
+ function dt(t, e) {
1126
+ var r = Be();
1127
+ function i() {
1128
+ Be() - r >= e ? t.call(null) : a.id = requestAnimationFrame(i);
1129
+ }
1130
+ var a = {
1131
+ id: requestAnimationFrame(i)
1132
+ };
1133
+ return a;
1134
+ }
1135
+ var Pe = -1;
1136
+ function He(t) {
1137
+ if (t === void 0 && (t = !1), Pe === -1 || t) {
1138
+ var e = document.createElement("div"), r = e.style;
1139
+ r.width = "50px", r.height = "50px", r.overflow = "scroll", document.body.appendChild(e), Pe = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
1140
+ }
1141
+ return Pe;
1142
+ }
1143
+ var be = null;
1144
+ function We(t) {
1145
+ if (t === void 0 && (t = !1), be === null || t) {
1146
+ var e = document.createElement("div"), r = e.style;
1147
+ r.width = "50px", r.height = "50px", r.overflow = "scroll", r.direction = "rtl";
1148
+ var i = document.createElement("div"), a = i.style;
1149
+ return a.width = "100px", a.height = "100px", e.appendChild(i), document.body.appendChild(e), e.scrollLeft > 0 ? be = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? be = "negative" : be = "positive-ascending"), document.body.removeChild(e), be;
1150
+ }
1151
+ return be;
1152
+ }
1153
+ process.env.NODE_ENV;
1154
+ var ut = 150, ht = function(e, r) {
1155
+ return e;
1156
+ }, $e = null, Ie = null;
1157
+ process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && ($e = /* @__PURE__ */ new WeakSet(), Ie = /* @__PURE__ */ new WeakSet());
1158
+ function mt(t) {
1159
+ var e, r = t.getItemOffset, i = t.getEstimatedTotalSize, a = t.getItemSize, m = t.getOffsetForIndexAndAlignment, s = t.getStartIndexForOffset, l = t.getStopIndexForStartIndex, $ = t.initInstanceProps, L = t.shouldResetStyleCacheOnItemSizeChange, k = t.validateProps;
1160
+ return e = /* @__PURE__ */ (function(E) {
1161
+ ot(P, E);
1162
+ function P(_) {
1163
+ var o;
1164
+ return o = E.call(this, _) || this, o._instanceProps = $(o.props, Re(o)), o._outerRef = void 0, o._resetIsScrollingTimeoutId = null, o.state = {
1165
+ instance: Re(o),
1166
+ isScrolling: !1,
1167
+ scrollDirection: "forward",
1168
+ scrollOffset: typeof o.props.initialScrollOffset == "number" ? o.props.initialScrollOffset : 0,
1169
+ scrollUpdateWasRequested: !1
1170
+ }, o._callOnItemsRendered = void 0, o._callOnItemsRendered = Ae(function(d, u, g, S) {
1171
+ return o.props.onItemsRendered({
1172
+ overscanStartIndex: d,
1173
+ overscanStopIndex: u,
1174
+ visibleStartIndex: g,
1175
+ visibleStopIndex: S
1176
+ });
1177
+ }), o._callOnScroll = void 0, o._callOnScroll = Ae(function(d, u, g) {
1178
+ return o.props.onScroll({
1179
+ scrollDirection: d,
1180
+ scrollOffset: u,
1181
+ scrollUpdateWasRequested: g
1182
+ });
1183
+ }), o._getItemStyle = void 0, o._getItemStyle = function(d) {
1184
+ var u = o.props, g = u.direction, S = u.itemSize, O = u.layout, C = o._getItemStyleCache(L && S, L && O, L && g), b;
1185
+ if (C.hasOwnProperty(d))
1186
+ b = C[d];
1187
+ else {
1188
+ var M = r(o.props, d, o._instanceProps), A = a(o.props, d, o._instanceProps), U = g === "horizontal" || O === "horizontal", R = g === "rtl", F = U ? M : 0;
1189
+ C[d] = b = {
1190
+ position: "absolute",
1191
+ left: R ? void 0 : F,
1192
+ right: R ? F : void 0,
1193
+ top: U ? 0 : M,
1194
+ height: U ? "100%" : A,
1195
+ width: U ? A : "100%"
1196
+ };
1197
+ }
1198
+ return b;
1199
+ }, o._getItemStyleCache = void 0, o._getItemStyleCache = Ae(function(d, u, g) {
1200
+ return {};
1201
+ }), o._onScrollHorizontal = function(d) {
1202
+ var u = d.currentTarget, g = u.clientWidth, S = u.scrollLeft, O = u.scrollWidth;
1203
+ o.setState(function(C) {
1204
+ if (C.scrollOffset === S)
1205
+ return null;
1206
+ var b = o.props.direction, M = S;
1207
+ if (b === "rtl")
1208
+ switch (We()) {
1209
+ case "negative":
1210
+ M = -S;
1211
+ break;
1212
+ case "positive-descending":
1213
+ M = O - g - S;
1214
+ break;
1215
+ }
1216
+ return M = Math.max(0, Math.min(M, O - g)), {
1217
+ isScrolling: !0,
1218
+ scrollDirection: C.scrollOffset < M ? "forward" : "backward",
1219
+ scrollOffset: M,
1220
+ scrollUpdateWasRequested: !1
1221
+ };
1222
+ }, o._resetIsScrollingDebounced);
1223
+ }, o._onScrollVertical = function(d) {
1224
+ var u = d.currentTarget, g = u.clientHeight, S = u.scrollHeight, O = u.scrollTop;
1225
+ o.setState(function(C) {
1226
+ if (C.scrollOffset === O)
1227
+ return null;
1228
+ var b = Math.max(0, Math.min(O, S - g));
1229
+ return {
1230
+ isScrolling: !0,
1231
+ scrollDirection: C.scrollOffset < b ? "forward" : "backward",
1232
+ scrollOffset: b,
1233
+ scrollUpdateWasRequested: !1
1234
+ };
1235
+ }, o._resetIsScrollingDebounced);
1236
+ }, o._outerRefSetter = function(d) {
1237
+ var u = o.props.outerRef;
1238
+ o._outerRef = d, typeof u == "function" ? u(d) : u != null && typeof u == "object" && u.hasOwnProperty("current") && (u.current = d);
1239
+ }, o._resetIsScrollingDebounced = function() {
1240
+ o._resetIsScrollingTimeoutId !== null && je(o._resetIsScrollingTimeoutId), o._resetIsScrollingTimeoutId = dt(o._resetIsScrolling, ut);
1241
+ }, o._resetIsScrolling = function() {
1242
+ o._resetIsScrollingTimeoutId = null, o.setState({
1243
+ isScrolling: !1
1244
+ }, function() {
1245
+ o._getItemStyleCache(-1, null);
1246
+ });
1247
+ }, o;
1248
+ }
1249
+ P.getDerivedStateFromProps = function(o, d) {
1250
+ return pt(o, d), k(o), null;
1251
+ };
1252
+ var c = P.prototype;
1253
+ return c.scrollTo = function(o) {
1254
+ o = Math.max(0, o), this.setState(function(d) {
1255
+ return d.scrollOffset === o ? null : {
1256
+ scrollDirection: d.scrollOffset < o ? "forward" : "backward",
1257
+ scrollOffset: o,
1258
+ scrollUpdateWasRequested: !0
1259
+ };
1260
+ }, this._resetIsScrollingDebounced);
1261
+ }, c.scrollToItem = function(o, d) {
1262
+ d === void 0 && (d = "auto");
1263
+ var u = this.props, g = u.itemCount, S = u.layout, O = this.state.scrollOffset;
1264
+ o = Math.max(0, Math.min(o, g - 1));
1265
+ var C = 0;
1266
+ if (this._outerRef) {
1267
+ var b = this._outerRef;
1268
+ S === "vertical" ? C = b.scrollWidth > b.clientWidth ? He() : 0 : C = b.scrollHeight > b.clientHeight ? He() : 0;
1269
+ }
1270
+ this.scrollTo(m(this.props, o, d, O, this._instanceProps, C));
1271
+ }, c.componentDidMount = function() {
1272
+ var o = this.props, d = o.direction, u = o.initialScrollOffset, g = o.layout;
1273
+ if (typeof u == "number" && this._outerRef != null) {
1274
+ var S = this._outerRef;
1275
+ d === "horizontal" || g === "horizontal" ? S.scrollLeft = u : S.scrollTop = u;
1276
+ }
1277
+ this._callPropsCallbacks();
1278
+ }, c.componentDidUpdate = function() {
1279
+ var o = this.props, d = o.direction, u = o.layout, g = this.state, S = g.scrollOffset, O = g.scrollUpdateWasRequested;
1280
+ if (O && this._outerRef != null) {
1281
+ var C = this._outerRef;
1282
+ if (d === "horizontal" || u === "horizontal")
1283
+ if (d === "rtl")
1284
+ switch (We()) {
1285
+ case "negative":
1286
+ C.scrollLeft = -S;
1287
+ break;
1288
+ case "positive-ascending":
1289
+ C.scrollLeft = S;
1290
+ break;
1291
+ default:
1292
+ var b = C.clientWidth, M = C.scrollWidth;
1293
+ C.scrollLeft = M - b - S;
1294
+ break;
1295
+ }
1296
+ else
1297
+ C.scrollLeft = S;
1298
+ else
1299
+ C.scrollTop = S;
1300
+ }
1301
+ this._callPropsCallbacks();
1302
+ }, c.componentWillUnmount = function() {
1303
+ this._resetIsScrollingTimeoutId !== null && je(this._resetIsScrollingTimeoutId);
1304
+ }, c.render = function() {
1305
+ var o = this.props, d = o.children, u = o.className, g = o.direction, S = o.height, O = o.innerRef, C = o.innerElementType, b = o.innerTagName, M = o.itemCount, A = o.itemData, U = o.itemKey, R = U === void 0 ? ht : U, F = o.layout, f = o.outerElementType, N = o.outerTagName, x = o.style, w = o.useIsScrolling, se = o.width, J = this.state.isScrolling, ie = g === "horizontal" || F === "horizontal", ee = ie ? this._onScrollHorizontal : this._onScrollVertical, ce = this._getRangeToRender(), le = ce[0], j = ce[1], he = [];
1306
+ if (M > 0)
1307
+ for (var G = le; G <= j; G++)
1308
+ he.push(Ne(d, {
1309
+ data: A,
1310
+ key: R(G, A),
1311
+ index: G,
1312
+ isScrolling: w ? J : void 0,
1313
+ style: this._getItemStyle(G)
1314
+ }));
1315
+ var re = i(this.props, this._instanceProps);
1316
+ return Ne(f || N || "div", {
1317
+ className: u,
1318
+ onScroll: ee,
1319
+ ref: this._outerRefSetter,
1320
+ style: Ue({
1321
+ position: "relative",
1322
+ height: S,
1323
+ width: se,
1324
+ overflow: "auto",
1325
+ WebkitOverflowScrolling: "touch",
1326
+ willChange: "transform",
1327
+ direction: g
1328
+ }, x)
1329
+ }, Ne(C || b || "div", {
1330
+ children: he,
1331
+ ref: O,
1332
+ style: {
1333
+ height: ie ? "100%" : re,
1334
+ pointerEvents: J ? "none" : void 0,
1335
+ width: ie ? re : "100%"
1336
+ }
1337
+ }));
1338
+ }, c._callPropsCallbacks = function() {
1339
+ if (typeof this.props.onItemsRendered == "function") {
1340
+ var o = this.props.itemCount;
1341
+ if (o > 0) {
1342
+ var d = this._getRangeToRender(), u = d[0], g = d[1], S = d[2], O = d[3];
1343
+ this._callOnItemsRendered(u, g, S, O);
1344
+ }
1345
+ }
1346
+ if (typeof this.props.onScroll == "function") {
1347
+ var C = this.state, b = C.scrollDirection, M = C.scrollOffset, A = C.scrollUpdateWasRequested;
1348
+ this._callOnScroll(b, M, A);
1349
+ }
1350
+ }, c._getRangeToRender = function() {
1351
+ var o = this.props, d = o.itemCount, u = o.overscanCount, g = this.state, S = g.isScrolling, O = g.scrollDirection, C = g.scrollOffset;
1352
+ if (d === 0)
1353
+ return [0, 0, 0, 0];
1354
+ var b = s(this.props, C, this._instanceProps), M = l(this.props, b, C, this._instanceProps), A = !S || O === "backward" ? Math.max(1, u) : 1, U = !S || O === "forward" ? Math.max(1, u) : 1;
1355
+ return [Math.max(0, b - A), Math.max(0, Math.min(d - 1, M + U)), b, M];
1356
+ }, P;
1357
+ })(Qe), e.defaultProps = {
1358
+ direction: "ltr",
1359
+ itemData: void 0,
1360
+ layout: "vertical",
1361
+ overscanCount: 2,
1362
+ useIsScrolling: !1
1363
+ }, e;
1364
+ }
1365
+ var pt = function(e, r) {
1366
+ var i = e.children, a = e.direction, m = e.height, s = e.layout, l = e.innerTagName, $ = e.outerTagName, L = e.width, k = r.instance;
1367
+ if (process.env.NODE_ENV !== "production") {
1368
+ (l != null || $ != null) && Ie && !Ie.has(k) && (Ie.add(k), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));
1369
+ var E = a === "horizontal" || s === "horizontal";
1370
+ switch (a) {
1371
+ case "horizontal":
1372
+ case "vertical":
1373
+ $e && !$e.has(k) && ($e.add(k), console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));
1374
+ break;
1375
+ case "ltr":
1376
+ case "rtl":
1377
+ break;
1378
+ default:
1379
+ throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + a + '" was specified.'));
1380
+ }
1381
+ switch (s) {
1382
+ case "horizontal":
1383
+ case "vertical":
1384
+ break;
1385
+ default:
1386
+ throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". ' + ('"' + s + '" was specified.'));
1387
+ }
1388
+ if (i == null)
1389
+ throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (i === null ? "null" : typeof i) + '" was specified.'));
1390
+ if (E && typeof L != "number")
1391
+ throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. ' + ('"' + (L === null ? "null" : typeof L) + '" was specified.'));
1392
+ if (!E && typeof m != "number")
1393
+ throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. ' + ('"' + (m === null ? "null" : typeof m) + '" was specified.'));
1394
+ }
1395
+ }, ft = /* @__PURE__ */ mt({
1396
+ getItemOffset: function(e, r) {
1397
+ var i = e.itemSize;
1398
+ return r * i;
1399
+ },
1400
+ getItemSize: function(e, r) {
1401
+ var i = e.itemSize;
1402
+ return i;
1403
+ },
1404
+ getEstimatedTotalSize: function(e) {
1405
+ var r = e.itemCount, i = e.itemSize;
1406
+ return i * r;
1407
+ },
1408
+ getOffsetForIndexAndAlignment: function(e, r, i, a, m, s) {
1409
+ var l = e.direction, $ = e.height, L = e.itemCount, k = e.itemSize, E = e.layout, P = e.width, c = l === "horizontal" || E === "horizontal", _ = c ? P : $, o = Math.max(0, L * k - _), d = Math.min(o, r * k), u = Math.max(0, r * k - _ + k + s);
1410
+ switch (i === "smart" && (a >= u - _ && a <= d + _ ? i = "auto" : i = "center"), i) {
1411
+ case "start":
1412
+ return d;
1413
+ case "end":
1414
+ return u;
1415
+ case "center": {
1416
+ var g = Math.round(u + (d - u) / 2);
1417
+ return g < Math.ceil(_ / 2) ? 0 : g > o + Math.floor(_ / 2) ? o : g;
1418
+ }
1419
+ case "auto":
1420
+ default:
1421
+ return a >= u && a <= d ? a : a < u ? u : d;
1422
+ }
1423
+ },
1424
+ getStartIndexForOffset: function(e, r) {
1425
+ var i = e.itemCount, a = e.itemSize;
1426
+ return Math.max(0, Math.min(i - 1, Math.floor(r / a)));
1427
+ },
1428
+ getStopIndexForStartIndex: function(e, r, i) {
1429
+ var a = e.direction, m = e.height, s = e.itemCount, l = e.itemSize, $ = e.layout, L = e.width, k = a === "horizontal" || $ === "horizontal", E = r * l, P = k ? L : m, c = Math.ceil((P + i - E) / l);
1430
+ return Math.max(0, Math.min(
1431
+ s - 1,
1432
+ r + c - 1
1433
+ // -1 is because stop index is inclusive
1434
+ ));
1435
+ },
1436
+ initInstanceProps: function(e) {
1437
+ },
1438
+ shouldResetStyleCacheOnItemSizeChange: !0,
1439
+ validateProps: function(e) {
1440
+ var r = e.itemSize;
1441
+ if (process.env.NODE_ENV !== "production" && typeof r != "number")
1442
+ throw Error('An invalid "itemSize" prop has been specified. Value should be a number. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
1443
+ }
1444
+ });
1445
+ const vt = ({
1035
1446
  size: t = 16,
1036
- className: n = "",
1447
+ className: e = "",
1037
1448
  color: r = "currentColor"
1038
- }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: /* @__PURE__ */ e("path", { d: "M11.93 8.5a4.002 4.002 0 01-7.86 0H.75a.75.75 0 010-1.5h3.32a4.002 4.002 0 017.86 0h3.32a.75.75 0 010 1.5h-3.32zM8 5a3 3 0 100 6 3 3 0 000-6z" }) }), Ae = ({
1449
+ }) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M11.93 8.5a4.002 4.002 0 01-7.86 0H.75a.75.75 0 010-1.5h3.32a4.002 4.002 0 017.86 0h3.32a.75.75 0 010 1.5h-3.32zM8 5a3 3 0 100 6 3 3 0 000-6z" }) }), gt = ({
1039
1450
  size: t = 16,
1040
- className: n = "",
1451
+ className: e = "",
1041
1452
  color: r = "currentColor"
1042
- }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: /* @__PURE__ */ e("path", { d: "M7.177 3.073L9.573.677A.25.25 0 0110 .854v4.792a.25.25 0 01-.427.177L7.177 3.427a.25.25 0 010-.354zM3.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122v5.256a2.251 2.251 0 11-1.5 0V5.372A2.25 2.25 0 011.5 3.25zM11 2.5h-1V4h1a1 1 0 011 1v5.628a2.251 2.251 0 101.5 0V5A2.5 2.5 0 0011 2.5zm1 10.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0zM3.75 12a.75.75 0 100 1.5.75.75 0 000-1.5z" }) }), Ee = ({
1453
+ }) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M7.177 3.073L9.573.677A.25.25 0 0110 .854v4.792a.25.25 0 01-.427.177L7.177 3.427a.25.25 0 010-.354zM3.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122v5.256a2.251 2.251 0 11-1.5 0V5.372A2.25 2.25 0 011.5 3.25zM11 2.5h-1V4h1a1 1 0 011 1v5.628a2.251 2.251 0 101.5 0V5A2.5 2.5 0 0011 2.5zm1 10.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0zM3.75 12a.75.75 0 100 1.5.75.75 0 000-1.5z" }) }), yt = ({
1043
1454
  size: t = 16,
1044
- className: n = "",
1455
+ className: e = "",
1045
1456
  color: r = "currentColor"
1046
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: [
1047
- /* @__PURE__ */ e("path", { d: "M8 9.5a1.5 1.5 0 100-3 1.5 1.5 0 000 3z" }),
1048
- /* @__PURE__ */ e("path", { d: "M8 0a8 8 0 100 16A8 8 0 008 0zM1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0z" })
1049
- ] }), ze = ({
1457
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1458
+ /* @__PURE__ */ n("path", { d: "M8 9.5a1.5 1.5 0 100-3 1.5 1.5 0 000 3z" }),
1459
+ /* @__PURE__ */ n("path", { d: "M8 0a8 8 0 100 16A8 8 0 008 0zM1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0z" })
1460
+ ] }), bt = ({
1050
1461
  size: t = 16,
1051
- className: n = "",
1462
+ className: e = "",
1052
1463
  color: r = "currentColor"
1053
- }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: /* @__PURE__ */ e("path", { d: "M0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0114.25 13H8.06l-2.573 2.573A1.458 1.458 0 013 14.543V13H1.75A1.75 1.75 0 010 11.25v-8.5zM1.75 2.5a.25.25 0 00-.25.25v8.5c0 .138.112.25.25.25h2a.75.75 0 01.75.75v2.19l2.72-2.72a.75.75 0 01.53-.22h6.5a.25.25 0 00.25-.25v-8.5a.25.25 0 00-.25-.25H1.75z" }) }), Pe = ({
1464
+ }) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0114.25 13H8.06l-2.573 2.573A1.458 1.458 0 013 14.543V13H1.75A1.75 1.75 0 010 11.25v-8.5zM1.75 2.5a.25.25 0 00-.25.25v8.5c0 .138.112.25.25.25h2a.75.75 0 01.75.75v2.19l2.72-2.72a.75.75 0 01.53-.22h6.5a.25.25 0 00.25-.25v-8.5a.25.25 0 00-.25-.25H1.75z" }) }), wt = ({
1054
1465
  size: t = 16,
1055
- className: n = "",
1466
+ className: e = "",
1056
1467
  color: r = "currentColor"
1057
- }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: /* @__PURE__ */ e("path", { d: "M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25z" }) }), Te = ({
1468
+ }) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25z" }) }), _t = ({
1058
1469
  size: t = 16,
1059
- className: n = "",
1470
+ className: e = "",
1060
1471
  color: r = "currentColor"
1061
- }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: /* @__PURE__ */ e("path", { d: "M5 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm0 2.122a2.25 2.25 0 10-1.5 0v.878A2.25 2.25 0 005.75 8.5h1.5v2.128a2.251 2.251 0 101.5 0V8.5h1.5a2.25 2.25 0 002.25-2.25v-.878a2.25 2.25 0 10-1.5 0v.878a.75.75 0 01-.75.75h-4.5A.75.75 0 015 6.25v-.878zm3.75 7.378a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm3-8.75a.75.75 0 100-1.5.75.75 0 000 1.5z" }) }), We = ({
1472
+ }) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M5 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm0 2.122a2.25 2.25 0 10-1.5 0v.878A2.25 2.25 0 005.75 8.5h1.5v2.128a2.251 2.251 0 101.5 0V8.5h1.5a2.25 2.25 0 002.25-2.25v-.878a2.25 2.25 0 10-1.5 0v.878a.75.75 0 01-.75.75h-4.5A.75.75 0 015 6.25v-.878zm3.75 7.378a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm3-8.75a.75.75 0 100-1.5.75.75 0 000 1.5z" }) }), xt = ({
1062
1473
  size: t = 16,
1063
- className: n = "",
1474
+ className: e = "",
1064
1475
  color: r = "currentColor"
1065
- }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: /* @__PURE__ */ e("path", { d: "M5 3.254V3.25v.005a.75.75 0 110-.005v.004zm.45 1.9a2.25 2.25 0 10-1.95.218v5.256a2.25 2.25 0 101.5 0V7.123A5.735 5.735 0 009.25 9h1.378a2.251 2.251 0 100-1.5H9.25a4.25 4.25 0 01-3.8-2.346zM12.75 9a.75.75 0 100-1.5.75.75 0 000 1.5zm-8.5 4.5a.75.75 0 100-1.5.75.75 0 000 1.5z" }) }), Oe = ({
1476
+ }) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M5 3.254V3.25v.005a.75.75 0 110-.005v.004zm.45 1.9a2.25 2.25 0 10-1.95.218v5.256a2.25 2.25 0 101.5 0V7.123A5.735 5.735 0 009.25 9h1.378a2.251 2.251 0 100-1.5H9.25a4.25 4.25 0 01-3.8-2.346zM12.75 9a.75.75 0 100-1.5.75.75 0 000 1.5zm-8.5 4.5a.75.75 0 100-1.5.75.75 0 000 1.5z" }) }), $t = ({
1066
1477
  size: t = 16,
1067
- className: n = "",
1478
+ className: e = "",
1068
1479
  color: r = "currentColor"
1069
- }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: /* @__PURE__ */ e("path", { d: "M7.47 10.78a.75.75 0 001.06 0l3.75-3.75a.75.75 0 00-1.06-1.06L8.75 8.44V1.75a.75.75 0 00-1.5 0v6.69L4.78 5.97a.75.75 0 00-1.06 1.06l3.75 3.75zM3.75 13a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5z" }) }), Ue = ({
1480
+ }) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M7.47 10.78a.75.75 0 001.06 0l3.75-3.75a.75.75 0 00-1.06-1.06L8.75 8.44V1.75a.75.75 0 00-1.5 0v6.69L4.78 5.97a.75.75 0 00-1.06 1.06l3.75 3.75zM3.75 13a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5z" }) }), It = ({
1070
1481
  size: t = 16,
1071
- className: n = "",
1482
+ className: e = "",
1072
1483
  color: r = "currentColor"
1073
- }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: /* @__PURE__ */ e("path", { d: "M4.53 4.75A.75.75 0 015 6.25h6a.75.75 0 00.53-1.28l-3-3a.75.75 0 00-1.06 0l-3 3zm.47 6.47a.75.75 0 01.53-.22h6a.75.75 0 01.53 1.28l-3 3a.75.75 0 01-1.06 0l-3-3a.75.75 0 01-.01-1.06h.01z" }) }), Re = ({
1484
+ }) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M4.53 4.75A.75.75 0 015 6.25h6a.75.75 0 00.53-1.28l-3-3a.75.75 0 00-1.06 0l-3 3zm.47 6.47a.75.75 0 01.53-.22h6a.75.75 0 01.53 1.28l-3 3a.75.75 0 01-1.06 0l-3-3a.75.75 0 01-.01-1.06h.01z" }) }), Ct = ({
1074
1485
  size: t = 20,
1075
- className: n = "",
1486
+ className: e = "",
1076
1487
  color: r = "currentColor"
1077
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 20 20", fill: "none", className: n, children: [
1078
- /* @__PURE__ */ e(
1488
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 20 20", fill: "none", className: e, children: [
1489
+ /* @__PURE__ */ n(
1079
1490
  "path",
1080
1491
  {
1081
1492
  d: "M10 2L6 6M10 2L14 6M10 2V7.5",
@@ -1085,7 +1496,7 @@ const At = ({
1085
1496
  strokeLinejoin: "round"
1086
1497
  }
1087
1498
  ),
1088
- /* @__PURE__ */ e(
1499
+ /* @__PURE__ */ n(
1089
1500
  "path",
1090
1501
  {
1091
1502
  d: "M3 10H17",
@@ -1095,7 +1506,7 @@ const At = ({
1095
1506
  strokeDasharray: "1 2"
1096
1507
  }
1097
1508
  ),
1098
- /* @__PURE__ */ e(
1509
+ /* @__PURE__ */ n(
1099
1510
  "path",
1100
1511
  {
1101
1512
  d: "M10 18L6 14M10 18L14 14M10 18V12.5",
@@ -1105,12 +1516,12 @@ const At = ({
1105
1516
  strokeLinejoin: "round"
1106
1517
  }
1107
1518
  )
1108
- ] }), je = ({
1519
+ ] }), kt = ({
1109
1520
  size: t = 20,
1110
- className: n = "",
1521
+ className: e = "",
1111
1522
  color: r = "currentColor"
1112
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 20 20", fill: "none", className: n, children: [
1113
- /* @__PURE__ */ e(
1523
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 20 20", fill: "none", className: e, children: [
1524
+ /* @__PURE__ */ n(
1114
1525
  "path",
1115
1526
  {
1116
1527
  d: "M10 7.5L6 4M10 7.5L14 4M10 7.5V2",
@@ -1120,7 +1531,7 @@ const At = ({
1120
1531
  strokeLinejoin: "round"
1121
1532
  }
1122
1533
  ),
1123
- /* @__PURE__ */ e(
1534
+ /* @__PURE__ */ n(
1124
1535
  "path",
1125
1536
  {
1126
1537
  d: "M3 10H17",
@@ -1130,7 +1541,7 @@ const At = ({
1130
1541
  strokeDasharray: "1 2"
1131
1542
  }
1132
1543
  ),
1133
- /* @__PURE__ */ e(
1544
+ /* @__PURE__ */ n(
1134
1545
  "path",
1135
1546
  {
1136
1547
  d: "M10 12.5L6 16M10 12.5L14 16M10 12.5V18",
@@ -1140,70 +1551,64 @@ const At = ({
1140
1551
  strokeLinejoin: "round"
1141
1552
  }
1142
1553
  )
1143
- ] }), Fe = ({
1554
+ ] }), St = ({
1144
1555
  size: t = 16,
1145
- className: n = "",
1556
+ className: e = "",
1146
1557
  color: r = "currentColor"
1147
- }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: /* @__PURE__ */ e("path", { d: "M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z" }) }), qe = ({
1558
+ }) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z" }) }), Nt = ({
1148
1559
  size: t = 16,
1149
- className: n = "",
1560
+ className: e = "",
1150
1561
  color: r = "currentColor"
1151
- }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: /* @__PURE__ */ e("path", { d: "M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z" }) }), Ke = ({
1562
+ }) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z" }) }), Lt = ({
1152
1563
  size: t = 16,
1153
- className: n = "",
1564
+ className: e = "",
1154
1565
  color: r = "currentColor"
1155
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: "none", className: n, children: [
1156
- /* @__PURE__ */ e("circle", { cx: "8", cy: "8", r: "7", stroke: r, strokeWidth: "1.5" }),
1157
- /* @__PURE__ */ e(
1158
- "path",
1159
- {
1160
- d: "M8 1C11.866 1 15 4.134 15 8C15 11.866 11.866 15 8 15",
1161
- fill: r
1162
- }
1163
- ),
1164
- /* @__PURE__ */ e("circle", { cx: "8", cy: "5", r: "2", fill: r === "currentColor" ? "white" : "#fff" }),
1165
- /* @__PURE__ */ e("circle", { cx: "8", cy: "11", r: "2", fill: r }),
1166
- /* @__PURE__ */ e("circle", { cx: "8", cy: "5", r: "0.5", fill: r }),
1167
- /* @__PURE__ */ e("circle", { cx: "8", cy: "11", r: "0.5", fill: r === "currentColor" ? "white" : "#fff" })
1168
- ] }), Ze = ({
1566
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: "none", className: e, children: [
1567
+ /* @__PURE__ */ n("circle", { cx: "8", cy: "8", r: "7", stroke: r, strokeWidth: "1.5" }),
1568
+ /* @__PURE__ */ n("path", { d: "M8 1C11.866 1 15 4.134 15 8C15 11.866 11.866 15 8 15", fill: r }),
1569
+ /* @__PURE__ */ n("circle", { cx: "8", cy: "5", r: "2", fill: r === "currentColor" ? "white" : "#fff" }),
1570
+ /* @__PURE__ */ n("circle", { cx: "8", cy: "11", r: "2", fill: r }),
1571
+ /* @__PURE__ */ n("circle", { cx: "8", cy: "5", r: "0.5", fill: r }),
1572
+ /* @__PURE__ */ n("circle", { cx: "8", cy: "11", r: "0.5", fill: r === "currentColor" ? "white" : "#fff" })
1573
+ ] }), Mt = ({
1169
1574
  size: t = 16,
1170
- className: n = "",
1575
+ className: e = "",
1171
1576
  color: r = "currentColor"
1172
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: [
1173
- /* @__PURE__ */ e("circle", { cx: "8", cy: "3", r: "1.5" }),
1174
- /* @__PURE__ */ e("path", { d: "M8 5C6.5 5 5 6 5 7.5V9C5 9 5.5 10 6 10.5L5 14H7L8 11L9 14H11L10 10.5C10.5 10 11 9 11 9V7.5C11 6 9.5 5 8 5Z" }),
1175
- /* @__PURE__ */ e("path", { d: "M4 9L2 10M12 9L14 10", strokeWidth: "1", stroke: r, fill: "none" })
1176
- ] }), Ge = ({
1577
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1578
+ /* @__PURE__ */ n("circle", { cx: "8", cy: "3", r: "1.5" }),
1579
+ /* @__PURE__ */ n("path", { d: "M8 5C6.5 5 5 6 5 7.5V9C5 9 5.5 10 6 10.5L5 14H7L8 11L9 14H11L10 10.5C10.5 10 11 9 11 9V7.5C11 6 9.5 5 8 5Z" }),
1580
+ /* @__PURE__ */ n("path", { d: "M4 9L2 10M12 9L14 10", strokeWidth: "1", stroke: r, fill: "none" })
1581
+ ] }), At = ({
1177
1582
  size: t = 16,
1178
- className: n = "",
1583
+ className: e = "",
1179
1584
  color: r = "currentColor"
1180
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: [
1181
- /* @__PURE__ */ e("circle", { cx: "8", cy: "2.5", r: "1.5" }),
1182
- /* @__PURE__ */ e("path", { d: "M8 4.5L6 8L4 14H6L7 10H9L10 14H12L10 8L8 4.5Z" }),
1183
- /* @__PURE__ */ e("path", { d: "M6 8L3 6M10 8L13 6", strokeWidth: "1.5", stroke: r, fill: "none" })
1184
- ] }), Je = ({
1585
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1586
+ /* @__PURE__ */ n("circle", { cx: "8", cy: "2.5", r: "1.5" }),
1587
+ /* @__PURE__ */ n("path", { d: "M8 4.5L6 8L4 14H6L7 10H9L10 14H12L10 8L8 4.5Z" }),
1588
+ /* @__PURE__ */ n("path", { d: "M6 8L3 6M10 8L13 6", strokeWidth: "1.5", stroke: r, fill: "none" })
1589
+ ] }), Pt = ({
1185
1590
  size: t = 16,
1186
- className: n = "",
1591
+ className: e = "",
1187
1592
  color: r = "currentColor"
1188
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: [
1189
- /* @__PURE__ */ e("rect", { x: "1", y: "6", width: "2", height: "4", rx: "0.5" }),
1190
- /* @__PURE__ */ e("rect", { x: "13", y: "6", width: "2", height: "4", rx: "0.5" }),
1191
- /* @__PURE__ */ e("rect", { x: "3", y: "5.5", width: "1", height: "5" }),
1192
- /* @__PURE__ */ e("rect", { x: "12", y: "5.5", width: "1", height: "5" }),
1193
- /* @__PURE__ */ e("rect", { x: "4", y: "7", width: "8", height: "2", rx: "0.5" })
1194
- ] }), Ye = ({
1593
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1594
+ /* @__PURE__ */ n("rect", { x: "1", y: "6", width: "2", height: "4", rx: "0.5" }),
1595
+ /* @__PURE__ */ n("rect", { x: "13", y: "6", width: "2", height: "4", rx: "0.5" }),
1596
+ /* @__PURE__ */ n("rect", { x: "3", y: "5.5", width: "1", height: "5" }),
1597
+ /* @__PURE__ */ n("rect", { x: "12", y: "5.5", width: "1", height: "5" }),
1598
+ /* @__PURE__ */ n("rect", { x: "4", y: "7", width: "8", height: "2", rx: "0.5" })
1599
+ ] }), Et = ({
1195
1600
  size: t = 16,
1196
- className: n = "",
1601
+ className: e = "",
1197
1602
  color: r = "currentColor"
1198
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: [
1199
- /* @__PURE__ */ e("circle", { cx: "10", cy: "2.5", r: "1.5" }),
1200
- /* @__PURE__ */ e("path", { d: "M9 4.5L8 6L6 7L4 8L6 9L8 8L10 7L11 9L10 12L9 14H11L12 11L13 9L12 6L10 4.5H9Z" }),
1201
- /* @__PURE__ */ e("path", { d: "M6 14H4L5 11" })
1202
- ] }), Qe = ({
1603
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1604
+ /* @__PURE__ */ n("circle", { cx: "10", cy: "2.5", r: "1.5" }),
1605
+ /* @__PURE__ */ n("path", { d: "M9 4.5L8 6L6 7L4 8L6 9L8 8L10 7L11 9L10 12L9 14H11L12 11L13 9L12 6L10 4.5H9Z" }),
1606
+ /* @__PURE__ */ n("path", { d: "M6 14H4L5 11" })
1607
+ ] }), Dt = ({
1203
1608
  size: t = 16,
1204
- className: n = "",
1609
+ className: e = "",
1205
1610
  color: r = "currentColor"
1206
- }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: "none", className: n, children: /* @__PURE__ */ e(
1611
+ }) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: "none", className: e, children: /* @__PURE__ */ n(
1207
1612
  "path",
1208
1613
  {
1209
1614
  d: "M2 8H5L6.5 5L8 11L9.5 8H14",
@@ -1212,43 +1617,43 @@ const At = ({
1212
1617
  strokeLinecap: "round",
1213
1618
  strokeLinejoin: "round"
1214
1619
  }
1215
- ) }), Xe = ({
1620
+ ) }), zt = ({
1216
1621
  size: t = 16,
1217
- className: n = "",
1622
+ className: e = "",
1218
1623
  color: r = "currentColor"
1219
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: [
1220
- /* @__PURE__ */ e("path", { d: "M4 8C4 6 5 4 7 4C8 4 8.5 4.5 8.5 5.5C8.5 6 8.8 6.5 9.5 6.5C10.5 6.5 11 7 11 8C11 9.5 10 11 8 12C6 13 4 12 4 10V8Z" }),
1221
- /* @__PURE__ */ e("circle", { cx: "7", cy: "3", r: "1.5" })
1222
- ] }), et = ({
1624
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1625
+ /* @__PURE__ */ n("path", { d: "M4 8C4 6 5 4 7 4C8 4 8.5 4.5 8.5 5.5C8.5 6 8.8 6.5 9.5 6.5C10.5 6.5 11 7 11 8C11 9.5 10 11 8 12C6 13 4 12 4 10V8Z" }),
1626
+ /* @__PURE__ */ n("circle", { cx: "7", cy: "3", r: "1.5" })
1627
+ ] }), Ot = ({
1223
1628
  size: t = 16,
1224
- className: n = "",
1629
+ className: e = "",
1225
1630
  color: r = "currentColor"
1226
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: [
1227
- /* @__PURE__ */ e("rect", { x: "2", y: "2", width: "12", height: "3", rx: "0.5" }),
1228
- /* @__PURE__ */ e("rect", { x: "2", y: "6.5", width: "12", height: "3", rx: "0.5" }),
1229
- /* @__PURE__ */ e("rect", { x: "2", y: "11", width: "12", height: "3", rx: "0.5" }),
1230
- /* @__PURE__ */ e("circle", { cx: "4", cy: "3.5", r: "0.5" }),
1231
- /* @__PURE__ */ e("circle", { cx: "4", cy: "8", r: "0.5" }),
1232
- /* @__PURE__ */ e("circle", { cx: "4", cy: "12.5", r: "0.5" })
1233
- ] }), tt = ({
1631
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1632
+ /* @__PURE__ */ n("rect", { x: "2", y: "2", width: "12", height: "3", rx: "0.5" }),
1633
+ /* @__PURE__ */ n("rect", { x: "2", y: "6.5", width: "12", height: "3", rx: "0.5" }),
1634
+ /* @__PURE__ */ n("rect", { x: "2", y: "11", width: "12", height: "3", rx: "0.5" }),
1635
+ /* @__PURE__ */ n("circle", { cx: "4", cy: "3.5", r: "0.5" }),
1636
+ /* @__PURE__ */ n("circle", { cx: "4", cy: "8", r: "0.5" }),
1637
+ /* @__PURE__ */ n("circle", { cx: "4", cy: "12.5", r: "0.5" })
1638
+ ] }), Ut = ({
1234
1639
  size: t = 16,
1235
- className: n = "",
1640
+ className: e = "",
1236
1641
  color: r = "currentColor"
1237
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: [
1238
- /* @__PURE__ */ e("ellipse", { cx: "8", cy: "3", rx: "5", ry: "2" }),
1239
- /* @__PURE__ */ e("path", { d: "M3 3V13C3 14.1 5.2 15 8 15C10.8 15 13 14.1 13 13V3" }),
1240
- /* @__PURE__ */ e("path", { d: "M3 8C3 9.1 5.2 10 8 10C10.8 10 13 9.1 13 8" })
1241
- ] }), rt = ({
1642
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1643
+ /* @__PURE__ */ n("ellipse", { cx: "8", cy: "3", rx: "5", ry: "2" }),
1644
+ /* @__PURE__ */ n("path", { d: "M3 3V13C3 14.1 5.2 15 8 15C10.8 15 13 14.1 13 13V3" }),
1645
+ /* @__PURE__ */ n("path", { d: "M3 8C3 9.1 5.2 10 8 10C10.8 10 13 9.1 13 8" })
1646
+ ] }), Vt = ({
1242
1647
  size: t = 16,
1243
- className: n = "",
1648
+ className: e = "",
1244
1649
  color: r = "currentColor"
1245
- }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: /* @__PURE__ */ e("path", { d: "M4.5 10C2.5 10 1 8.5 1 6.5C1 4.5 2.5 3 4.5 3C4.6 3 4.7 3 4.8 3.05C5.3 1.8 6.5 1 8 1C10 1 11.5 2.5 11.5 4.5C11.5 4.6 11.5 4.7 11.5 4.8C12.9 5.1 14 6.3 14 7.75C14 9.5 12.5 11 10.75 11H4.5Z" }) }), nt = ({
1650
+ }) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M4.5 10C2.5 10 1 8.5 1 6.5C1 4.5 2.5 3 4.5 3C4.6 3 4.7 3 4.8 3.05C5.3 1.8 6.5 1 8 1C10 1 11.5 2.5 11.5 4.5C11.5 4.6 11.5 4.7 11.5 4.8C12.9 5.1 14 6.3 14 7.75C14 9.5 12.5 11 10.75 11H4.5Z" }) }), Rt = ({
1246
1651
  size: t = 16,
1247
- className: n = "",
1652
+ className: e = "",
1248
1653
  color: r = "currentColor"
1249
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: [
1250
- /* @__PURE__ */ e("path", { d: "M0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v10.5A1.75 1.75 0 0114.25 15H1.75A1.75 1.75 0 010 13.25V2.75z" }),
1251
- /* @__PURE__ */ e(
1654
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1655
+ /* @__PURE__ */ n("path", { d: "M0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v10.5A1.75 1.75 0 0114.25 15H1.75A1.75 1.75 0 010 13.25V2.75z" }),
1656
+ /* @__PURE__ */ n(
1252
1657
  "path",
1253
1658
  {
1254
1659
  d: "M3 5.5L6 8L3 10.5",
@@ -1259,245 +1664,421 @@ const At = ({
1259
1664
  fill: "none"
1260
1665
  }
1261
1666
  ),
1262
- /* @__PURE__ */ e("line", { x1: "8", y1: "10.5", x2: "12", y2: "10.5", stroke: "white", strokeWidth: "1.5", strokeLinecap: "round" })
1263
- ] }), it = ({
1667
+ /* @__PURE__ */ n(
1668
+ "line",
1669
+ {
1670
+ x1: "8",
1671
+ y1: "10.5",
1672
+ x2: "12",
1673
+ y2: "10.5",
1674
+ stroke: "white",
1675
+ strokeWidth: "1.5",
1676
+ strokeLinecap: "round"
1677
+ }
1678
+ )
1679
+ ] }), Tt = ({
1264
1680
  size: t = 16,
1265
- className: n = "",
1681
+ className: e = "",
1266
1682
  color: r = "currentColor"
1267
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: [
1268
- /* @__PURE__ */ e("path", { d: "M4.75 7.5a3.25 3.25 0 116.5 0v3.75a3.25 3.25 0 01-6.5 0V7.5z" }),
1269
- /* @__PURE__ */ e("path", { d: "M5.75 7.5c0-.69.56-1.25 1.25-1.25h2c.69 0 1.25.56 1.25 1.25M4 5.5L2 4M12 5.5L14 4M4 9H1M15 9H12M4 12L2 13.5M12 12L14 13.5", stroke: r, strokeWidth: "1.5", fill: "none" }),
1270
- /* @__PURE__ */ e("ellipse", { cx: "8", cy: "4", rx: "2.5", ry: "1.5" })
1271
- ] }), lt = ({
1683
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1684
+ /* @__PURE__ */ n("path", { d: "M4.75 7.5a3.25 3.25 0 116.5 0v3.75a3.25 3.25 0 01-6.5 0V7.5z" }),
1685
+ /* @__PURE__ */ n(
1686
+ "path",
1687
+ {
1688
+ d: "M5.75 7.5c0-.69.56-1.25 1.25-1.25h2c.69 0 1.25.56 1.25 1.25M4 5.5L2 4M12 5.5L14 4M4 9H1M15 9H12M4 12L2 13.5M12 12L14 13.5",
1689
+ stroke: r,
1690
+ strokeWidth: "1.5",
1691
+ fill: "none"
1692
+ }
1693
+ ),
1694
+ /* @__PURE__ */ n("ellipse", { cx: "8", cy: "4", rx: "2.5", ry: "1.5" })
1695
+ ] }), Bt = ({
1272
1696
  size: t = 16,
1273
- className: n = "",
1697
+ className: e = "",
1274
1698
  color: r = "currentColor"
1275
- }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: /* @__PURE__ */ e("path", { d: "M5.28 3.72a.75.75 0 00-1.06 1.06L7.44 8l-3.22 3.22a.75.75 0 101.06 1.06l3.75-3.75a.75.75 0 000-1.06L5.28 3.72zM8.5 11.5a.75.75 0 000 1.5h5a.75.75 0 000-1.5h-5z" }) }), ct = ({
1699
+ }) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M5.28 3.72a.75.75 0 00-1.06 1.06L7.44 8l-3.22 3.22a.75.75 0 101.06 1.06l3.75-3.75a.75.75 0 000-1.06L5.28 3.72zM8.5 11.5a.75.75 0 000 1.5h5a.75.75 0 000-1.5h-5z" }) }), jt = ({
1276
1700
  size: t = 16,
1277
- className: n = "",
1701
+ className: e = "",
1278
1702
  color: r = "currentColor"
1279
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: [
1280
- /* @__PURE__ */ e("path", { d: "M8 0C6 0 4.5 2 3.5 5L1 7L4 8L5 11L7 8.5C9 7.5 11 6 13 3C14 2 15 0 16 0C16 0 14 2 13 3C11 5 9.5 6.5 8 7.5M10 4C10.552 4 11 3.552 11 3C11 2.448 10.552 2 10 2C9.448 2 9 2.448 9 3C9 3.552 9.448 4 10 4Z" }),
1281
- /* @__PURE__ */ e("path", { d: "M2 12C2 12 0 14 0 16C2 16 4 14 4 14" })
1282
- ] }), at = ({
1703
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1704
+ /* @__PURE__ */ n("path", { d: "M8 0C6 0 4.5 2 3.5 5L1 7L4 8L5 11L7 8.5C9 7.5 11 6 13 3C14 2 15 0 16 0C16 0 14 2 13 3C11 5 9.5 6.5 8 7.5M10 4C10.552 4 11 3.552 11 3C11 2.448 10.552 2 10 2C9.448 2 9 2.448 9 3C9 3.552 9.448 4 10 4Z" }),
1705
+ /* @__PURE__ */ n("path", { d: "M2 12C2 12 0 14 0 16C2 16 4 14 4 14" })
1706
+ ] }), Ht = ({
1283
1707
  size: t = 16,
1284
- className: n = "",
1708
+ className: e = "",
1285
1709
  color: r = "currentColor"
1286
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: [
1287
- /* @__PURE__ */ e("rect", { x: "6", y: "6", width: "4", height: "4", rx: "0.5" }),
1288
- /* @__PURE__ */ e("path", { d: "M4 4L2 2M4 12L2 14M12 4L14 2M12 12L14 14", strokeWidth: "1.5", stroke: r, strokeLinecap: "round" }),
1289
- /* @__PURE__ */ e("rect", { x: "1", y: "1", width: "1.5", height: "1.5" }),
1290
- /* @__PURE__ */ e("rect", { x: "13.5", y: "1", width: "1.5", height: "1.5" }),
1291
- /* @__PURE__ */ e("rect", { x: "1", y: "13.5", width: "1.5", height: "1.5" }),
1292
- /* @__PURE__ */ e("rect", { x: "13.5", y: "13.5", width: "1.5", height: "1.5" }),
1293
- /* @__PURE__ */ e("circle", { cx: "8", cy: "8", r: "1" })
1294
- ] }), ot = ({
1710
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1711
+ /* @__PURE__ */ n("rect", { x: "6", y: "6", width: "4", height: "4", rx: "0.5" }),
1712
+ /* @__PURE__ */ n(
1713
+ "path",
1714
+ {
1715
+ d: "M4 4L2 2M4 12L2 14M12 4L14 2M12 12L14 14",
1716
+ strokeWidth: "1.5",
1717
+ stroke: r,
1718
+ strokeLinecap: "round"
1719
+ }
1720
+ ),
1721
+ /* @__PURE__ */ n("rect", { x: "1", y: "1", width: "1.5", height: "1.5" }),
1722
+ /* @__PURE__ */ n("rect", { x: "13.5", y: "1", width: "1.5", height: "1.5" }),
1723
+ /* @__PURE__ */ n("rect", { x: "1", y: "13.5", width: "1.5", height: "1.5" }),
1724
+ /* @__PURE__ */ n("rect", { x: "13.5", y: "13.5", width: "1.5", height: "1.5" }),
1725
+ /* @__PURE__ */ n("circle", { cx: "8", cy: "8", r: "1" })
1726
+ ] }), Wt = ({
1295
1727
  size: t = 16,
1296
- className: n = "",
1728
+ className: e = "",
1297
1729
  color: r = "currentColor"
1298
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: [
1299
- /* @__PURE__ */ e("path", { d: "M8 1C4 1 2 3 2 6C2 8 2 10 3 11C3.5 11.5 4 12 5 12C5.5 12 6 11.5 6.5 10.5C7 9.5 7.5 9 8 9C8.5 9 9 9.5 9.5 10.5C10 11.5 10.5 12 11 12C12 12 12.5 11.5 13 11C14 10 14 8 14 6C14 3 12 1 8 1Z" }),
1300
- /* @__PURE__ */ e("ellipse", { cx: "6", cy: "5.5", rx: "1.5", ry: "2", fill: "white" }),
1301
- /* @__PURE__ */ e("ellipse", { cx: "10", cy: "5.5", rx: "1.5", ry: "2", fill: "white" }),
1302
- /* @__PURE__ */ e("circle", { cx: "6", cy: "5.5", r: "0.75", fill: r }),
1303
- /* @__PURE__ */ e("circle", { cx: "10", cy: "5.5", r: "0.75", fill: r })
1304
- ] }), st = ({
1730
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1731
+ /* @__PURE__ */ n("path", { d: "M8 1C4 1 2 3 2 6C2 8 2 10 3 11C3.5 11.5 4 12 5 12C5.5 12 6 11.5 6.5 10.5C7 9.5 7.5 9 8 9C8.5 9 9 9.5 9.5 10.5C10 11.5 10.5 12 11 12C12 12 12.5 11.5 13 11C14 10 14 8 14 6C14 3 12 1 8 1Z" }),
1732
+ /* @__PURE__ */ n("ellipse", { cx: "6", cy: "5.5", rx: "1.5", ry: "2", fill: "white" }),
1733
+ /* @__PURE__ */ n("ellipse", { cx: "10", cy: "5.5", rx: "1.5", ry: "2", fill: "white" }),
1734
+ /* @__PURE__ */ n("circle", { cx: "6", cy: "5.5", r: "0.75", fill: r }),
1735
+ /* @__PURE__ */ n("circle", { cx: "10", cy: "5.5", r: "0.75", fill: r })
1736
+ ] }), Ft = ({
1305
1737
  size: t = 16,
1306
- className: n = "",
1738
+ className: e = "",
1307
1739
  color: r = "currentColor"
1308
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: [
1309
- /* @__PURE__ */ e("circle", { cx: "8", cy: "8", r: "5" }),
1310
- /* @__PURE__ */ e("ellipse", { cx: "8", cy: "8", rx: "8", ry: "2.5", fill: "none", stroke: r, strokeWidth: "1", opacity: "0.6" }),
1311
- /* @__PURE__ */ e("circle", { cx: "6", cy: "6", r: "1", opacity: "0.4", fill: r === "currentColor" ? "white" : "#fff" })
1312
- ] }), dt = ({
1740
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1741
+ /* @__PURE__ */ n("circle", { cx: "8", cy: "8", r: "5" }),
1742
+ /* @__PURE__ */ n(
1743
+ "ellipse",
1744
+ {
1745
+ cx: "8",
1746
+ cy: "8",
1747
+ rx: "8",
1748
+ ry: "2.5",
1749
+ fill: "none",
1750
+ stroke: r,
1751
+ strokeWidth: "1",
1752
+ opacity: "0.6"
1753
+ }
1754
+ ),
1755
+ /* @__PURE__ */ n("circle", { cx: "6", cy: "6", r: "1", opacity: "0.4", fill: r === "currentColor" ? "white" : "#fff" })
1756
+ ] }), qt = ({
1313
1757
  size: t = 16,
1314
- className: n = "",
1758
+ className: e = "",
1315
1759
  color: r = "currentColor"
1316
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: [
1317
- /* @__PURE__ */ e("path", { d: "M1 8L6 6L14 2L12 10L10 8L8 14H6L8 8L1 8Z" }),
1318
- /* @__PURE__ */ e("path", { d: "M10 8L12 10", strokeWidth: "1.5", stroke: r })
1319
- ] }), ht = ({
1760
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1761
+ /* @__PURE__ */ n("path", { d: "M1 8L6 6L14 2L12 10L10 8L8 14H6L8 8L1 8Z" }),
1762
+ /* @__PURE__ */ n("path", { d: "M10 8L12 10", strokeWidth: "1.5", stroke: r })
1763
+ ] }), Kt = ({
1320
1764
  size: t = 16,
1321
- className: n = "",
1765
+ className: e = "",
1322
1766
  color: r = "currentColor"
1323
- }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: /* @__PURE__ */ e("path", { d: "M1.5 13.5V2.5a.5.5 0 01.5-.5h.5a.5.5 0 01.5.5v11a.5.5 0 01-.5.5H2a.5.5 0 01-.5-.5zM5 13.5V5.5a.5.5 0 01.5-.5H6a.5.5 0 01.5.5v8a.5.5 0 01-.5.5h-.5a.5.5 0 01-.5-.5zM8.5 13.5V7.5a.5.5 0 01.5-.5h.5a.5.5 0 01.5.5v6a.5.5 0 01-.5.5H9a.5.5 0 01-.5-.5zM12 13.5V3.5a.5.5 0 01.5-.5h.5a.5.5 0 01.5.5v10a.5.5 0 01-.5.5h-.5a.5.5 0 01-.5-.5z" }) }), ut = ({
1767
+ }) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M1.5 13.5V2.5a.5.5 0 01.5-.5h.5a.5.5 0 01.5.5v11a.5.5 0 01-.5.5H2a.5.5 0 01-.5-.5zM5 13.5V5.5a.5.5 0 01.5-.5H6a.5.5 0 01.5.5v8a.5.5 0 01-.5.5h-.5a.5.5 0 01-.5-.5zM8.5 13.5V7.5a.5.5 0 01.5-.5h.5a.5.5 0 01.5.5v6a.5.5 0 01-.5.5H9a.5.5 0 01-.5-.5zM12 13.5V3.5a.5.5 0 01.5-.5h.5a.5.5 0 01.5.5v10a.5.5 0 01-.5.5h-.5a.5.5 0 01-.5-.5z" }) }), Zt = ({
1324
1768
  size: t = 16,
1325
- className: n = "",
1769
+ className: e = "",
1326
1770
  color: r = "currentColor"
1327
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: [
1328
- /* @__PURE__ */ e("circle", { cx: "5", cy: "4", r: "2" }),
1329
- /* @__PURE__ */ e("circle", { cx: "11", cy: "4", r: "2" }),
1330
- /* @__PURE__ */ e("path", { d: "M1 14V12C1 10.5 2.5 9 5 9C7.5 9 9 10.5 9 12V14H1Z" }),
1331
- /* @__PURE__ */ e("path", { d: "M7 14V12C7 10.5 8.5 9 11 9C13.5 9 15 10.5 15 12V14H7Z" })
1332
- ] }), ft = ({
1771
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1772
+ /* @__PURE__ */ n("circle", { cx: "5", cy: "4", r: "2" }),
1773
+ /* @__PURE__ */ n("circle", { cx: "11", cy: "4", r: "2" }),
1774
+ /* @__PURE__ */ n("path", { d: "M1 14V12C1 10.5 2.5 9 5 9C7.5 9 9 10.5 9 12V14H1Z" }),
1775
+ /* @__PURE__ */ n("path", { d: "M7 14V12C7 10.5 8.5 9 11 9C13.5 9 15 10.5 15 12V14H7Z" })
1776
+ ] }), Gt = ({
1333
1777
  size: t = 16,
1334
- className: n = "",
1778
+ className: e = "",
1335
1779
  color: r = "currentColor"
1336
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: [
1337
- /* @__PURE__ */ e("path", { d: "M3 1.75C3 .784 3.784 0 4.75 0h5.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0113.25 16h-8.5A1.75 1.75 0 013 14.25V1.75z" }),
1338
- /* @__PURE__ */ e("path", { d: "M10 0v3.5c0 .275.225.5.5.5H14", fill: r === "currentColor" ? "white" : "#fff" })
1339
- ] }), gt = ({
1780
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1781
+ /* @__PURE__ */ n("path", { d: "M3 1.75C3 .784 3.784 0 4.75 0h5.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0113.25 16h-8.5A1.75 1.75 0 013 14.25V1.75z" }),
1782
+ /* @__PURE__ */ n("path", { d: "M10 0v3.5c0 .275.225.5.5.5H14", fill: r === "currentColor" ? "white" : "#fff" })
1783
+ ] }), Yt = ({
1340
1784
  size: t = 16,
1341
- className: n = "",
1785
+ className: e = "",
1342
1786
  color: r = "currentColor"
1343
- }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: /* @__PURE__ */ e("path", { d: "M4.75 0a.75.75 0 01.75.75V2h5V.75a.75.75 0 011.5 0V2h1.25c.966 0 1.75.784 1.75 1.75v10.5A1.75 1.75 0 0113.25 16H2.75A1.75 1.75 0 011 14.25V3.75C1 2.784 1.784 2 2.75 2H4V.75A.75.75 0 014.75 0zM2.5 7.5v6.75c0 .138.112.25.25.25h10.5a.25.25 0 00.25-.25V7.5h-11z" }) }), mt = ({
1787
+ }) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M4.75 0a.75.75 0 01.75.75V2h5V.75a.75.75 0 011.5 0V2h1.25c.966 0 1.75.784 1.75 1.75v10.5A1.75 1.75 0 0113.25 16H2.75A1.75 1.75 0 011 14.25V3.75C1 2.784 1.784 2 2.75 2H4V.75A.75.75 0 014.75 0zM2.5 7.5v6.75c0 .138.112.25.25.25h10.5a.25.25 0 00.25-.25V7.5h-11z" }) }), Jt = ({
1344
1788
  size: t = 16,
1345
- className: n = "",
1789
+ className: e = "",
1346
1790
  color: r = "currentColor"
1347
- }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: /* @__PURE__ */ e("path", { d: "M6.75 0A1.75 1.75 0 005 1.75V3H1.75C.784 3 0 3.784 0 4.75v8.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0016 13.25v-8.5A1.75 1.75 0 0014.25 3H11V1.75A1.75 1.75 0 009.25 0h-2.5zM9.5 3V1.75a.25.25 0 00-.25-.25h-2.5a.25.25 0 00-.25.25V3h3z" }) }), pt = ({
1791
+ }) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M6.75 0A1.75 1.75 0 005 1.75V3H1.75C.784 3 0 3.784 0 4.75v8.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0016 13.25v-8.5A1.75 1.75 0 0014.25 3H11V1.75A1.75 1.75 0 009.25 0h-2.5zM9.5 3V1.75a.25.25 0 00-.25-.25h-2.5a.25.25 0 00-.25.25V3h3z" }) }), Qt = ({
1348
1792
  size: t = 16,
1349
- className: n = "",
1793
+ className: e = "",
1350
1794
  color: r = "currentColor"
1351
- }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: /* @__PURE__ */ e("path", { d: "M11.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122V6A2.5 2.5 0 0110 8.5H6a1 1 0 00-1 1v1.128a2.251 2.251 0 11-1.5 0V5.372a2.25 2.25 0 111.5 0v1.836A2.492 2.492 0 016 7h4a1 1 0 001-1v-.628A2.25 2.25 0 019.5 3.25zM4.25 12a.75.75 0 100 1.5.75.75 0 000-1.5zM3.5 3.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0z" }) }), vt = ({
1795
+ }) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M11.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122V6A2.5 2.5 0 0110 8.5H6a1 1 0 00-1 1v1.128a2.251 2.251 0 11-1.5 0V5.372a2.25 2.25 0 111.5 0v1.836A2.492 2.492 0 016 7h4a1 1 0 001-1v-.628A2.25 2.25 0 019.5 3.25zM4.25 12a.75.75 0 100 1.5.75.75 0 000-1.5zM3.5 3.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0z" }) }), Xt = ({
1352
1796
  size: t = 16,
1353
- className: n = "",
1797
+ className: e = "",
1354
1798
  color: r = "currentColor"
1355
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: [
1356
- /* @__PURE__ */ e("path", { d: "M3.25 1A2.25 2.25 0 011 3.25v9.5A2.25 2.25 0 013.25 15h9.5A2.25 2.25 0 0115 12.75v-9.5A2.25 2.25 0 0012.75 1h-9.5zM2.5 3.25a.75.75 0 01.75-.75h9.5a.75.75 0 01.75.75v9.5a.75.75 0 01-.75.75h-9.5a.75.75 0 01-.75-.75v-9.5z" }),
1357
- /* @__PURE__ */ e("path", { d: "M8 4a.75.75 0 01.75.75v2.5h2.5a.75.75 0 010 1.5h-2.5v2.5a.75.75 0 01-1.5 0v-2.5h-2.5a.75.75 0 010-1.5h2.5v-2.5A.75.75 0 018 4z" })
1358
- ] }), bt = ({
1799
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1800
+ /* @__PURE__ */ n("path", { d: "M3.25 1A2.25 2.25 0 011 3.25v9.5A2.25 2.25 0 013.25 15h9.5A2.25 2.25 0 0115 12.75v-9.5A2.25 2.25 0 0012.75 1h-9.5zM2.5 3.25a.75.75 0 01.75-.75h9.5a.75.75 0 01.75.75v9.5a.75.75 0 01-.75.75h-9.5a.75.75 0 01-.75-.75v-9.5z" }),
1801
+ /* @__PURE__ */ n("path", { d: "M8 4a.75.75 0 01.75.75v2.5h2.5a.75.75 0 010 1.5h-2.5v2.5a.75.75 0 01-1.5 0v-2.5h-2.5a.75.75 0 010-1.5h2.5v-2.5A.75.75 0 018 4z" })
1802
+ ] }), er = ({
1359
1803
  size: t = 16,
1360
- className: n = "",
1804
+ className: e = "",
1361
1805
  color: r = "currentColor"
1362
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: [
1363
- /* @__PURE__ */ e("path", { d: "M6 1h4v1H6V1zM5.5 3h5L13 13c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2L5.5 3z" }),
1364
- /* @__PURE__ */ e("circle", { cx: "7", cy: "8", r: "1", fill: r === "currentColor" ? "white" : "#fff", opacity: "0.5" }),
1365
- /* @__PURE__ */ e("circle", { cx: "9", cy: "10", r: "0.75", fill: r === "currentColor" ? "white" : "#fff", opacity: "0.5" })
1366
- ] }), yt = ({
1806
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1807
+ /* @__PURE__ */ n("path", { d: "M6 1h4v1H6V1zM5.5 3h5L13 13c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2L5.5 3z" }),
1808
+ /* @__PURE__ */ n("circle", { cx: "7", cy: "8", r: "1", fill: r === "currentColor" ? "white" : "#fff", opacity: "0.5" }),
1809
+ /* @__PURE__ */ n(
1810
+ "circle",
1811
+ {
1812
+ cx: "9",
1813
+ cy: "10",
1814
+ r: "0.75",
1815
+ fill: r === "currentColor" ? "white" : "#fff",
1816
+ opacity: "0.5"
1817
+ }
1818
+ )
1819
+ ] }), tr = ({
1367
1820
  size: t = 16,
1368
- className: n = "",
1821
+ className: e = "",
1369
1822
  color: r = "currentColor"
1370
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: [
1371
- /* @__PURE__ */ e("path", { d: "M8 0L0 3v5c0 5 3 7.5 8 8 5-.5 8-3 8-8V3L8 0z" }),
1372
- /* @__PURE__ */ e("path", { d: "M7 10L4.5 7.5l1-1L7 8l3.5-3.5 1 1L7 10z", fill: r === "currentColor" ? "white" : "#fff" })
1373
- ] }), _t = ({
1823
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1824
+ /* @__PURE__ */ n("path", { d: "M8 0L0 3v5c0 5 3 7.5 8 8 5-.5 8-3 8-8V3L8 0z" }),
1825
+ /* @__PURE__ */ n(
1826
+ "path",
1827
+ {
1828
+ d: "M7 10L4.5 7.5l1-1L7 8l3.5-3.5 1 1L7 10z",
1829
+ fill: r === "currentColor" ? "white" : "#fff"
1830
+ }
1831
+ )
1832
+ ] }), rr = ({
1374
1833
  size: t = 16,
1375
- className: n = "",
1834
+ className: e = "",
1376
1835
  color: r = "currentColor"
1377
- }) => /* @__PURE__ */ d("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: [
1378
- /* @__PURE__ */ e("rect", { x: "1", y: "1", width: "9", height: "11", rx: "1" }),
1379
- /* @__PURE__ */ e("line", { x1: "3", y1: "4", x2: "7", y2: "4", stroke: r === "currentColor" ? "white" : "#fff", strokeWidth: "1" }),
1380
- /* @__PURE__ */ e("line", { x1: "3", y1: "6.5", x2: "7", y2: "6.5", stroke: r === "currentColor" ? "white" : "#fff", strokeWidth: "1" }),
1381
- /* @__PURE__ */ e("circle", { cx: "11", cy: "11", r: "3", fill: "none", stroke: r, strokeWidth: "1.5" }),
1382
- /* @__PURE__ */ e("line", { x1: "13", y1: "13", x2: "15.5", y2: "15.5", stroke: r, strokeWidth: "1.5", strokeLinecap: "round" })
1383
- ] }), wt = ({
1836
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1837
+ /* @__PURE__ */ n("rect", { x: "1", y: "1", width: "9", height: "11", rx: "1" }),
1838
+ /* @__PURE__ */ n(
1839
+ "line",
1840
+ {
1841
+ x1: "3",
1842
+ y1: "4",
1843
+ x2: "7",
1844
+ y2: "4",
1845
+ stroke: r === "currentColor" ? "white" : "#fff",
1846
+ strokeWidth: "1"
1847
+ }
1848
+ ),
1849
+ /* @__PURE__ */ n(
1850
+ "line",
1851
+ {
1852
+ x1: "3",
1853
+ y1: "6.5",
1854
+ x2: "7",
1855
+ y2: "6.5",
1856
+ stroke: r === "currentColor" ? "white" : "#fff",
1857
+ strokeWidth: "1"
1858
+ }
1859
+ ),
1860
+ /* @__PURE__ */ n("circle", { cx: "11", cy: "11", r: "3", fill: "none", stroke: r, strokeWidth: "1.5" }),
1861
+ /* @__PURE__ */ n(
1862
+ "line",
1863
+ {
1864
+ x1: "13",
1865
+ y1: "13",
1866
+ x2: "15.5",
1867
+ y2: "15.5",
1868
+ stroke: r,
1869
+ strokeWidth: "1.5",
1870
+ strokeLinecap: "round"
1871
+ }
1872
+ )
1873
+ ] }), nr = ({
1384
1874
  size: t = 16,
1385
- className: n = "",
1875
+ className: e = "",
1386
1876
  color: r = "currentColor"
1387
- }) => /* @__PURE__ */ e("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: n, children: /* @__PURE__ */ e("path", { d: "M4.48 7.27c.26.26 1.28 1.33 1.28 1.33l.56-.58-.88-.91 1.69-1.8s-.76-.74-.43-.45c.32-1.19.03-2.51-.87-3.44C4.93.5 3.66.2 2.52.51l1.93 2-.51 1.96-1.89.52-1.93-2C-.19 4.17.1 5.48 1 6.4c.94.98 2.29 1.26 3.48.87zm6.44 1.94l-2.33 2.3 3.84 3.98c.31.33.73.49 1.14.49.41 0 .82-.16 1.14-.49.63-.65.63-1.7 0-2.35l-3.79-3.93zM16 2.53L13.55 0 6.33 7.46l.88.91-4.31 4.46-.99.53-1.39 2.27.35.37 2.2-1.44.51-1.02L7.9 9.08l.88.91L16 2.53z" }) }), we = {
1388
- commit: He,
1389
- pr: Ae,
1390
- issue: Ee,
1391
- comment: ze,
1392
- star: Pe,
1393
- fork: Te,
1394
- merge: We,
1395
- release: Oe,
1396
- deploy: Ue
1397
- }, xe = {
1398
- unfold: Re,
1399
- fold: je,
1400
- close: Fe,
1401
- check: qe
1402
- }, Et = {
1403
- taichi: Ke,
1404
- meditation: Ze,
1405
- yoga: Ge
1406
- }, zt = {
1407
- dumbbell: Je,
1408
- running: Ye,
1409
- heartrate: Qe,
1410
- strength: Xe
1411
- }, Pt = {
1412
- server: et,
1413
- database: tt,
1414
- cloud: rt,
1415
- terminal: nt,
1416
- bug: it,
1417
- code: lt
1418
- }, Tt = {
1419
- rocket: ct,
1420
- satellite: at,
1421
- alien: ot,
1422
- planet: st,
1423
- telescope: dt
1424
- }, Wt = {
1425
- chart: ht,
1426
- meeting: ut,
1427
- document: ft,
1428
- calendar: gt,
1429
- briefcase: mt
1430
- }, Ot = {
1431
- gitbranch: pt,
1432
- prdraft: vt,
1433
- testing: bt,
1434
- deployment: yt,
1435
- review: _t,
1436
- build: wt
1437
- }, xt = (t) => {
1438
- const n = we[t] || we.commit;
1439
- return /* @__PURE__ */ e(n, { size: 16 });
1440
- }, ve = (t, n = 2) => {
1877
+ }) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: /* @__PURE__ */ n("path", { d: "M4.48 7.27c.26.26 1.28 1.33 1.28 1.33l.56-.58-.88-.91 1.69-1.8s-.76-.74-.43-.45c.32-1.19.03-2.51-.87-3.44C4.93.5 3.66.2 2.52.51l1.93 2-.51 1.96-1.89.52-1.93-2C-.19 4.17.1 5.48 1 6.4c.94.98 2.29 1.26 3.48.87zm6.44 1.94l-2.33 2.3 3.84 3.98c.31.33.73.49 1.14.49.41 0 .82-.16 1.14-.49.63-.65.63-1.7 0-2.35l-3.79-3.93zM16 2.53L13.55 0 6.33 7.46l.88.91-4.31 4.46-.99.53-1.39 2.27.35.37 2.2-1.44.51-1.02L7.9 9.08l.88.91L16 2.53z" }) }), Ce = {
1878
+ commit: vt,
1879
+ pr: gt,
1880
+ issue: yt,
1881
+ comment: bt,
1882
+ star: wt,
1883
+ fork: _t,
1884
+ merge: xt,
1885
+ release: $t,
1886
+ deploy: It
1887
+ }, ke = {
1888
+ unfold: Ct,
1889
+ fold: kt,
1890
+ close: St,
1891
+ check: Nt
1892
+ }, en = {
1893
+ taichi: Lt,
1894
+ meditation: Mt,
1895
+ yoga: At
1896
+ }, tn = {
1897
+ dumbbell: Pt,
1898
+ running: Et,
1899
+ heartrate: Dt,
1900
+ strength: zt
1901
+ }, rn = {
1902
+ server: Ot,
1903
+ database: Ut,
1904
+ cloud: Vt,
1905
+ terminal: Rt,
1906
+ bug: Tt,
1907
+ code: Bt
1908
+ }, nn = {
1909
+ rocket: jt,
1910
+ satellite: Ht,
1911
+ alien: Wt,
1912
+ planet: Ft,
1913
+ telescope: qt
1914
+ }, an = {
1915
+ chart: Kt,
1916
+ meeting: Zt,
1917
+ document: Gt,
1918
+ calendar: Yt,
1919
+ briefcase: Jt
1920
+ }, on = {
1921
+ gitbranch: Qt,
1922
+ prdraft: Xt,
1923
+ testing: er,
1924
+ deployment: tr,
1925
+ review: rr,
1926
+ build: nr
1927
+ };
1928
+ function ir(t, e = 640) {
1929
+ const [r, i] = te(!1);
1930
+ return ae(() => {
1931
+ const a = t?.current;
1932
+ if (!a)
1933
+ return;
1934
+ const m = () => {
1935
+ const l = a.clientWidth;
1936
+ l > 0 && i(l < e);
1937
+ };
1938
+ m();
1939
+ const s = new ResizeObserver(() => {
1940
+ m();
1941
+ });
1942
+ return s.observe(a), () => {
1943
+ s.disconnect();
1944
+ };
1945
+ }, [t, e]), r;
1946
+ }
1947
+ const Ze = Xe({
1948
+ density: "comfortable",
1949
+ showMeta: !0
1950
+ }), ar = ({ children: t, value: e }) => /* @__PURE__ */ n(Ze.Provider, { value: e, children: t });
1951
+ function or() {
1952
+ return et(Ze);
1953
+ }
1954
+ const sr = (t) => {
1955
+ const e = Ce[t] || Ce.commit;
1956
+ return /* @__PURE__ */ n(e, { size: 16 });
1957
+ }, lr = (t) => {
1958
+ const e = typeof t == "string" ? new Date(t) : t, i = (/* @__PURE__ */ new Date()).getTime() - e.getTime(), a = Math.floor(i / 1e3), m = Math.floor(a / 60), s = Math.floor(m / 60), l = Math.floor(s / 24);
1959
+ return a < 60 ? "just now" : m < 60 ? `${m}m ago` : s < 24 ? `${s}h ago` : l < 30 ? `${l}d ago` : e.toLocaleDateString();
1960
+ }, sn = ({
1961
+ event: t,
1962
+ expanded: e = !1,
1963
+ onToggle: r,
1964
+ expandable: i,
1965
+ isChild: a = !1,
1966
+ showTimeline: m = !1,
1967
+ density: s,
1968
+ showMeta: l,
1969
+ renderIcon: $,
1970
+ className: L = ""
1971
+ }) => {
1972
+ const k = or(), E = s ?? k.density, P = l ?? k.showMeta, c = i ?? !!t.description, _ = () => {
1973
+ c && r && r(t.id, !e);
1974
+ }, o = (g) => {
1975
+ c && r && (g.key === "Enter" || g.key === " ") && (g.preventDefault(), r(t.id, !e));
1976
+ }, d = [
1977
+ "uiforge-activity-item",
1978
+ `uiforge-activity-item--${E}`,
1979
+ a ? "uiforge-activity-item--child" : "",
1980
+ P ? "" : "uiforge-activity-item--hide-meta",
1981
+ L
1982
+ ].filter(Boolean).join(" "), u = [
1983
+ "uiforge-activity-item__header",
1984
+ c ? "uiforge-activity-item__header--clickable" : ""
1985
+ ].filter(Boolean).join(" ");
1986
+ return /* @__PURE__ */ y(
1987
+ "div",
1988
+ {
1989
+ className: d,
1990
+ "data-event-id": t.id,
1991
+ "data-density": E,
1992
+ "data-show-meta": P,
1993
+ children: [
1994
+ m && !a && /* @__PURE__ */ n("div", { className: "uiforge-activity-item__timeline-marker" }),
1995
+ /* @__PURE__ */ n("div", { className: "uiforge-activity-item__icon", children: $ ? $(t) : t.icon || sr(t.type) }),
1996
+ /* @__PURE__ */ y("div", { className: "uiforge-activity-item__content", children: [
1997
+ /* @__PURE__ */ y(
1998
+ "div",
1999
+ {
2000
+ className: u,
2001
+ onClick: _,
2002
+ onKeyDown: o,
2003
+ role: c ? "button" : void 0,
2004
+ tabIndex: c ? 0 : void 0,
2005
+ "aria-expanded": c ? e : void 0,
2006
+ children: [
2007
+ /* @__PURE__ */ n("div", { className: "uiforge-activity-item__title", children: t.title }),
2008
+ P && /* @__PURE__ */ n("div", { className: "uiforge-activity-item__timestamp", children: lr(t.timestamp) }),
2009
+ c && /* @__PURE__ */ n("div", { className: "uiforge-activity-item__toggle", children: e ? /* @__PURE__ */ n(ke.fold, { size: 16 }) : /* @__PURE__ */ n(ke.unfold, { size: 16 }) })
2010
+ ]
2011
+ }
2012
+ ),
2013
+ e && t.description && P && /* @__PURE__ */ n("div", { className: "uiforge-activity-item__description", children: t.description })
2014
+ ] })
2015
+ ]
2016
+ }
2017
+ );
2018
+ }, Fe = 400, cr = (t) => {
2019
+ const e = Ce[t] || Ce.commit;
2020
+ return /* @__PURE__ */ n(e, { size: 16 });
2021
+ }, Ee = (t, e = 2) => {
1441
2022
  if (t.length === 0) return [];
1442
2023
  const r = [];
1443
- let i = [], h = null;
1444
- return t.forEach((p, u) => {
1445
- h === p.type ? i.push(p) : (i.length >= n && h ? r.push(ke(i, h)) : i.forEach((f) => {
2024
+ let i = [], a = null;
2025
+ return t.forEach((m, s) => {
2026
+ a === m.type ? i.push(m) : (i.length >= e && a ? r.push(qe(i, a)) : i.forEach((l) => {
1446
2027
  r.push({
1447
- id: f.id.toString(),
1448
- type: f.type,
2028
+ id: l.id.toString(),
2029
+ type: l.type,
1449
2030
  count: 1,
1450
- title: f.title,
1451
- timestamp: new Date(f.timestamp),
1452
- icon: f.icon,
1453
- events: [f]
2031
+ title: l.title,
2032
+ timestamp: new Date(l.timestamp),
2033
+ icon: l.icon,
2034
+ events: [l]
1454
2035
  });
1455
- }), i = [p], h = p.type), u === t.length - 1 && (i.length >= n && h ? r.push(ke(i, h)) : i.forEach((f) => {
2036
+ }), i = [m], a = m.type), s === t.length - 1 && (i.length >= e && a ? r.push(qe(i, a)) : i.forEach((l) => {
1456
2037
  r.push({
1457
- id: f.id.toString(),
1458
- type: f.type,
2038
+ id: l.id.toString(),
2039
+ type: l.type,
1459
2040
  count: 1,
1460
- title: f.title,
1461
- timestamp: new Date(f.timestamp),
1462
- icon: f.icon,
1463
- events: [f]
2041
+ title: l.title,
2042
+ timestamp: new Date(l.timestamp),
2043
+ icon: l.icon,
2044
+ events: [l]
1464
2045
  });
1465
2046
  }));
1466
2047
  }), r;
1467
- }, ke = (t, n) => {
2048
+ }, qe = (t, e) => {
1468
2049
  const r = t.reduce(
1469
- (u, f) => {
1470
- const k = f.metadata?.repository || "unknown";
1471
- return u[k] || (u[k] = []), u[k].push(f), u;
2050
+ (s, l) => {
2051
+ const $ = l.metadata?.repository || "unknown";
2052
+ return s[$] || (s[$] = []), s[$].push(l), s;
1472
2053
  },
1473
2054
  {}
1474
- ), i = Object.entries(r), h = i.length > 1;
1475
- let p = "";
1476
- if (h)
1477
- p = `Created ${t.length} ${be(n)} in ${i.length} repositories`;
2055
+ ), i = Object.entries(r), a = i.length > 1;
2056
+ let m = "";
2057
+ if (a)
2058
+ m = `Created ${t.length} ${De(e)} in ${i.length} repositories`;
1478
2059
  else {
1479
- const u = i[0][0];
1480
- p = `Created ${t.length} ${be(n)}${u !== "unknown" ? ` in ${u}` : ""}`;
2060
+ const s = i[0][0];
2061
+ m = `Created ${t.length} ${De(e)}${s !== "unknown" ? ` in ${s}` : ""}`;
1481
2062
  }
1482
2063
  return {
1483
- id: `group-${n}-${t[0].id}`,
1484
- type: n,
2064
+ id: `group-${e}-${t[0].id}`,
2065
+ type: e,
1485
2066
  count: t.length,
1486
- title: p,
2067
+ title: m,
1487
2068
  timestamp: new Date(t[0].timestamp),
1488
2069
  icon: t[0].icon,
1489
2070
  events: t,
1490
- children: h ? i.map(([u, f]) => ({
1491
- id: `group-${n}-${u}`,
1492
- type: n,
1493
- count: f.length,
1494
- title: `Created ${f.length} ${be(n)} in ${u}`,
1495
- timestamp: new Date(f[0].timestamp),
1496
- icon: f[0].icon,
1497
- events: f
2071
+ children: a ? i.map(([s, l]) => ({
2072
+ id: `group-${e}-${s}`,
2073
+ type: e,
2074
+ count: l.length,
2075
+ title: `Created ${l.length} ${De(e)} in ${s}`,
2076
+ timestamp: new Date(l[0].timestamp),
2077
+ icon: l[0].icon,
2078
+ events: l
1498
2079
  })) : void 0
1499
2080
  };
1500
- }, be = (t) => ({
2081
+ }, De = (t) => ({
1501
2082
  pr: "pull requests",
1502
2083
  issue: "issues",
1503
2084
  commit: "commits",
@@ -1507,197 +2088,1080 @@ const At = ({
1507
2088
  merge: "merges",
1508
2089
  release: "releases",
1509
2090
  deploy: "deployments"
1510
- })[t] || `${t}s`, ye = (t) => {
2091
+ })[t] || `${t}s`, ze = (t) => {
1511
2092
  if (t.length === 0) return [];
1512
- const n = [];
2093
+ const e = [];
1513
2094
  let r = null;
1514
- return t.forEach((i, h) => {
2095
+ return t.forEach((i, a) => {
1515
2096
  if ("type" in i && i.type === "date-separator") {
1516
- n.push(i);
2097
+ e.push(i);
1517
2098
  return;
1518
2099
  }
1519
- const u = i.timestamp, f = `${u.getFullYear()}-${u.getMonth()}`;
1520
- if (f !== r) {
1521
- const k = {
1522
- id: `sep-${h}`,
2100
+ const s = i.timestamp, l = `${s.getFullYear()}-${s.getMonth()}`;
2101
+ if (l !== r) {
2102
+ const $ = {
2103
+ id: `sep-${a}`,
1523
2104
  type: "date-separator",
1524
- date: u,
1525
- label: kt(u)
2105
+ date: s,
2106
+ label: dr(s)
1526
2107
  };
1527
- n.push(k), r = f;
1528
- }
1529
- n.push(i);
1530
- }), n;
1531
- }, kt = (t) => t.toLocaleDateString("en-US", { month: "long", year: "numeric" }), Ct = (t) => {
1532
- const n = typeof t == "string" ? new Date(t) : t, i = (/* @__PURE__ */ new Date()).getTime() - n.getTime(), h = Math.floor(i / 1e3), p = Math.floor(h / 60), u = Math.floor(p / 60), f = Math.floor(u / 24);
1533
- return h < 60 ? "just now" : p < 60 ? `${p}m ago` : u < 24 ? `${u}h ago` : f < 30 ? `${f}d ago` : n.toLocaleDateString();
1534
- }, Ut = ({
2108
+ e.push($), r = l;
2109
+ }
2110
+ e.push(i);
2111
+ }), e;
2112
+ }, dr = (t) => t.toLocaleDateString("en-US", { month: "long", year: "numeric" }), ur = (t) => {
2113
+ const e = typeof t == "string" ? new Date(t) : t, i = (/* @__PURE__ */ new Date()).getTime() - e.getTime(), a = Math.floor(i / 1e3), m = Math.floor(a / 60), s = Math.floor(m / 60), l = Math.floor(s / 24);
2114
+ return a < 60 ? "just now" : m < 60 ? `${m}m ago` : s < 24 ? `${s}h ago` : l < 30 ? `${l}d ago` : e.toLocaleDateString();
2115
+ }, ln = ({
1535
2116
  events: t,
1536
- theme: n = "light",
2117
+ theme: e = "light",
1537
2118
  className: r = "",
1538
- showLoadMore: i = !0,
1539
- loading: h = !1,
1540
- onLoadMore: p,
1541
- pagination: u,
1542
- maxHeight: f,
1543
- showMoreThreshold: k = 100,
1544
- initiallyExpandedAll: Z = !1,
1545
- emptyMessage: H = "No activity to display",
1546
- onToggleExpand: F,
1547
- enableGrouping: s = !0,
1548
- groupingThreshold: S = 2,
1549
- showDateSeparators: D = !0,
1550
- showTimeline: q = !0,
1551
- scale: A = 1,
1552
- renderIcon: C,
1553
- renderEvent: z
2119
+ style: i,
2120
+ showLoadMore: a = !0,
2121
+ loading: m = !1,
2122
+ onLoadMore: s,
2123
+ pagination: l,
2124
+ maxHeight: $,
2125
+ showMoreThreshold: L = 100,
2126
+ initiallyExpandedAll: k = !1,
2127
+ emptyMessage: E = "No activity to display",
2128
+ onToggleExpand: P,
2129
+ enableGrouping: c = !0,
2130
+ groupingThreshold: _ = 2,
2131
+ showDateSeparators: o = !0,
2132
+ showTimeline: d = !0,
2133
+ scale: u,
2134
+ density: g = "comfortable",
2135
+ responsive: S = !0,
2136
+ compactBreakpointPx: O = 640,
2137
+ containerRef: C,
2138
+ showMeta: b,
2139
+ renderIcon: M,
2140
+ renderEvent: A,
2141
+ virtualization: U = !1,
2142
+ virtualItemHeight: R = 48
1554
2143
  }) => {
1555
- const [ie, X] = j(() => {
1556
- const c = /* @__PURE__ */ new Set();
1557
- return (s ? D ? ye(ve(t, S)) : ve(t, S) : t.map((_) => ({
1558
- id: _.id.toString(),
1559
- type: _.type,
2144
+ const [F, f] = te(() => {
2145
+ const v = /* @__PURE__ */ new Set();
2146
+ return (c ? o ? ze(Ee(t, _)) : Ee(t, _) : t.map((V) => ({
2147
+ id: V.id.toString(),
2148
+ type: V.type,
1560
2149
  count: 1,
1561
- title: _.title,
1562
- timestamp: new Date(_.timestamp),
1563
- icon: _.icon,
1564
- events: [_]
1565
- }))).forEach((_) => {
1566
- if ("events" in _ && _.type !== "date-separator") {
1567
- const M = _;
1568
- (Z || M.events.some((U) => U.initiallyExpanded)) && c.add(M.id), M.children && M.children.forEach((U) => {
1569
- (Z || U.events.some((m) => m.initiallyExpanded)) && c.add(U.id);
2150
+ title: V.title,
2151
+ timestamp: new Date(V.timestamp),
2152
+ icon: V.icon,
2153
+ events: [V]
2154
+ }))).forEach((V) => {
2155
+ if ("events" in V && V.type !== "date-separator") {
2156
+ const Q = V;
2157
+ (k || Q.events.some((h) => h.initiallyExpanded)) && v.add(Q.id), Q.children && Q.children.forEach((h) => {
2158
+ (k || h.events.some((z) => z.initiallyExpanded)) && v.add(h.id);
1570
2159
  });
1571
2160
  }
1572
- }), c;
1573
- }), [$, J] = j(!1), I = G(null), O = G(null), P = te(() => {
1574
- if (!s) {
1575
- const E = t.map((_) => ({
1576
- id: _.id.toString(),
1577
- type: _.type,
2161
+ }), v;
2162
+ }), [N, x] = te(!1), [w, se] = te(Fe), J = ne(null), ie = C || J, ee = ne(null), ce = ne(null), le = ir(S ? ie : null, O), j = oe(() => S && le && g === "comfortable" ? "compact" : g, [S, le, g]), he = oe(() => b !== void 0 ? b : !0, [b]), G = oe(() => {
2163
+ if (!c) {
2164
+ const D = t.map((V) => ({
2165
+ id: V.id.toString(),
2166
+ type: V.type,
1578
2167
  count: 1,
1579
- title: _.title,
1580
- timestamp: new Date(_.timestamp),
1581
- icon: _.icon,
1582
- events: [_]
2168
+ title: V.title,
2169
+ timestamp: new Date(V.timestamp),
2170
+ icon: V.icon,
2171
+ events: [V]
1583
2172
  }));
1584
- return D ? ye(E) : E;
1585
- }
1586
- const c = ve(t, S);
1587
- return D ? ye(c) : c;
1588
- }, [t, s, S, D]), a = L(() => {
1589
- if (!O.current || !i || !p) return;
1590
- const { scrollTop: c, scrollHeight: E, clientHeight: _ } = O.current, M = E - c - _;
1591
- J(M <= k);
1592
- }, [i, p, k]);
1593
- ne(() => {
1594
- const c = O.current;
1595
- if (c)
1596
- return c.addEventListener("scroll", a), a(), () => {
1597
- c.removeEventListener("scroll", a);
2173
+ return o ? ze(D) : D;
2174
+ }
2175
+ const v = Ee(t, _);
2176
+ return o ? ze(v) : v;
2177
+ }, [t, c, _, o]), re = B(() => {
2178
+ if (!ee.current || !a || !s) return;
2179
+ const { scrollTop: v, scrollHeight: D, clientHeight: V } = ee.current, Q = D - v - V;
2180
+ x(Q <= L);
2181
+ }, [a, s, L]), me = B(
2182
+ ({ scrollOffset: v }) => {
2183
+ if (!a || !s) return;
2184
+ const D = G.length * R, V = w, Q = D - v - V;
2185
+ x(Q <= L);
2186
+ },
2187
+ [a, s, L, G.length, R, w]
2188
+ );
2189
+ ae(() => {
2190
+ if (!U || !J.current) return;
2191
+ const v = () => {
2192
+ const V = J.current;
2193
+ if (V) {
2194
+ let Q = V.clientHeight || Fe;
2195
+ if ($) {
2196
+ const h = parseFloat($);
2197
+ !isNaN(h) && h > 0 && (Q = h);
2198
+ }
2199
+ se(Q);
2200
+ }
2201
+ };
2202
+ v();
2203
+ const D = new ResizeObserver(v);
2204
+ return D.observe(J.current), () => {
2205
+ D.disconnect();
2206
+ };
2207
+ }, [U, $]), ae(() => {
2208
+ const v = ee.current;
2209
+ if (v)
2210
+ return v.addEventListener("scroll", re), re(), () => {
2211
+ v.removeEventListener("scroll", re);
1598
2212
  };
1599
- }, [a]);
1600
- const v = L(
1601
- (c, E) => {
1602
- X((_) => {
1603
- const M = new Set(_), U = M.has(c);
1604
- return U ? M.delete(c) : M.add(c), F?.(E, !U), M;
2213
+ }, [re]);
2214
+ const I = B(
2215
+ (v, D) => {
2216
+ f((V) => {
2217
+ const Q = new Set(V), h = Q.has(v);
2218
+ return h ? Q.delete(v) : Q.add(v), P?.(D, !h), Q;
1605
2219
  });
1606
2220
  },
1607
- [F]
1608
- ), g = (c, E = !1) => {
1609
- const _ = ie.has(c.id), M = c.children && c.children.length > 0, U = c.count > 1, m = c.count === 1 && c.events[0]?.description, l = U || M || m, x = c.count === 1 && c.events.length === 1 ? c.events[0].id : c.id;
1610
- return z && c.count === 1 && c.events.length === 1 ? /* @__PURE__ */ d(
2221
+ [P]
2222
+ ), q = (v, D = !1) => {
2223
+ const V = F.has(v.id), Q = v.children && v.children.length > 0, h = v.count > 1, z = v.count === 1 && v.events[0]?.description, X = h || Q || z, Y = v.count === 1 && v.events.length === 1 ? v.events[0].id : v.id;
2224
+ return A && v.count === 1 && v.events.length === 1 ? /* @__PURE__ */ y(
1611
2225
  "div",
1612
2226
  {
1613
- className: `activity-stream__item ${E ? "activity-stream__item--child" : ""}`,
1614
- "data-event-id": c.id,
2227
+ className: `activity-stream__item ${D ? "activity-stream__item--child" : ""}`,
2228
+ "data-event-id": v.id,
1615
2229
  children: [
1616
- q && !E && /* @__PURE__ */ e("div", { className: "activity-stream__timeline-marker" }),
1617
- z(c.events[0])
2230
+ d && !D && /* @__PURE__ */ n("div", { className: "activity-stream__timeline-marker" }),
2231
+ A(v.events[0])
1618
2232
  ]
1619
2233
  },
1620
- c.id
1621
- ) : /* @__PURE__ */ d(
2234
+ v.id
2235
+ ) : /* @__PURE__ */ y(
1622
2236
  "div",
1623
2237
  {
1624
- className: `activity-stream__item ${E ? "activity-stream__item--child" : ""}`,
1625
- "data-event-id": c.id,
2238
+ className: `activity-stream__item ${D ? "activity-stream__item--child" : ""}`,
2239
+ "data-event-id": v.id,
1626
2240
  children: [
1627
- q && !E && /* @__PURE__ */ e("div", { className: "activity-stream__timeline-marker" }),
1628
- /* @__PURE__ */ e("div", { className: "activity-stream__icon", children: C && c.events.length === 1 ? C(c.events[0]) : c.icon || xt(c.type) }),
1629
- /* @__PURE__ */ d("div", { className: "activity-stream__content", children: [
1630
- /* @__PURE__ */ d(
2241
+ d && !D && /* @__PURE__ */ n("div", { className: "activity-stream__timeline-marker" }),
2242
+ /* @__PURE__ */ n("div", { className: "activity-stream__icon", children: M && v.events.length === 1 ? M(v.events[0]) : v.icon || cr(v.type) }),
2243
+ /* @__PURE__ */ y("div", { className: "activity-stream__content", children: [
2244
+ /* @__PURE__ */ y(
1631
2245
  "div",
1632
2246
  {
1633
- className: `activity-stream__header ${l ? "activity-stream__header--clickable" : ""}`,
1634
- onClick: () => l && v(c.id, x),
1635
- onKeyDown: (w) => {
1636
- l && (w.key === "Enter" || w.key === " ") && (w.preventDefault(), v(c.id, x));
2247
+ className: `activity-stream__header ${X ? "activity-stream__header--clickable" : ""}`,
2248
+ onClick: () => X && I(v.id, Y),
2249
+ onKeyDown: (H) => {
2250
+ X && (H.key === "Enter" || H.key === " ") && (H.preventDefault(), I(v.id, Y));
1637
2251
  },
1638
- role: l ? "button" : void 0,
1639
- tabIndex: l ? 0 : void 0,
1640
- "aria-expanded": l ? _ : void 0,
2252
+ role: X ? "button" : void 0,
2253
+ tabIndex: X ? 0 : void 0,
2254
+ "aria-expanded": X ? V : void 0,
1641
2255
  children: [
1642
- /* @__PURE__ */ e("div", { className: "activity-stream__title", children: c.title }),
1643
- /* @__PURE__ */ e("div", { className: "activity-stream__timestamp", children: Ct(c.timestamp) }),
1644
- l && /* @__PURE__ */ e("div", { className: "activity-stream__toggle", children: _ ? /* @__PURE__ */ e(xe.fold, { size: 16 }) : /* @__PURE__ */ e(xe.unfold, { size: 16 }) })
2256
+ /* @__PURE__ */ n("div", { className: "activity-stream__title", children: v.title }),
2257
+ /* @__PURE__ */ n("div", { className: "activity-stream__timestamp", children: ur(v.timestamp) }),
2258
+ X && /* @__PURE__ */ n("div", { className: "activity-stream__toggle", children: V ? /* @__PURE__ */ n(ke.fold, { size: 16 }) : /* @__PURE__ */ n(ke.unfold, { size: 16 }) })
1645
2259
  ]
1646
2260
  }
1647
2261
  ),
1648
- _ && M && c.children && /* @__PURE__ */ e("div", { className: "activity-stream__children", children: c.children.map((w) => g(w, !0)) }),
1649
- _ && !M && c.events.length > 1 && /* @__PURE__ */ e("div", { className: "activity-stream__events-list", children: c.events.map(
1650
- (w) => z ? /* @__PURE__ */ e("div", { className: "activity-stream__event-item", children: z(w) }, w.id) : /* @__PURE__ */ d("div", { className: "activity-stream__event-item", children: [
1651
- /* @__PURE__ */ e("div", { className: "activity-stream__event-title", children: w.title }),
1652
- w.description && /* @__PURE__ */ e("div", { className: "activity-stream__event-description", children: w.description })
1653
- ] }, w.id)
2262
+ V && Q && v.children && /* @__PURE__ */ n("div", { className: "activity-stream__children", children: v.children.map((H) => q(H, !0)) }),
2263
+ V && !Q && v.events.length > 1 && /* @__PURE__ */ n("div", { className: "activity-stream__events-list", children: v.events.map(
2264
+ (H) => A ? /* @__PURE__ */ n("div", { className: "activity-stream__event-item", children: A(H) }, H.id) : /* @__PURE__ */ y("div", { className: "activity-stream__event-item", children: [
2265
+ /* @__PURE__ */ n("div", { className: "activity-stream__event-title", children: H.title }),
2266
+ H.description && /* @__PURE__ */ n("div", { className: "activity-stream__event-description", children: H.description })
2267
+ ] }, H.id)
1654
2268
  ) }),
1655
- _ && c.count === 1 && c.events[0].description && /* @__PURE__ */ e("div", { className: "activity-stream__description", children: c.events[0].description })
2269
+ V && v.count === 1 && v.events[0].description && /* @__PURE__ */ n("div", { className: "activity-stream__description", children: v.events[0].description })
1656
2270
  ] })
1657
2271
  ]
1658
2272
  },
1659
- c.id
2273
+ v.id
1660
2274
  );
1661
- }, y = (c) => /* @__PURE__ */ d("div", { className: "activity-stream__date-separator", children: [
1662
- /* @__PURE__ */ e("div", { className: "activity-stream__date-label", children: c.label }),
1663
- /* @__PURE__ */ e("div", { className: "activity-stream__date-line" })
1664
- ] }, c.id), K = u?.hasMore !== void 0 ? u.hasMore : u?.totalItems !== void 0 ? t.length < u.totalItems : !0, T = "activity-stream", le = `${T}--${n}`, re = q ? `${T}--with-timeline` : "";
1665
- let Q = `${T} ${le} ${re} ${r}`.trim();
1666
- return A && A < 1 && (Q = `${Q} ${T}--compact`), A && A > 1 && (Q = `${Q} ${T}--spacious`), /* @__PURE__ */ e("div", { ref: I, className: Q, "data-theme": n, children: /* @__PURE__ */ d(
2275
+ }, p = B(
2276
+ (v) => {
2277
+ if ("type" in v && v.type === "date-separator") {
2278
+ const D = v;
2279
+ return /* @__PURE__ */ y("div", { className: "activity-stream__date-separator", children: [
2280
+ /* @__PURE__ */ n("div", { className: "activity-stream__date-label", children: D.label }),
2281
+ /* @__PURE__ */ n("div", { className: "activity-stream__date-line" })
2282
+ ] }, D.id);
2283
+ }
2284
+ return q(v);
2285
+ },
2286
+ // Intentionally omitting renderGroupedEvent from dependencies:
2287
+ // renderGroupedEvent is an inline function that changes on every render, but its behavior
2288
+ // only depends on these stable values. Including it would cause unnecessary re-renders.
2289
+ // eslint-disable-next-line react-hooks/exhaustive-deps
2290
+ [F, d, M, A, I]
2291
+ ), T = (v) => /* @__PURE__ */ y("div", { className: "activity-stream__date-separator", children: [
2292
+ /* @__PURE__ */ n("div", { className: "activity-stream__date-label", children: v.label }),
2293
+ /* @__PURE__ */ n("div", { className: "activity-stream__date-line" })
2294
+ ] }, v.id), W = B(
2295
+ ({ index: v, style: D }) => {
2296
+ const V = G[v];
2297
+ return V ? /* @__PURE__ */ n("div", { style: D, className: "activity-stream__virtual-row", children: p(V) }) : null;
2298
+ },
2299
+ [G, p]
2300
+ ), Z = l?.hasMore !== void 0 ? l.hasMore : l?.totalItems !== void 0 ? t.length < l.totalItems : !0, de = "activity-stream", K = `${de}--${e}`, fe = d ? `${de}--with-timeline` : "", ge = `${de}--${j}`;
2301
+ let ue = `${de} ${K} ${fe} ${ge} ${r}`.trim();
2302
+ u !== void 0 && u < 1 && (ue = `${ue} ${de}--scale-compact`), u !== void 0 && u > 1 && (ue = `${ue} ${de}--scale-spacious`);
2303
+ const Se = $ ? { maxHeight: $ } : void 0, _e = u !== void 0 ? { "--activity-stream-scale": u } : {};
2304
+ return /* @__PURE__ */ n(ar, { value: { density: j, showMeta: he }, children: /* @__PURE__ */ n(
1667
2305
  "div",
1668
2306
  {
1669
- ref: O,
1670
- className: "activity-stream__container",
1671
- style: {
1672
- ...f ? { maxHeight: f } : void 0,
1673
- ...{ "--activity-stream-scale": A }
1674
- },
1675
- children: [
1676
- P.length === 0 ? /* @__PURE__ */ e("div", { className: "activity-stream__empty", children: H }) : /* @__PURE__ */ e("div", { className: "activity-stream__items", children: P.map(
1677
- (c) => "type" in c && c.type === "date-separator" ? y(c) : g(c)
1678
- ) }),
1679
- h && /* @__PURE__ */ d("div", { className: "activity-stream__loading", children: [
1680
- /* @__PURE__ */ e("div", { className: "activity-stream__spinner" }),
1681
- /* @__PURE__ */ e("span", { children: "Loading..." })
1682
- ] }),
1683
- i && !h && K && p && /* @__PURE__ */ e(
2307
+ ref: J,
2308
+ className: `${ue}${U ? " activity-stream--virtualized" : ""}`,
2309
+ "data-theme": e,
2310
+ "data-density": j,
2311
+ "data-show-meta": he,
2312
+ "data-virtualized": U,
2313
+ style: i,
2314
+ children: U ? (
2315
+ // Virtualized rendering with react-window
2316
+ /* @__PURE__ */ y(
1684
2317
  "div",
1685
2318
  {
1686
- className: `activity-stream__load-more ${$ ? "activity-stream__load-more--visible" : ""}`,
1687
- onClick: p,
1688
- onKeyDown: (c) => {
1689
- (c.key === "Enter" || c.key === " ") && (c.preventDefault(), p());
2319
+ className: "activity-stream__container activity-stream__container--virtualized",
2320
+ style: _e,
2321
+ children: [
2322
+ G.length === 0 ? /* @__PURE__ */ n("div", { className: "activity-stream__empty", children: E }) : /* @__PURE__ */ n(
2323
+ ft,
2324
+ {
2325
+ ref: ce,
2326
+ className: "activity-stream__items activity-stream__items--virtualized",
2327
+ height: w,
2328
+ itemCount: G.length,
2329
+ itemSize: R,
2330
+ width: "100%",
2331
+ onScroll: me,
2332
+ children: W
2333
+ }
2334
+ ),
2335
+ m && /* @__PURE__ */ y("div", { className: "activity-stream__loading", children: [
2336
+ /* @__PURE__ */ n("div", { className: "activity-stream__spinner" }),
2337
+ /* @__PURE__ */ n("span", { children: "Loading..." })
2338
+ ] }),
2339
+ a && !m && Z && s && /* @__PURE__ */ n(
2340
+ "div",
2341
+ {
2342
+ className: `activity-stream__load-more ${N ? "activity-stream__load-more--visible" : ""}`,
2343
+ onClick: s,
2344
+ onKeyDown: (v) => {
2345
+ (v.key === "Enter" || v.key === " ") && (v.preventDefault(), s());
2346
+ },
2347
+ role: "button",
2348
+ tabIndex: 0,
2349
+ "aria-label": "Load more activities",
2350
+ children: "Show more"
2351
+ }
2352
+ )
2353
+ ]
2354
+ }
2355
+ )
2356
+ ) : (
2357
+ // Standard rendering without virtualization
2358
+ /* @__PURE__ */ y(
2359
+ "div",
2360
+ {
2361
+ ref: ee,
2362
+ className: "activity-stream__container",
2363
+ style: {
2364
+ ...Se,
2365
+ ..._e
1690
2366
  },
1691
- role: "button",
1692
- tabIndex: 0,
1693
- "aria-label": "Load more activities",
1694
- children: "Show more"
2367
+ children: [
2368
+ G.length === 0 ? /* @__PURE__ */ n("div", { className: "activity-stream__empty", children: E }) : /* @__PURE__ */ n("div", { className: "activity-stream__items", children: G.map(
2369
+ (v) => "type" in v && v.type === "date-separator" ? T(v) : q(v)
2370
+ ) }),
2371
+ m && /* @__PURE__ */ y("div", { className: "activity-stream__loading", children: [
2372
+ /* @__PURE__ */ n("div", { className: "activity-stream__spinner" }),
2373
+ /* @__PURE__ */ n("span", { children: "Loading..." })
2374
+ ] }),
2375
+ a && !m && Z && s && /* @__PURE__ */ n(
2376
+ "div",
2377
+ {
2378
+ className: `activity-stream__load-more ${N ? "activity-stream__load-more--visible" : ""}`,
2379
+ onClick: s,
2380
+ onKeyDown: (v) => {
2381
+ (v.key === "Enter" || v.key === " ") && (v.preventDefault(), s());
2382
+ },
2383
+ role: "button",
2384
+ tabIndex: 0,
2385
+ "aria-label": "Load more activities",
2386
+ children: "Show more"
2387
+ }
2388
+ )
2389
+ ]
1695
2390
  }
1696
2391
  )
1697
- ]
2392
+ )
1698
2393
  }
1699
2394
  ) });
1700
- }, $t = () => /* @__PURE__ */ d(
2395
+ }, hr = {
2396
+ name: "youtube",
2397
+ displayName: "YouTube",
2398
+ domains: ["youtube.com", "youtu.be", "youtube-nocookie.com"],
2399
+ tier: "major",
2400
+ supportsAutoplay: !0,
2401
+ supportsApi: !0,
2402
+ extractVideoId: (t) => {
2403
+ try {
2404
+ const e = new URL(t);
2405
+ return e.hostname.replace("www.", "") === "youtu.be" ? e.pathname.slice(1).split("?")[0] : e.searchParams.has("v") ? e.searchParams.get("v") : e.pathname.startsWith("/embed/") || e.pathname.startsWith("/v/") ? e.pathname.split("/")[2] : null;
2406
+ } catch {
2407
+ return null;
2408
+ }
2409
+ },
2410
+ getEmbedUrl: (t, e = {}) => {
2411
+ const r = new URLSearchParams();
2412
+ e.autoplay && r.set("autoplay", "1"), e.muted && r.set("mute", "1"), e.loop && (r.set("loop", "1"), r.set("playlist", t)), e.startTime && r.set("start", String(e.startTime)), e.controls === !1 && r.set("controls", "0");
2413
+ const i = "https://www.youtube.com", a = r.toString();
2414
+ return `${i}/embed/${t}${a ? `?${a}` : ""}`;
2415
+ }
2416
+ }, mr = {
2417
+ name: "vimeo",
2418
+ displayName: "Vimeo",
2419
+ domains: ["vimeo.com"],
2420
+ tier: "major",
2421
+ supportsAutoplay: !0,
2422
+ supportsApi: !0,
2423
+ extractVideoId: (t) => {
2424
+ try {
2425
+ const e = new URL(t), r = e.hostname.replace("www.", "");
2426
+ if (r !== "vimeo.com" && r !== "player.vimeo.com")
2427
+ return null;
2428
+ if (e.pathname.startsWith("/video/"))
2429
+ return e.pathname.split("/")[2];
2430
+ const i = e.pathname.split("/").filter(Boolean);
2431
+ if (i.length > 0) {
2432
+ const a = i[0];
2433
+ if (/^\d+$/.test(a))
2434
+ return a;
2435
+ }
2436
+ return null;
2437
+ } catch {
2438
+ return null;
2439
+ }
2440
+ },
2441
+ getEmbedUrl: (t, e = {}) => {
2442
+ const r = new URLSearchParams();
2443
+ e.autoplay && r.set("autoplay", "1"), e.muted && r.set("muted", "1"), e.loop && r.set("loop", "1"), e.startTime && r.set("t", `${e.startTime}s`), e.controls === !1 && r.set("controls", "0");
2444
+ const i = r.toString();
2445
+ return `https://player.vimeo.com/video/${t}${i ? `?${i}` : ""}`;
2446
+ }
2447
+ }, pr = {
2448
+ name: "dailymotion",
2449
+ displayName: "Dailymotion",
2450
+ domains: ["dailymotion.com", "dai.ly"],
2451
+ tier: "major",
2452
+ supportsAutoplay: !0,
2453
+ supportsApi: !0,
2454
+ extractVideoId: (t) => {
2455
+ try {
2456
+ const e = new URL(t), r = e.hostname.replace("www.", "");
2457
+ if (r === "dai.ly")
2458
+ return e.pathname.slice(1).split("?")[0];
2459
+ if (r === "dailymotion.com") {
2460
+ if (e.pathname.startsWith("/video/"))
2461
+ return e.pathname.split("/")[2].split("_")[0];
2462
+ if (e.pathname.startsWith("/embed/video/"))
2463
+ return e.pathname.split("/")[3].split("?")[0];
2464
+ }
2465
+ return null;
2466
+ } catch {
2467
+ return null;
2468
+ }
2469
+ },
2470
+ getEmbedUrl: (t, e = {}) => {
2471
+ const r = new URLSearchParams();
2472
+ e.autoplay && r.set("autoplay", "1"), e.muted && r.set("mute", "1"), e.loop && r.set("loop", "1"), e.startTime && r.set("start", String(e.startTime)), e.controls === !1 && r.set("controls", "0");
2473
+ const i = r.toString();
2474
+ return `https://www.dailymotion.com/embed/video/${t}${i ? `?${i}` : ""}`;
2475
+ }
2476
+ }, fr = {
2477
+ name: "twitch",
2478
+ displayName: "Twitch",
2479
+ domains: ["twitch.tv", "clips.twitch.tv"],
2480
+ tier: "major",
2481
+ supportsAutoplay: !0,
2482
+ supportsApi: !0,
2483
+ extractVideoId: (t) => {
2484
+ try {
2485
+ const e = new URL(t);
2486
+ if (e.hostname.replace("www.", "") === "clips.twitch.tv")
2487
+ return `clip:${e.pathname.slice(1)}`;
2488
+ if (e.pathname.startsWith("/videos/"))
2489
+ return `video:${e.pathname.split("/")[2]}`;
2490
+ const i = e.pathname.match(/\/([^/]+)\/clip\/([^/?]+)/);
2491
+ return i ? `clip:${i[2]}` : null;
2492
+ } catch {
2493
+ return null;
2494
+ }
2495
+ },
2496
+ getEmbedUrl: (t, e = {}) => {
2497
+ const r = new URLSearchParams(), i = typeof window < "u" ? window.location.hostname : "localhost";
2498
+ r.set("parent", i), e.autoplay && r.set("autoplay", "true"), e.muted && r.set("muted", "true");
2499
+ const a = r.toString();
2500
+ return t.startsWith("video:") ? `https://player.twitch.tv/?video=${t.slice(6)}&${a}` : t.startsWith("clip:") ? `https://clips.twitch.tv/embed?clip=${t.slice(5)}&${a}` : "";
2501
+ }
2502
+ }, vr = {
2503
+ name: "kick",
2504
+ displayName: "Kick",
2505
+ domains: ["kick.com"],
2506
+ tier: "major",
2507
+ supportsAutoplay: !1,
2508
+ supportsApi: !1,
2509
+ extractVideoId: (t) => {
2510
+ try {
2511
+ const e = new URL(t);
2512
+ if (e.hostname.replace("www.", "") !== "kick.com")
2513
+ return null;
2514
+ const i = e.pathname.match(/\/video\/([a-zA-Z0-9-]+)/);
2515
+ return i ? i[1] : null;
2516
+ } catch {
2517
+ return null;
2518
+ }
2519
+ },
2520
+ getEmbedUrl: (t) => `https://player.kick.com/video/${t}`
2521
+ }, gr = {
2522
+ name: "rumble",
2523
+ displayName: "Rumble",
2524
+ domains: ["rumble.com"],
2525
+ tier: "major",
2526
+ supportsAutoplay: !0,
2527
+ supportsApi: !1,
2528
+ extractVideoId: (t) => {
2529
+ try {
2530
+ const e = new URL(t);
2531
+ if (e.hostname.replace("www.", "") !== "rumble.com")
2532
+ return null;
2533
+ if (e.pathname.startsWith("/embed/"))
2534
+ return e.pathname.split("/")[2].split("?")[0];
2535
+ const i = e.pathname.match(/\/([a-z0-9]+)-/);
2536
+ return i ? i[1] : null;
2537
+ } catch {
2538
+ return null;
2539
+ }
2540
+ },
2541
+ getEmbedUrl: (t, e = {}) => {
2542
+ const r = new URLSearchParams();
2543
+ e.autoplay && r.set("autoplay", "2");
2544
+ const i = r.toString();
2545
+ return `https://rumble.com/embed/${t}${i ? `?${i}` : ""}`;
2546
+ }
2547
+ }, yr = {
2548
+ name: "odysee",
2549
+ displayName: "Odysee",
2550
+ domains: ["odysee.com"],
2551
+ tier: "major",
2552
+ supportsAutoplay: !0,
2553
+ supportsApi: !1,
2554
+ extractVideoId: (t) => {
2555
+ try {
2556
+ const e = new URL(t);
2557
+ if (e.hostname.replace("www.", "") !== "odysee.com")
2558
+ return null;
2559
+ const i = e.pathname.match(/\$\/embed\/(.+)/);
2560
+ if (i)
2561
+ return i[1];
2562
+ const a = e.pathname.slice(1);
2563
+ return a.startsWith("@") ? a : null;
2564
+ } catch {
2565
+ return null;
2566
+ }
2567
+ },
2568
+ getEmbedUrl: (t) => `https://odysee.com/$/embed/${t}`
2569
+ }, br = {
2570
+ name: "bitchute",
2571
+ displayName: "BitChute",
2572
+ domains: ["bitchute.com"],
2573
+ tier: "major",
2574
+ supportsAutoplay: !1,
2575
+ supportsApi: !1,
2576
+ extractVideoId: (t) => {
2577
+ try {
2578
+ const e = new URL(t);
2579
+ if (e.hostname.replace("www.", "") !== "bitchute.com")
2580
+ return null;
2581
+ const i = e.pathname.match(/\/(video|embed)\/([a-zA-Z0-9]+)/);
2582
+ return i ? i[2] : null;
2583
+ } catch {
2584
+ return null;
2585
+ }
2586
+ },
2587
+ getEmbedUrl: (t) => `https://www.bitchute.com/embed/${t}/`
2588
+ }, wr = {
2589
+ name: "vk",
2590
+ displayName: "VK Video",
2591
+ domains: ["vk.com"],
2592
+ tier: "major",
2593
+ supportsAutoplay: !0,
2594
+ supportsApi: !1,
2595
+ extractVideoId: (t) => {
2596
+ try {
2597
+ const e = new URL(t);
2598
+ if (e.hostname.replace("www.", "") !== "vk.com")
2599
+ return null;
2600
+ const i = e.searchParams.get("z");
2601
+ if (i && i.startsWith("video"))
2602
+ return i.replace("video", "");
2603
+ const a = e.pathname.match(/\/video(-?\d+_\d+)/);
2604
+ return a ? a[1] : null;
2605
+ } catch {
2606
+ return null;
2607
+ }
2608
+ },
2609
+ getEmbedUrl: (t, e = {}) => {
2610
+ const r = new URLSearchParams();
2611
+ e.autoplay && r.set("autoplay", "1");
2612
+ const i = t.split("_");
2613
+ if (i.length < 2)
2614
+ return console.error("VK video ID must be in format OWNER_ID_VIDEO_ID"), "";
2615
+ const a = r.toString();
2616
+ return `https://vk.com/video_ext.php?oid=${i[0]}&id=${i[1]}${a ? `&${a}` : ""}`;
2617
+ }
2618
+ }, _r = {
2619
+ name: "bilibili",
2620
+ displayName: "Bilibili",
2621
+ domains: ["bilibili.com"],
2622
+ tier: "major",
2623
+ supportsAutoplay: !1,
2624
+ supportsApi: !1,
2625
+ extractVideoId: (t) => {
2626
+ try {
2627
+ const e = new URL(t), r = e.hostname.replace("www.", "");
2628
+ if (r !== "bilibili.com" && r !== "www.bilibili.com")
2629
+ return null;
2630
+ const i = e.pathname.match(/\/video\/((?:BV|av)[a-zA-Z0-9]+)/);
2631
+ return i ? i[1] : null;
2632
+ } catch {
2633
+ return null;
2634
+ }
2635
+ },
2636
+ getEmbedUrl: (t, e = {}) => {
2637
+ const r = new URLSearchParams();
2638
+ e.autoplay && r.set("autoplay", "1");
2639
+ const i = r.toString();
2640
+ return `https://player.bilibili.com/player.html?bvid=${t}${i ? `&${i}` : ""}`;
2641
+ }
2642
+ }, xr = {
2643
+ name: "niconico",
2644
+ displayName: "Niconico",
2645
+ domains: ["nicovideo.jp"],
2646
+ tier: "major",
2647
+ supportsAutoplay: !1,
2648
+ supportsApi: !1,
2649
+ extractVideoId: (t) => {
2650
+ try {
2651
+ const e = new URL(t);
2652
+ if (e.hostname.replace("www.", "") !== "nicovideo.jp")
2653
+ return null;
2654
+ const i = e.pathname.match(/\/watch\/((?:sm|so|nm)\d+)/);
2655
+ return i ? i[1] : null;
2656
+ } catch {
2657
+ return null;
2658
+ }
2659
+ },
2660
+ getEmbedUrl: (t) => `https://embed.nicovideo.jp/watch/${t}`
2661
+ }, $r = {
2662
+ name: "wistia",
2663
+ displayName: "Wistia",
2664
+ domains: ["wistia.com", "wi.st", "wistia.net"],
2665
+ tier: "professional",
2666
+ supportsAutoplay: !0,
2667
+ supportsApi: !0,
2668
+ extractVideoId: (t) => {
2669
+ try {
2670
+ const e = new URL(t), r = e.hostname.replace("www.", "");
2671
+ if (e.pathname.includes("/medias/")) {
2672
+ const i = e.pathname.match(/\/medias\/([a-zA-Z0-9]+)/);
2673
+ if (i)
2674
+ return i[1];
2675
+ }
2676
+ if (r.includes("wistia") && e.pathname.includes("/iframe/")) {
2677
+ const i = e.pathname.match(/\/iframe\/([a-zA-Z0-9]+)/);
2678
+ if (i)
2679
+ return i[1];
2680
+ }
2681
+ return null;
2682
+ } catch {
2683
+ return null;
2684
+ }
2685
+ },
2686
+ getEmbedUrl: (t, e = {}) => {
2687
+ const r = new URLSearchParams();
2688
+ e.autoplay && r.set("autoPlay", "true"), e.muted && r.set("muted", "true");
2689
+ const i = r.toString();
2690
+ return `https://fast.wistia.net/embed/iframe/${t}${i ? `?${i}` : ""}`;
2691
+ }
2692
+ }, Ir = {
2693
+ name: "brightcove",
2694
+ displayName: "Brightcove",
2695
+ domains: ["brightcove.com", "bcove.video"],
2696
+ tier: "professional",
2697
+ supportsAutoplay: !0,
2698
+ supportsApi: !0,
2699
+ extractVideoId: (t) => {
2700
+ try {
2701
+ const e = new URL(t), r = e.searchParams.get("videoId");
2702
+ if (r) {
2703
+ const i = e.pathname.match(/\/(\d+)\//);
2704
+ if (i)
2705
+ return `${i[1]}:${r}`;
2706
+ }
2707
+ return null;
2708
+ } catch {
2709
+ return null;
2710
+ }
2711
+ },
2712
+ getEmbedUrl: (t) => {
2713
+ const e = t.split(":");
2714
+ if (e.length < 2)
2715
+ return console.error("Brightcove video ID must be in format ACCOUNT_ID:VIDEO_ID"), "";
2716
+ const [r, ...i] = e, a = i.join(":");
2717
+ return `https://players.brightcove.net/${r}/default_default/index.html?videoId=${a}`;
2718
+ }
2719
+ }, Cr = {
2720
+ name: "kaltura",
2721
+ displayName: "Kaltura",
2722
+ domains: ["kaltura.com"],
2723
+ tier: "professional",
2724
+ supportsAutoplay: !0,
2725
+ supportsApi: !0,
2726
+ extractVideoId: (t) => {
2727
+ try {
2728
+ const e = new URL(t), r = e.searchParams.get("entry_id") || e.searchParams.get("entryId");
2729
+ if (r) {
2730
+ const i = e.pathname.match(/\/p\/(\d+)\//), a = e.pathname.match(/\/uiconf_id\/(\d+)/);
2731
+ if (i && a)
2732
+ return `${i[1]}:${a[1]}:${r}`;
2733
+ }
2734
+ return null;
2735
+ } catch {
2736
+ return null;
2737
+ }
2738
+ },
2739
+ getEmbedUrl: (t) => {
2740
+ const e = t.split(":");
2741
+ if (e.length < 3)
2742
+ return console.error("Kaltura video ID must be in format PARTNER_ID:UI_CONF_ID:ENTRY_ID"), "";
2743
+ const [r, i, a] = e;
2744
+ return `https://cdnapisec.kaltura.com/p/${r}/sp/${r}00/embedIframeJs/uiconf_id/${i}/partner_id/${r}?iframeembed=true&entry_id=${a}`;
2745
+ }
2746
+ }, kr = {
2747
+ name: "panopto",
2748
+ displayName: "Panopto",
2749
+ domains: ["panopto.com"],
2750
+ tier: "professional",
2751
+ supportsAutoplay: !1,
2752
+ supportsApi: !0,
2753
+ extractVideoId: (t) => {
2754
+ try {
2755
+ const e = new URL(t), r = e.hostname;
2756
+ if (r === "panopto.com" || r.endsWith(".panopto.com")) {
2757
+ const a = e.searchParams.get("id");
2758
+ if (a)
2759
+ return `${r.split(".")[0]}:${a}`;
2760
+ }
2761
+ return null;
2762
+ } catch {
2763
+ return null;
2764
+ }
2765
+ },
2766
+ getEmbedUrl: (t) => {
2767
+ const e = t.split(":");
2768
+ if (e.length < 2)
2769
+ return console.error("Panopto video ID must be in format SUBDOMAIN:SESSION_ID"), "";
2770
+ const [r, ...i] = e, a = i.join(":");
2771
+ return `https://${r}.panopto.com/Panopto/Pages/Embed.aspx?id=${a}&autoplay=false&offerviewer=true&showtitle=true&showbrand=false&captions=false&interactivity=all`;
2772
+ }
2773
+ }, Sr = {
2774
+ name: "jwplayer",
2775
+ displayName: "JW Player",
2776
+ domains: ["jwplayer.com", "jwplatform.com", "content.jwplatform.com"],
2777
+ tier: "professional",
2778
+ supportsAutoplay: !0,
2779
+ supportsApi: !0,
2780
+ extractVideoId: (t) => {
2781
+ try {
2782
+ const r = new URL(t).pathname.match(/\/players\/([a-zA-Z0-9]+-[a-zA-Z0-9]+)\.html/);
2783
+ return r ? r[1] : null;
2784
+ } catch {
2785
+ return null;
2786
+ }
2787
+ },
2788
+ getEmbedUrl: (t) => `https://content.jwplatform.com/players/${t}.html`
2789
+ }, Nr = {
2790
+ name: "cloudflare",
2791
+ displayName: "Cloudflare Stream",
2792
+ domains: ["cloudflarestream.com", "videodelivery.net"],
2793
+ tier: "professional",
2794
+ supportsAutoplay: !0,
2795
+ supportsApi: !0,
2796
+ extractVideoId: (t) => {
2797
+ try {
2798
+ const e = new URL(t), r = e.hostname, i = r === "videodelivery.net" || r.endsWith(".videodelivery.net"), a = r === "cloudflarestream.com" || r.endsWith(".cloudflarestream.com");
2799
+ if (i || a) {
2800
+ const m = e.pathname.match(/\/([a-zA-Z0-9]+)(?:\/|$)/);
2801
+ if (m)
2802
+ return m[1];
2803
+ }
2804
+ return null;
2805
+ } catch {
2806
+ return null;
2807
+ }
2808
+ },
2809
+ getEmbedUrl: (t, e = {}) => {
2810
+ const r = new URLSearchParams();
2811
+ e.autoplay && r.set("autoplay", "true"), e.muted && r.set("muted", "true"), e.loop && r.set("loop", "true");
2812
+ const i = r.toString();
2813
+ return `https://iframe.videodelivery.net/${t}${i ? `?${i}` : ""}`;
2814
+ }
2815
+ }, Lr = {
2816
+ name: "mux",
2817
+ displayName: "Mux",
2818
+ domains: ["mux.com", "stream.mux.com"],
2819
+ tier: "professional",
2820
+ supportsAutoplay: !0,
2821
+ supportsApi: !0,
2822
+ extractVideoId: (t) => {
2823
+ try {
2824
+ const e = new URL(t);
2825
+ if (e.hostname === "stream.mux.com") {
2826
+ const i = e.pathname.slice(1).split(".")[0];
2827
+ if (i)
2828
+ return i;
2829
+ }
2830
+ return null;
2831
+ } catch {
2832
+ return null;
2833
+ }
2834
+ },
2835
+ getEmbedUrl: (t, e = {}) => {
2836
+ const r = new URLSearchParams();
2837
+ e.autoplay && r.set("autoplay", "true"), e.muted && r.set("muted", "true");
2838
+ const i = r.toString();
2839
+ return `https://stream.mux.com/${t}.m3u8${i ? `?${i}` : ""}`;
2840
+ }
2841
+ }, Mr = {
2842
+ name: "aws-ivs",
2843
+ displayName: "AWS IVS",
2844
+ domains: ["ivs.aws", "amazonaws.com"],
2845
+ tier: "professional",
2846
+ supportsAutoplay: !0,
2847
+ supportsApi: !0,
2848
+ extractVideoId: (t) => {
2849
+ try {
2850
+ const e = new URL(t);
2851
+ return e.hostname.includes(".channel.ivs.aws") ? e.hostname.split(".")[0] : null;
2852
+ } catch {
2853
+ return null;
2854
+ }
2855
+ },
2856
+ getEmbedUrl: (t) => `https://${t}.channel.ivs.aws/stream.m3u8`
2857
+ }, Ar = {
2858
+ name: "azure-media",
2859
+ displayName: "Azure Media Services",
2860
+ domains: ["azure.net", "azureedge.net"],
2861
+ tier: "professional",
2862
+ supportsAutoplay: !0,
2863
+ supportsApi: !0,
2864
+ extractVideoId: (t) => {
2865
+ try {
2866
+ const e = new URL(t);
2867
+ if (e.hostname.endsWith(".streaming.media.azure.net")) {
2868
+ const r = e.pathname.split("/");
2869
+ if (r.length >= 2)
2870
+ return `${e.hostname}:${r[1]}`;
2871
+ }
2872
+ return null;
2873
+ } catch {
2874
+ return null;
2875
+ }
2876
+ },
2877
+ getEmbedUrl: (t) => {
2878
+ const e = t.split(":");
2879
+ if (e.length < 2)
2880
+ return console.error("Azure Media video ID must be in format HOSTNAME:ASSET_ID"), "";
2881
+ const [r, ...i] = e, a = i.join(":");
2882
+ return `https://${r}/${a}/manifest`;
2883
+ }
2884
+ }, Pr = {
2885
+ name: "google-drive",
2886
+ displayName: "Google Drive",
2887
+ domains: ["drive.google.com"],
2888
+ tier: "cloud",
2889
+ supportsAutoplay: !1,
2890
+ supportsApi: !1,
2891
+ extractVideoId: (t) => {
2892
+ try {
2893
+ const e = new URL(t);
2894
+ if (e.hostname.replace("www.", "") !== "drive.google.com")
2895
+ return null;
2896
+ const i = e.pathname.match(/\/file\/d\/([a-zA-Z0-9_-]+)/);
2897
+ if (i)
2898
+ return i[1];
2899
+ const a = e.searchParams.get("id");
2900
+ return a || null;
2901
+ } catch {
2902
+ return null;
2903
+ }
2904
+ },
2905
+ getEmbedUrl: (t) => `https://drive.google.com/file/d/${t}/preview`
2906
+ }, Er = {
2907
+ name: "dropbox",
2908
+ displayName: "Dropbox",
2909
+ domains: ["dropbox.com"],
2910
+ tier: "cloud",
2911
+ supportsAutoplay: !1,
2912
+ supportsApi: !1,
2913
+ extractVideoId: (t) => {
2914
+ try {
2915
+ return new URL(t).hostname.replace("www.", "") !== "dropbox.com" ? null : t;
2916
+ } catch {
2917
+ return null;
2918
+ }
2919
+ },
2920
+ getEmbedUrl: (t) => {
2921
+ try {
2922
+ const e = new URL(t);
2923
+ return e.searchParams.delete("dl"), e.searchParams.set("raw", "1"), e.toString();
2924
+ } catch {
2925
+ return t;
2926
+ }
2927
+ }
2928
+ }, Dr = {
2929
+ name: "facebook",
2930
+ displayName: "Facebook Video",
2931
+ domains: ["facebook.com", "fb.watch"],
2932
+ tier: "social",
2933
+ supportsAutoplay: !1,
2934
+ supportsApi: !1,
2935
+ extractVideoId: (t) => {
2936
+ try {
2937
+ const e = new URL(t), r = e.hostname.replace("www.", "");
2938
+ if (r === "fb.watch")
2939
+ return e.pathname.slice(1);
2940
+ if (r === "facebook.com") {
2941
+ const i = e.searchParams.get("v");
2942
+ if (i)
2943
+ return i;
2944
+ const a = e.pathname.match(/\/videos\/(\d+)/);
2945
+ if (a)
2946
+ return a[1];
2947
+ }
2948
+ return null;
2949
+ } catch {
2950
+ return null;
2951
+ }
2952
+ },
2953
+ getEmbedUrl: (t) => `https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fwatch%2F%3Fv%3D${t}`
2954
+ }, zr = {
2955
+ name: "instagram",
2956
+ displayName: "Instagram",
2957
+ domains: ["instagram.com"],
2958
+ tier: "social",
2959
+ supportsAutoplay: !1,
2960
+ supportsApi: !1,
2961
+ extractVideoId: (t) => {
2962
+ try {
2963
+ const e = new URL(t);
2964
+ if (e.hostname.replace("www.", "") !== "instagram.com")
2965
+ return null;
2966
+ const i = e.pathname.match(/\/(p|reel|tv)\/([a-zA-Z0-9_-]+)/);
2967
+ return i ? i[2] : null;
2968
+ } catch {
2969
+ return null;
2970
+ }
2971
+ },
2972
+ getEmbedUrl: (t) => `https://www.instagram.com/p/${t}/embed/`
2973
+ }, Or = {
2974
+ name: "twitter",
2975
+ displayName: "X (Twitter)",
2976
+ domains: ["twitter.com", "x.com"],
2977
+ tier: "social",
2978
+ supportsAutoplay: !1,
2979
+ supportsApi: !1,
2980
+ extractVideoId: (t) => {
2981
+ try {
2982
+ const e = new URL(t), r = e.hostname.replace("www.", "");
2983
+ if (r !== "twitter.com" && r !== "x.com")
2984
+ return null;
2985
+ const i = e.pathname.match(/\/status\/(\d+)/);
2986
+ return i ? i[1] : null;
2987
+ } catch {
2988
+ return null;
2989
+ }
2990
+ },
2991
+ getEmbedUrl: (t) => `https://platform.twitter.com/embed/Tweet.html?id=${t}`
2992
+ }, Ur = {
2993
+ name: "pornhub",
2994
+ displayName: "Pornhub",
2995
+ domains: ["pornhub.com"],
2996
+ tier: "adult",
2997
+ supportsAutoplay: !0,
2998
+ supportsApi: !1,
2999
+ extractVideoId: (t) => {
3000
+ try {
3001
+ const e = new URL(t);
3002
+ if (e.hostname.replace("www.", "") !== "pornhub.com")
3003
+ return null;
3004
+ const i = e.searchParams.get("viewkey");
3005
+ if (i)
3006
+ return i;
3007
+ const a = e.pathname.match(/\/embed\/([a-zA-Z0-9]+)/);
3008
+ return a ? a[1] : null;
3009
+ } catch {
3010
+ return null;
3011
+ }
3012
+ },
3013
+ getEmbedUrl: (t) => `https://www.pornhub.com/embed/${t}`
3014
+ }, Vr = {
3015
+ name: "youporn",
3016
+ displayName: "YouPorn",
3017
+ domains: ["youporn.com"],
3018
+ tier: "adult",
3019
+ supportsAutoplay: !1,
3020
+ supportsApi: !1,
3021
+ extractVideoId: (t) => {
3022
+ try {
3023
+ const e = new URL(t);
3024
+ if (e.hostname.replace("www.", "") !== "youporn.com")
3025
+ return null;
3026
+ const i = e.pathname.match(/\/watch\/(\d+)/);
3027
+ return i ? i[1] : null;
3028
+ } catch {
3029
+ return null;
3030
+ }
3031
+ },
3032
+ getEmbedUrl: (t) => `https://www.youporn.com/embed/${t}`
3033
+ }, Rr = {
3034
+ name: "redtube",
3035
+ displayName: "Redtube",
3036
+ domains: ["redtube.com"],
3037
+ tier: "adult",
3038
+ supportsAutoplay: !1,
3039
+ supportsApi: !1,
3040
+ extractVideoId: (t) => {
3041
+ try {
3042
+ const e = new URL(t);
3043
+ if (e.hostname.replace("www.", "") !== "redtube.com")
3044
+ return null;
3045
+ const i = e.searchParams.get("id");
3046
+ if (i)
3047
+ return i;
3048
+ const a = e.pathname.match(/\/(\d+)/);
3049
+ return a ? a[1] : null;
3050
+ } catch {
3051
+ return null;
3052
+ }
3053
+ },
3054
+ getEmbedUrl: (t) => `https://embed.redtube.com/?id=${t}`
3055
+ }, Tr = {
3056
+ name: "xhamster",
3057
+ displayName: "XHamster",
3058
+ domains: ["xhamster.com"],
3059
+ tier: "adult",
3060
+ supportsAutoplay: !1,
3061
+ supportsApi: !1,
3062
+ extractVideoId: (t) => {
3063
+ try {
3064
+ const e = new URL(t);
3065
+ if (e.hostname.replace("www.", "") !== "xhamster.com")
3066
+ return null;
3067
+ const i = e.pathname.match(/\/videos\/[^/]+-(\d+)/);
3068
+ return i ? i[1] : null;
3069
+ } catch {
3070
+ return null;
3071
+ }
3072
+ },
3073
+ getEmbedUrl: (t) => `https://xhamster.com/xembed.php?video=${t}`
3074
+ }, Br = {
3075
+ name: "spankbang",
3076
+ displayName: "SpankBang",
3077
+ domains: ["spankbang.com"],
3078
+ tier: "adult",
3079
+ supportsAutoplay: !1,
3080
+ supportsApi: !1,
3081
+ extractVideoId: (t) => {
3082
+ try {
3083
+ const e = new URL(t);
3084
+ if (e.hostname.replace("www.", "") !== "spankbang.com")
3085
+ return null;
3086
+ const i = e.pathname.match(/\/([a-zA-Z0-9]+)\/video\//);
3087
+ return i ? i[1] : null;
3088
+ } catch {
3089
+ return null;
3090
+ }
3091
+ },
3092
+ getEmbedUrl: (t) => `https://spankbang.com/${t}/embed/`
3093
+ }, Ge = [
3094
+ // Tier 1: Major platforms
3095
+ hr,
3096
+ mr,
3097
+ pr,
3098
+ fr,
3099
+ vr,
3100
+ gr,
3101
+ yr,
3102
+ br,
3103
+ wr,
3104
+ _r,
3105
+ xr,
3106
+ // Tier 2: Professional/Enterprise platforms
3107
+ $r,
3108
+ Ir,
3109
+ Cr,
3110
+ kr,
3111
+ Sr,
3112
+ Nr,
3113
+ Lr,
3114
+ Mr,
3115
+ Ar,
3116
+ // Tier 3: Cloud storage
3117
+ Pr,
3118
+ Er,
3119
+ // Tier 4: Social media
3120
+ Dr,
3121
+ zr,
3122
+ Or,
3123
+ // Tier 5: Adult content
3124
+ Ur,
3125
+ Vr,
3126
+ Rr,
3127
+ Tr,
3128
+ Br
3129
+ ], Oe = Ge.reduce(
3130
+ (t, e) => (t[e.name] = e, t),
3131
+ {}
3132
+ );
3133
+ function Ye(t) {
3134
+ if (!t)
3135
+ return null;
3136
+ try {
3137
+ const r = new URL(t).hostname.toLowerCase().replace("www.", "");
3138
+ for (const i of Ge)
3139
+ for (const a of i.domains)
3140
+ if (r === a || r.endsWith(`.${a}`))
3141
+ return i;
3142
+ return null;
3143
+ } catch {
3144
+ return null;
3145
+ }
3146
+ }
3147
+ function Je(t) {
3148
+ const e = Ye(t);
3149
+ if (!e)
3150
+ return null;
3151
+ const r = e.extractVideoId(t);
3152
+ return r ? {
3153
+ provider: e,
3154
+ videoId: r
3155
+ } : null;
3156
+ }
3157
+ function cn(t, e) {
3158
+ const r = Je(t);
3159
+ return r ? r.provider.getEmbedUrl(r.videoId, e) : null;
3160
+ }
3161
+ function dn(t) {
3162
+ return Ye(t)?.tier === "adult";
3163
+ }
3164
+ const jr = () => /* @__PURE__ */ y(
1701
3165
  "svg",
1702
3166
  {
1703
3167
  width: "64",
@@ -1707,18 +3171,11 @@ const At = ({
1707
3171
  xmlns: "http://www.w3.org/2000/svg",
1708
3172
  className: "uiforge-video__play-icon",
1709
3173
  children: [
1710
- /* @__PURE__ */ e("circle", { cx: "32", cy: "32", r: "32", fill: "white", fillOpacity: "0.9" }),
1711
- /* @__PURE__ */ e(
1712
- "path",
1713
- {
1714
- d: "M26 20L46 32L26 44V20Z",
1715
- fill: "currentColor",
1716
- style: { color: "#3b82f6" }
1717
- }
1718
- )
3174
+ /* @__PURE__ */ n("circle", { cx: "32", cy: "32", r: "32", fill: "white", fillOpacity: "0.9" }),
3175
+ /* @__PURE__ */ n("path", { d: "M26 20L46 32L26 44V20Z", fill: "currentColor", style: { color: "#3b82f6" } })
1719
3176
  ]
1720
3177
  }
1721
- ), Nt = () => /* @__PURE__ */ d(
3178
+ ), Hr = () => /* @__PURE__ */ y(
1722
3179
  "svg",
1723
3180
  {
1724
3181
  width: "20",
@@ -1728,155 +3185,380 @@ const At = ({
1728
3185
  xmlns: "http://www.w3.org/2000/svg",
1729
3186
  className: "uiforge-video-preview__icon",
1730
3187
  children: [
1731
- /* @__PURE__ */ e("path", { d: "M2 5a2 2 0 012-2h12a2 2 0 012 2v10a2 2 0 01-2 2H4a2 2 0 01-2-2V5zm2-1a1 1 0 00-1 1v10a1 1 0 001 1h12a1 1 0 001-1V5a1 1 0 00-1-1H4z" }),
1732
- /* @__PURE__ */ e("path", { d: "M8 7l5 3-5 3V7z" })
3188
+ /* @__PURE__ */ n("path", { d: "M2 5a2 2 0 012-2h12a2 2 0 012 2v10a2 2 0 01-2 2H4a2 2 0 01-2-2V5zm2-1a1 1 0 00-1 1v10a1 1 0 001 1h12a1 1 0 001-1V5a1 1 0 00-1-1H4z" }),
3189
+ /* @__PURE__ */ n("path", { d: "M8 7l5 3-5 3V7z" })
1733
3190
  ]
1734
3191
  }
1735
- ), Rt = ({
3192
+ ), un = ({
1736
3193
  title: t,
1737
- description: n,
1738
- youtubeId: r,
1739
- vimeoId: i,
1740
- thumbnailUrl: h,
1741
- onPlay: p,
1742
- className: u = "",
1743
- overlayIcon: f,
1744
- aspectRatio: k = "16/9"
3194
+ description: e,
3195
+ url: r,
3196
+ youtubeId: i,
3197
+ vimeoId: a,
3198
+ provider: m,
3199
+ videoId: s,
3200
+ autoplay: l = !1,
3201
+ muted: $ = !1,
3202
+ loop: L = !1,
3203
+ startTime: k,
3204
+ controls: E = !0,
3205
+ thumbnailUrl: P,
3206
+ onPlay: c,
3207
+ onError: _,
3208
+ onReady: o,
3209
+ className: d = "",
3210
+ overlayIcon: u,
3211
+ aspectRatio: g = "16:9",
3212
+ width: S,
3213
+ height: O,
3214
+ maxHeight: C,
3215
+ responsive: b = !1,
3216
+ hideHeader: M = !1,
3217
+ allowAdultContent: A = !1,
3218
+ fallback: U
1745
3219
  }) => {
1746
- const [Z, H] = j(!1), F = G(null), s = r ? "youtube" : i ? "vimeo" : null, S = r || i || "", D = te(() => !s || !S ? "" : s === "youtube" ? `https://www.youtube.com/embed/${S}?autoplay=1&rel=0` : s === "vimeo" ? `https://player.vimeo.com/video/${S}?autoplay=1` : "", [s, S]), q = te(() => {
1747
- if (h) return h;
1748
- if (s === "youtube" && r)
1749
- return `https://img.youtube.com/vi/${r}/maxresdefault.jpg`;
1750
- if (s === "vimeo" && i)
1751
- return;
1752
- }, [h, s, r, i]), A = L(() => {
1753
- !s || !S || (H(!0), p && p(S, s));
1754
- }, [s, S, p]);
1755
- if (!r && !i)
1756
- return console.warn("UIForgeVideo: Either youtubeId or vimeoId must be provided"), null;
1757
- const C = "uiforge-video", z = `${C} ${u}`.trim();
1758
- return /* @__PURE__ */ d("div", { className: z, children: [
1759
- /* @__PURE__ */ d("div", { className: `${C}__header`, children: [
1760
- /* @__PURE__ */ e("h3", { className: `${C}__title`, children: t }),
1761
- n && /* @__PURE__ */ e("p", { className: `${C}__description`, children: n })
3220
+ const [R, F] = te(!1), [f, N] = te(null), x = ne(null), w = oe(() => {
3221
+ if (m && s) {
3222
+ const q = Oe[m];
3223
+ if (q)
3224
+ return { provider: q, videoId: s, method: "explicit" };
3225
+ }
3226
+ if (r) {
3227
+ const q = Je(r);
3228
+ if (q)
3229
+ return { ...q, method: "url" };
3230
+ }
3231
+ if (i) {
3232
+ const q = Oe.youtube;
3233
+ if (q)
3234
+ return { provider: q, videoId: i, method: "legacy" };
3235
+ }
3236
+ if (a) {
3237
+ const q = Oe.vimeo;
3238
+ if (q)
3239
+ return { provider: q, videoId: a, method: "legacy" };
3240
+ }
3241
+ return null;
3242
+ }, [r, m, s, i, a]), se = oe(() => w ? w.provider.tier === "adult" : !1, [w]), J = oe(
3243
+ () => ({
3244
+ // When user clicks to play, enable autoplay automatically
3245
+ autoplay: R ? !0 : l,
3246
+ muted: $,
3247
+ loop: L,
3248
+ startTime: k,
3249
+ controls: E
3250
+ }),
3251
+ [l, $, L, k, E, R]
3252
+ ), ie = oe(() => {
3253
+ if (!w) return "";
3254
+ try {
3255
+ return w.provider.getEmbedUrl(w.videoId, J);
3256
+ } catch (q) {
3257
+ return console.error("Error generating embed URL:", q), "";
3258
+ }
3259
+ }, [w, J]), ee = oe(() => {
3260
+ if (P) return P;
3261
+ if (w?.provider.name === "youtube")
3262
+ return `https://img.youtube.com/vi/${w.videoId}/maxresdefault.jpg`;
3263
+ }, [P, w]), ce = B(() => {
3264
+ w && (F(!0), c && c(w.videoId, w.provider.name), o && o(w.videoId, w.provider.name));
3265
+ }, [w, c, o]), le = B(
3266
+ (q) => {
3267
+ N(q), _ && w && _(new Error(q), w.provider.name);
3268
+ },
3269
+ [_, w]
3270
+ );
3271
+ if (!w)
3272
+ return U ? /* @__PURE__ */ n(ye, { children: U }) : (console.warn("UIForgeVideo: No valid video source provided"), null);
3273
+ if (se && !A) {
3274
+ const q = "Adult content must be explicitly enabled with allowAdultContent prop";
3275
+ return U ? /* @__PURE__ */ n(ye, { children: U }) : (console.warn(`UIForgeVideo: ${q}`), /* @__PURE__ */ n("div", { className: "uiforge-video", children: /* @__PURE__ */ n("div", { className: "uiforge-video__error", children: /* @__PURE__ */ n("p", { children: q }) }) }));
3276
+ }
3277
+ if (f)
3278
+ return U ? /* @__PURE__ */ n(ye, { children: U }) : /* @__PURE__ */ n("div", { className: "uiforge-video", children: /* @__PURE__ */ n("div", { className: "uiforge-video__error", children: /* @__PURE__ */ n("p", { children: f }) }) });
3279
+ const j = "uiforge-video", he = b ? `${j}--responsive` : "", G = `${j} ${he} ${d}`.trim(), re = {
3280
+ aspectRatio: g !== "auto" ? g.replace(":", "/") : void 0,
3281
+ width: S ? typeof S == "number" ? `${S}px` : S : void 0,
3282
+ height: O ? typeof O == "number" ? `${O}px` : O : void 0,
3283
+ maxHeight: C ? typeof C == "number" ? `${C}px` : C : void 0
3284
+ }, me = t || `${w.provider.displayName} Video`;
3285
+ return /* @__PURE__ */ y("div", { className: G, children: [
3286
+ !M && (t || e) && /* @__PURE__ */ y("div", { className: `${j}__header`, children: [
3287
+ t && /* @__PURE__ */ n("h3", { className: `${j}__title`, children: t }),
3288
+ e && /* @__PURE__ */ n("p", { className: `${j}__description`, children: e })
1762
3289
  ] }),
1763
- /* @__PURE__ */ e(
1764
- "div",
3290
+ /* @__PURE__ */ n("div", { className: `${j}__player-container`, style: re, children: R ? /* @__PURE__ */ n(
3291
+ "iframe",
1765
3292
  {
1766
- className: `${C}__player-container`,
1767
- style: { aspectRatio: k },
1768
- children: Z ? /* @__PURE__ */ e(
1769
- "iframe",
1770
- {
1771
- ref: F,
1772
- src: D,
1773
- title: t,
1774
- className: `${C}__iframe`,
1775
- allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
1776
- allowFullScreen: !0
1777
- }
1778
- ) : /* @__PURE__ */ d(_e, { children: [
1779
- q && /* @__PURE__ */ e(
1780
- "img",
1781
- {
1782
- src: q,
1783
- alt: t,
1784
- className: `${C}__thumbnail`
1785
- }
1786
- ),
1787
- /* @__PURE__ */ e(
1788
- "button",
1789
- {
1790
- className: `${C}__overlay`,
1791
- onClick: A,
1792
- "aria-label": `Play video: ${t}`,
1793
- type: "button",
1794
- children: f || /* @__PURE__ */ e($t, {})
1795
- }
1796
- )
1797
- ] })
3293
+ ref: x,
3294
+ src: ie,
3295
+ title: me,
3296
+ className: `${j}__iframe`,
3297
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
3298
+ allowFullScreen: !0,
3299
+ onError: () => le("Failed to load video")
1798
3300
  }
1799
- )
3301
+ ) : /* @__PURE__ */ y(ye, { children: [
3302
+ ee && /* @__PURE__ */ n("img", { src: ee, alt: me, className: `${j}__thumbnail` }),
3303
+ /* @__PURE__ */ n(
3304
+ "button",
3305
+ {
3306
+ className: `${j}__overlay`,
3307
+ onClick: ce,
3308
+ "aria-label": `Play video: ${me}`,
3309
+ type: "button",
3310
+ children: u || /* @__PURE__ */ n(jr, {})
3311
+ }
3312
+ )
3313
+ ] }) })
1800
3314
  ] });
1801
- }, jt = ({
3315
+ }, hn = ({
1802
3316
  title: t,
1803
- icon: n,
3317
+ icon: e,
1804
3318
  className: r = "",
1805
3319
  onClick: i
1806
3320
  }) => {
1807
- const h = "uiforge-video-preview", p = `${h} ${r}`.trim();
1808
- return /* @__PURE__ */ d(i ? "button" : "div", { className: p, ...i ? {
3321
+ const a = "uiforge-video-preview", m = `${a} ${r}`.trim();
3322
+ return /* @__PURE__ */ y(i ? "button" : "div", { className: m, ...i ? {
1809
3323
  type: "button",
1810
3324
  onClick: () => {
1811
3325
  i && i();
1812
3326
  },
1813
- onKeyDown: (H) => {
1814
- i && (H.key === "Enter" || H.key === " ") && (H.preventDefault(), i());
3327
+ onKeyDown: (k) => {
3328
+ i && (k.key === "Enter" || k.key === " ") && (k.preventDefault(), i());
1815
3329
  }
1816
3330
  } : {}, children: [
1817
- /* @__PURE__ */ e("div", { className: `${h}__icon-container`, children: n || /* @__PURE__ */ e(Nt, {}) }),
1818
- /* @__PURE__ */ e("span", { className: `${h}__title`, children: t })
3331
+ /* @__PURE__ */ n("div", { className: `${a}__icon-container`, children: e || /* @__PURE__ */ n(Hr, {}) }),
3332
+ /* @__PURE__ */ n("span", { className: `${a}__title`, children: t })
3333
+ ] });
3334
+ }, Ke = (t) => {
3335
+ const e = [
3336
+ "a[href]",
3337
+ "button:not([disabled])",
3338
+ "textarea:not([disabled])",
3339
+ "input:not([disabled])",
3340
+ "select:not([disabled])",
3341
+ '[tabindex]:not([tabindex="-1"])'
3342
+ ].join(", ");
3343
+ return Array.from(t.querySelectorAll(e));
3344
+ }, mn = ({
3345
+ id: t,
3346
+ variant: e = "static",
3347
+ open: r = !0,
3348
+ onOpenChange: i,
3349
+ children: a,
3350
+ className: m = "",
3351
+ ariaLabel: s = "Sidebar navigation",
3352
+ width: l = "280px",
3353
+ height: $ = "200px",
3354
+ position: L = "left",
3355
+ showBackdrop: k = !0,
3356
+ closeOnBackdropClick: E = !0,
3357
+ closeOnEscape: P = !0,
3358
+ trapFocus: c = !0
3359
+ }) => {
3360
+ const _ = ne(null), o = ne(null), d = e === "drawer" || e === "bottom", u = B(() => {
3361
+ E && i && i(!1);
3362
+ }, [E, i]);
3363
+ ae(() => {
3364
+ if (!d || !r || !P) return;
3365
+ const M = (A) => {
3366
+ A.key === "Escape" && (A.preventDefault(), i?.(!1));
3367
+ };
3368
+ return document.addEventListener("keydown", M), () => document.removeEventListener("keydown", M);
3369
+ }, [d, r, P, i]), ae(() => {
3370
+ if (!d || !r || !c) return;
3371
+ const M = _.current;
3372
+ if (!M) return;
3373
+ o.current = document.activeElement;
3374
+ const A = Ke(M);
3375
+ A.length > 0 ? A[0].focus() : M.focus();
3376
+ const U = (R) => {
3377
+ if (R.key !== "Tab") return;
3378
+ const F = Ke(M);
3379
+ if (F.length === 0) return;
3380
+ const f = F[0], N = F[F.length - 1];
3381
+ R.shiftKey ? document.activeElement === f && (R.preventDefault(), N.focus()) : document.activeElement === N && (R.preventDefault(), f.focus());
3382
+ };
3383
+ return document.addEventListener("keydown", U), () => {
3384
+ document.removeEventListener("keydown", U), o.current && typeof o.current.focus == "function" && o.current.focus();
3385
+ };
3386
+ }, [d, r, c]), ae(() => {
3387
+ if (!d || !r) return;
3388
+ const M = document.body.style.overflow;
3389
+ return document.body.style.overflow = "hidden", () => {
3390
+ document.body.style.overflow = M;
3391
+ };
3392
+ }, [d, r]);
3393
+ const g = "uiforge-sidebar", S = [
3394
+ g,
3395
+ `${g}--${e}`,
3396
+ `${g}--${L}`,
3397
+ d && r && `${g}--open`,
3398
+ d && !r && `${g}--closed`,
3399
+ m
3400
+ ].filter(Boolean).join(" "), O = {
3401
+ "--sidebar-width": l,
3402
+ "--sidebar-height": $
3403
+ }, b = e === "static" ? {
3404
+ role: "navigation",
3405
+ "aria-label": s
3406
+ } : {
3407
+ role: "dialog",
3408
+ "aria-modal": r,
3409
+ "aria-expanded": r,
3410
+ "aria-label": s,
3411
+ "aria-hidden": !r
3412
+ };
3413
+ return e === "static" ? /* @__PURE__ */ n(
3414
+ "aside",
3415
+ {
3416
+ id: t,
3417
+ ref: _,
3418
+ className: S,
3419
+ style: O,
3420
+ ...b,
3421
+ children: /* @__PURE__ */ n("div", { className: `${g}__content`, children: a })
3422
+ }
3423
+ ) : /* @__PURE__ */ y(ye, { children: [
3424
+ k && /* @__PURE__ */ n(
3425
+ "div",
3426
+ {
3427
+ className: `${g}__backdrop ${r ? `${g}__backdrop--visible` : ""}`,
3428
+ onClick: u,
3429
+ "aria-hidden": "true"
3430
+ }
3431
+ ),
3432
+ /* @__PURE__ */ n(
3433
+ "aside",
3434
+ {
3435
+ id: t,
3436
+ ref: _,
3437
+ className: S,
3438
+ style: O,
3439
+ tabIndex: -1,
3440
+ ...b,
3441
+ children: /* @__PURE__ */ n("div", { className: `${g}__content`, children: a })
3442
+ }
3443
+ )
1819
3444
  ] });
1820
3445
  };
3446
+ function pn(t, e) {
3447
+ const { sampleCount: r = 3, min: i = 3, max: a = 15, approxItemHeight: m = 120 } = e ?? {}, [s, l] = te(i), $ = ne(i), L = B(() => {
3448
+ const k = t?.current;
3449
+ if (!k)
3450
+ return i;
3451
+ const E = k.clientHeight;
3452
+ if (E === 0)
3453
+ return i;
3454
+ const P = Array.from(k.children).filter((d) => d instanceof HTMLElement && d.offsetHeight > 0);
3455
+ let c = m;
3456
+ if (P.length > 0) {
3457
+ const d = Math.min(r, P.length);
3458
+ let u = 0;
3459
+ for (let g = 0; g < d; g++)
3460
+ u += P[g].offsetHeight;
3461
+ c = u / d;
3462
+ }
3463
+ const _ = Math.floor(E / c);
3464
+ return Math.max(i, Math.min(a, _));
3465
+ }, [t, r, i, a, m]);
3466
+ return ae(() => {
3467
+ const k = t?.current;
3468
+ if (!k)
3469
+ return;
3470
+ const E = () => {
3471
+ const _ = L();
3472
+ _ !== $.current && ($.current = _, l(_));
3473
+ };
3474
+ E();
3475
+ let P;
3476
+ typeof ResizeObserver < "u" && (P = new ResizeObserver(() => {
3477
+ E();
3478
+ }), P.observe(k));
3479
+ let c;
3480
+ return typeof MutationObserver < "u" && (c = new MutationObserver(() => {
3481
+ E();
3482
+ }), c.observe(k, {
3483
+ childList: !0,
3484
+ subtree: !1
3485
+ })), () => {
3486
+ P?.disconnect(), c?.disconnect();
3487
+ };
3488
+ }, [t, L]), s;
3489
+ }
1821
3490
  export {
1822
- we as ActivityIcons,
1823
- ot as AlienIcon,
1824
- mt as BriefcaseIcon,
1825
- it as BugIcon,
1826
- wt as BuildIcon,
1827
- Wt as BusinessIcons,
1828
- It as Button,
1829
- gt as CalendarIcon,
1830
- ht as ChartIcon,
1831
- qe as CheckIcon,
1832
- Fe as CloseIcon,
1833
- rt as CloudIcon,
1834
- lt as CodeIcon,
1835
- ze as CommentIcon,
1836
- He as CommitIcon,
1837
- tt as DatabaseIcon,
1838
- Ue as DeployIcon,
1839
- yt as DeploymentIcon,
1840
- Ot as DevProcessIcons,
1841
- ft as DocumentIcon,
1842
- Je as DumbbellIcon,
1843
- zt as FitnessIcons,
1844
- je as FoldIcon,
1845
- Te as ForkIcon,
1846
- pt as GitBranchIcon,
1847
- Qe as HeartRateIcon,
1848
- Ee as IssueIcon,
1849
- Ze as MeditationIcon,
1850
- ut as MeetingIcon,
1851
- We as MergeIcon,
1852
- st as PlanetIcon,
1853
- vt as PullRequestDraftIcon,
1854
- Ae as PullRequestIcon,
1855
- Oe as ReleaseIcon,
1856
- _t as ReviewIcon,
1857
- ct as RocketIcon,
1858
- Ye as RunningIcon,
1859
- at as SatelliteIcon,
1860
- et as ServerIcon,
1861
- Tt as SpaceIcons,
1862
- Pe as StarIcon,
1863
- Xe as StrengthIcon,
1864
- Ke as TaiChiIcon,
1865
- Pt as TechIcons,
1866
- dt as TelescopeIcon,
1867
- nt as TerminalIcon,
1868
- bt as TestingIcon,
1869
- Ut as UIForgeActivityStream,
1870
- St as UIForgeBlocksEditor,
1871
- At as UIForgeComboBox,
1872
- Bt as UIForgeGrid,
1873
- Rt as UIForgeVideo,
1874
- jt as UIForgeVideoPreview,
1875
- xe as UIIcons,
1876
- Re as UnfoldIcon,
1877
- Et as WellnessIcons,
1878
- Ge as YogaIcon,
1879
- Dt as blocksToHTML,
1880
- Ht as blocksToJSON,
1881
- Vt as blocksToMarkdown
3491
+ Ce as ActivityIcons,
3492
+ ar as ActivityItemProvider,
3493
+ Wt as AlienIcon,
3494
+ Jt as BriefcaseIcon,
3495
+ Tt as BugIcon,
3496
+ nr as BuildIcon,
3497
+ an as BusinessIcons,
3498
+ qr as Button,
3499
+ Yt as CalendarIcon,
3500
+ Kt as ChartIcon,
3501
+ Nt as CheckIcon,
3502
+ St as CloseIcon,
3503
+ Vt as CloudIcon,
3504
+ Bt as CodeIcon,
3505
+ bt as CommentIcon,
3506
+ vt as CommitIcon,
3507
+ Ut as DatabaseIcon,
3508
+ It as DeployIcon,
3509
+ tr as DeploymentIcon,
3510
+ on as DevProcessIcons,
3511
+ Gt as DocumentIcon,
3512
+ Pt as DumbbellIcon,
3513
+ tn as FitnessIcons,
3514
+ kt as FoldIcon,
3515
+ _t as ForkIcon,
3516
+ Qt as GitBranchIcon,
3517
+ Kr as HamburgerButton,
3518
+ Dt as HeartRateIcon,
3519
+ yt as IssueIcon,
3520
+ Mt as MeditationIcon,
3521
+ Zt as MeetingIcon,
3522
+ xt as MergeIcon,
3523
+ Ft as PlanetIcon,
3524
+ Xt as PullRequestDraftIcon,
3525
+ gt as PullRequestIcon,
3526
+ $t as ReleaseIcon,
3527
+ rr as ReviewIcon,
3528
+ jt as RocketIcon,
3529
+ Et as RunningIcon,
3530
+ Ht as SatelliteIcon,
3531
+ Ot as ServerIcon,
3532
+ nn as SpaceIcons,
3533
+ wt as StarIcon,
3534
+ zt as StrengthIcon,
3535
+ Lt as TaiChiIcon,
3536
+ rn as TechIcons,
3537
+ qt as TelescopeIcon,
3538
+ Rt as TerminalIcon,
3539
+ er as TestingIcon,
3540
+ sn as UIForgeActivityItem,
3541
+ ln as UIForgeActivityStream,
3542
+ Gr as UIForgeBlocksEditor,
3543
+ Xr as UIForgeComboBox,
3544
+ Zr as UIForgeGrid,
3545
+ mn as UIForgeSidebar,
3546
+ un as UIForgeVideo,
3547
+ hn as UIForgeVideoPreview,
3548
+ ke as UIIcons,
3549
+ Ct as UnfoldIcon,
3550
+ en as WellnessIcons,
3551
+ At as YogaIcon,
3552
+ Yr as blocksToHTML,
3553
+ Qr as blocksToJSON,
3554
+ Jr as blocksToMarkdown,
3555
+ Ye as detectProvider,
3556
+ Je as extractVideoId,
3557
+ cn as getEmbedUrlFromVideoUrl,
3558
+ dn as isAdultContent,
3559
+ Oe as providersByName,
3560
+ or as useActivityItemContext,
3561
+ pn as useDynamicPageCount,
3562
+ ir as useResponsive,
3563
+ Ge as videoProviders
1882
3564
  };