@appforgeapps/uiforge 0.5.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,200 +1,233 @@
1
- import { jsx as n, jsxs as u, Fragment as me } from "react/jsx-runtime";
2
- import { useState as F, useMemo as te, useCallback as N, useRef as ee, useEffect as se } from "react";
3
- const cr = ({
4
- variant: e = "primary",
5
- size: t = "medium",
6
- children: r,
7
- className: a = "",
8
- ...o
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
+ variant: t = "primary",
5
+ size: e = "medium",
6
+ theme: r = "light",
7
+ density: i = "default",
8
+ children: a,
9
+ className: m = "",
10
+ ...s
9
11
  }) => {
10
- const p = "uiforge-button", f = `${p}--${e}`, v = `${p}--${t}`, $ = `${p} ${f} ${v} ${a}`.trim();
11
- return /* @__PURE__ */ n("button", { className: $, ...o, children: r });
12
- }, dr = ({
13
- columns: e,
14
- data: t,
15
- selectable: r = !1,
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",
18
+ className: i = "",
19
+ size: a = "medium",
20
+ ...m
21
+ }) => {
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 = ({
45
+ columns: t,
46
+ data: e,
47
+ theme: r = "light",
48
+ selectable: i = !1,
16
49
  selectedRows: a,
17
- getRowKey: o = (Q, K) => K,
18
- onSelectionChange: p,
19
- onCellEdit: f,
20
- actionButtons: v = [],
21
- searchable: $ = !1,
22
- searchPlaceholder: G = "Search...",
23
- onSearch: P,
24
- customFilter: q,
25
- pagination: h,
26
- onPageChange: j,
27
- onPageSizeChange: A,
28
- pageSizeOptions: Z = [10, 25, 50, 100],
29
- className: O = "",
30
- loading: S = !1,
31
- emptyMessage: R = "No data available"
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 [Q, K] = F(/* @__PURE__ */ new Set()), [k, V] = F(""), [C, H] = F(null), [D, l] = F(""), y = a ?? Q, c = te(() => !$ || !k ? t : t.filter((i) => q ? q(i, k) : Object.values(i).some((x) => x == null ? !1 : String(x).toLowerCase().includes(k.toLowerCase()))), [t, k, $, q]), b = te(() => {
34
- if (!h || h.serverSide)
35
- return c;
36
- const i = h.currentPage * h.pageSize, x = i + h.pageSize;
37
- return c.slice(i, x);
38
- }, [c, h]), z = te(() => h ? h.serverSide && h.totalItems !== void 0 ? Math.ceil(h.totalItems / h.pageSize) : Math.ceil(c.length / h.pageSize) : 1, [h, c.length]), E = N(() => t.filter((i, x) => {
39
- const _ = o(i, x);
40
- return y.has(_);
41
- }), [t, y, o]), ne = N(
42
- (i) => {
43
- const x = /* @__PURE__ */ new Set();
44
- i && b.forEach((_) => {
45
- const I = t.indexOf(_), le = o(_, I);
46
- x.add(le);
47
- }), a === void 0 && K(x), p?.(x, i ? b : []);
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
- [b, t, o, p, a]
50
- ), ae = N(
51
- (i, x, _) => {
52
- const I = new Set(y);
53
- _ ? I.add(i) : I.delete(i), a === void 0 && K(I);
54
- const le = t.filter((M, ue) => {
55
- const he = o(M, ue);
56
- return I.has(he);
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?.(I, le);
91
+ s?.(Z, de);
59
92
  },
60
- [y, t, o, p, a]
61
- ), X = N(
62
- (i) => {
63
- V(i), P?.(i);
93
+ [f, e, m, s, a]
94
+ ), ee = B(
95
+ (p) => {
96
+ M(p), E?.(p);
64
97
  },
65
- [P]
66
- ), W = N(
67
- (i, x, _) => {
68
- H({ rowKey: i, columnKey: x }), l(_);
98
+ [E]
99
+ ), ce = B(
100
+ (p, T, W) => {
101
+ U({ rowKey: p, columnKey: T }), F(W);
69
102
  },
70
103
  []
71
- ), oe = N(
72
- (i, x, _) => {
73
- f?.(i, x, D, _), H(null), l("");
104
+ ), le = B(
105
+ (p, T, W) => {
106
+ l?.(p, T, R, W), U(null), F("");
74
107
  },
75
- [D, f]
76
- ), s = N(() => {
77
- H(null), l("");
78
- }, []), U = N(
79
- (i) => {
80
- h && j?.(i, h.pageSize);
108
+ [R, l]
109
+ ), j = B(() => {
110
+ U(null), F("");
111
+ }, []), he = B(
112
+ (p) => {
113
+ c && _?.(p, c.pageSize);
81
114
  },
82
- [h, j]
83
- ), m = N(
84
- (i) => {
85
- A?.(i), h && j?.(0, i);
115
+ [c, _]
116
+ ), G = B(
117
+ (p) => {
118
+ o?.(p), c && _?.(0, p);
86
119
  },
87
- [A, j, h]
88
- ), L = te(() => b.length === 0 ? !1 : b.every((i) => {
89
- const x = t.indexOf(i), _ = o(i, x);
90
- return y.has(_);
91
- }), [b, y, t, o]), Y = te(() => b.length === 0 ? !1 : b.some((x) => {
92
- const _ = t.indexOf(x), I = o(x, _);
93
- return y.has(I);
94
- }) && !L, [b, y, L, t, o]), g = "uiforge-grid";
95
- return /* @__PURE__ */ u("div", { className: `${g} ${O}`.trim(), children: [
96
- ($ || v.length > 0) && /* @__PURE__ */ u("div", { className: `${g}__toolbar`, children: [
97
- $ && /* @__PURE__ */ n("div", { className: `${g}__search`, children: /* @__PURE__ */ n(
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: `${g}__search-input`,
102
- placeholder: G,
103
- value: k,
104
- onChange: (i) => X(i.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
- v.length > 0 && /* @__PURE__ */ n("div", { className: `${g}__actions`, children: v.map((i, x) => {
109
- const _ = i.disabled || i.requiresSelection && y.size === 0;
141
+ $.length > 0 && /* @__PURE__ */ n("div", { className: `${I}__actions`, children: $.map((p, T) => {
142
+ const W = p.disabled || p.requiresSelection && f.size === 0;
110
143
  return /* @__PURE__ */ n(
111
144
  "button",
112
145
  {
113
- className: `${g}__action-button ${g}__action-button--${i.variant || "primary"}`,
114
- onClick: () => i.onClick(E()),
115
- disabled: _,
116
- children: i.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__ */ n("div", { className: `${g}__table-container`, children: /* @__PURE__ */ u("table", { className: `${g}__table`, role: "table", children: [
123
- /* @__PURE__ */ n("thead", { children: /* @__PURE__ */ u("tr", { children: [
124
- r && /* @__PURE__ */ n("th", { className: `${g}__header-cell ${g}__header-cell--checkbox`, children: /* @__PURE__ */ n(
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: L,
129
- ref: (i) => {
130
- i && (i.indeterminate = Y);
161
+ checked: re,
162
+ ref: (p) => {
163
+ p && (p.indeterminate = me);
131
164
  },
132
- onChange: (i) => ne(i.target.checked),
165
+ onChange: (p) => J(p.target.checked),
133
166
  "aria-label": "Select all rows"
134
167
  }
135
168
  ) }),
136
- e.map((i) => /* @__PURE__ */ n(
169
+ t.map((p) => /* @__PURE__ */ n(
137
170
  "th",
138
171
  {
139
- className: `${g}__header-cell`,
140
- style: { width: i.width },
141
- children: i.header
172
+ className: `${I}__header-cell`,
173
+ style: { width: p.width },
174
+ children: p.header
142
175
  },
143
- i.key
176
+ p.key
144
177
  ))
145
178
  ] }) }),
146
- /* @__PURE__ */ n("tbody", { children: S ? /* @__PURE__ */ n("tr", { children: /* @__PURE__ */ n(
179
+ /* @__PURE__ */ n("tbody", { children: g ? /* @__PURE__ */ n("tr", { children: /* @__PURE__ */ n(
147
180
  "td",
148
181
  {
149
- colSpan: e.length + (r ? 1 : 0),
150
- className: `${g}__loading-cell`,
182
+ colSpan: t.length + (i ? 1 : 0),
183
+ className: `${I}__loading-cell`,
151
184
  children: "Loading..."
152
185
  }
153
- ) }) : b.length === 0 ? /* @__PURE__ */ n("tr", { children: /* @__PURE__ */ n(
186
+ ) }) : x.length === 0 ? /* @__PURE__ */ n("tr", { children: /* @__PURE__ */ n(
154
187
  "td",
155
188
  {
156
- colSpan: e.length + (r ? 1 : 0),
157
- className: `${g}__empty-cell`,
158
- children: R
189
+ colSpan: t.length + (i ? 1 : 0),
190
+ className: `${I}__empty-cell`,
191
+ children: S
159
192
  }
160
- ) }) : b.map((i, x) => {
161
- const _ = t.indexOf(i), I = o(i, _), le = y.has(I);
162
- return /* @__PURE__ */ u(
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: `${g}__row ${le ? `${g}__row--selected` : ""}`,
198
+ className: `${I}__row ${de ? `${I}__row--selected` : ""}`,
166
199
  children: [
167
- r && /* @__PURE__ */ n("td", { className: `${g}__cell ${g}__cell--checkbox`, children: /* @__PURE__ */ n(
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: le,
172
- onChange: (M) => ae(I, i, M.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
- e.map((M) => {
177
- const ue = M.field ? i[M.field] : void 0, he = C?.rowKey === I && C?.columnKey === M.key;
178
- return /* @__PURE__ */ n("td", { className: `${g}__cell`, children: he ? /* @__PURE__ */ u("div", { className: `${g}__edit-cell`, children: [
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: [
179
212
  /* @__PURE__ */ n(
180
213
  "input",
181
214
  {
182
215
  type: "text",
183
- className: `${g}__edit-input`,
184
- value: String(D ?? ""),
185
- onChange: (ce) => l(ce.target.value),
186
- onKeyDown: (ce) => {
187
- ce.key === "Enter" ? oe(I, M.key, i) : ce.key === "Escape" && s();
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 ${M.header}`
223
+ "aria-label": `Edit ${K.header}`
191
224
  }
192
225
  ),
193
226
  /* @__PURE__ */ n(
194
227
  "button",
195
228
  {
196
- className: `${g}__edit-button ${g}__edit-button--save`,
197
- onClick: () => oe(I, M.key, i),
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
  }
@@ -202,8 +235,8 @@ const cr = ({
202
235
  /* @__PURE__ */ n(
203
236
  "button",
204
237
  {
205
- className: `${g}__edit-button ${g}__edit-button--cancel`,
206
- onClick: s,
238
+ className: `${I}__edit-button ${I}__edit-button--cancel`,
239
+ onClick: j,
207
240
  "aria-label": "Cancel",
208
241
  children: "✕"
209
242
  }
@@ -211,239 +244,240 @@ const cr = ({
211
244
  ] }) : /* @__PURE__ */ n(
212
245
  "div",
213
246
  {
214
- className: `${g}__cell-content ${M.editable ? `${g}__cell-content--editable` : ""}`,
247
+ className: `${I}__cell-content ${K.editable ? `${I}__cell-content--editable` : ""}`,
215
248
  onClick: () => {
216
- M.editable && W(I, M.key, ue);
249
+ K.editable && ce(Z, K.key, fe);
217
250
  },
218
- onKeyDown: (ce) => {
219
- M.editable && (ce.key === "Enter" || ce.key === " ") && W(I, M.key, ue);
251
+ onKeyDown: (ue) => {
252
+ K.editable && (ue.key === "Enter" || ue.key === " ") && ce(Z, K.key, fe);
220
253
  },
221
- tabIndex: M.editable ? 0 : void 0,
222
- role: M.editable ? "button" : void 0,
223
- "aria-label": M.editable ? `Edit ${M.header}` : void 0,
224
- children: M.render ? M.render(ue, i, _) : String(ue ?? "")
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
- ) }, M.key);
259
+ ) }, K.key);
227
260
  })
228
261
  ]
229
262
  },
230
- I
263
+ Z
231
264
  );
232
265
  }) })
233
266
  ] }) }),
234
- h && z > 1 && /* @__PURE__ */ u("div", { className: `${g}__pagination`, children: [
235
- /* @__PURE__ */ n("div", { className: `${g}__pagination-info`, children: h.serverSide && h.totalItems !== void 0 ? /* @__PURE__ */ u(me, { 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
- h.currentPage * h.pageSize + 1,
270
+ c.currentPage * c.pageSize + 1,
238
271
  " to",
239
272
  " ",
240
273
  Math.min(
241
- (h.currentPage + 1) * h.pageSize,
242
- h.totalItems
274
+ (c.currentPage + 1) * c.pageSize,
275
+ c.totalItems
243
276
  ),
244
277
  " ",
245
278
  "of ",
246
- h.totalItems,
279
+ c.totalItems,
247
280
  " items"
248
- ] }) : /* @__PURE__ */ u(me, { children: [
281
+ ] }) : /* @__PURE__ */ y(ye, { children: [
249
282
  "Showing ",
250
- h.currentPage * h.pageSize + 1,
283
+ c.currentPage * c.pageSize + 1,
251
284
  " to",
252
285
  " ",
253
- Math.min((h.currentPage + 1) * h.pageSize, c.length),
286
+ Math.min((c.currentPage + 1) * c.pageSize, N.length),
254
287
  " ",
255
288
  "of ",
256
- c.length,
289
+ N.length,
257
290
  " items"
258
291
  ] }) }),
259
- /* @__PURE__ */ u("div", { className: `${g}__pagination-controls`, children: [
292
+ /* @__PURE__ */ y("div", { className: `${I}__pagination-controls`, children: [
260
293
  /* @__PURE__ */ n(
261
294
  "button",
262
295
  {
263
- className: `${g}__pagination-button`,
264
- onClick: () => U(h.currentPage - 1),
265
- disabled: h.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: z }, (i, x) => x).map((i) => i === 0 || i === z - 1 || Math.abs(i - h.currentPage) <= 1 ? /* @__PURE__ */ n(
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: `${g}__pagination-button ${i === h.currentPage ? `${g}__pagination-button--active` : ""}`,
274
- onClick: () => U(i),
275
- "aria-label": `Page ${i + 1}`,
276
- "aria-current": i === h.currentPage ? "page" : void 0,
277
- children: i + 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
- i
280
- ) : i === h.currentPage - 2 || i === h.currentPage + 2 ? /* @__PURE__ */ n("span", { className: `${g}__pagination-ellipsis`, children: "..." }, i) : null),
312
+ p
313
+ ) : p === c.currentPage - 2 || p === c.currentPage + 2 ? /* @__PURE__ */ n("span", { className: `${I}__pagination-ellipsis`, children: "..." }, p) : null),
281
314
  /* @__PURE__ */ n(
282
315
  "button",
283
316
  {
284
- className: `${g}__pagination-button`,
285
- onClick: () => U(h.currentPage + 1),
286
- disabled: h.currentPage >= z - 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__ */ u("div", { className: `${g}__page-size`, children: [
325
+ /* @__PURE__ */ y("div", { className: `${I}__page-size`, children: [
293
326
  /* @__PURE__ */ n("label", { htmlFor: "page-size-select", children: "Items per page:" }),
294
327
  /* @__PURE__ */ n(
295
328
  "select",
296
329
  {
297
330
  id: "page-size-select",
298
- className: `${g}__page-size-select`,
299
- value: h.pageSize,
300
- onChange: (i) => m(Number(i.target.value)),
301
- children: Z.map((i) => /* @__PURE__ */ n("option", { value: i, children: i }, i))
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
- }, Pe = () => `block-${Date.now()}-${Math.random().toString(36).substring(2, 11)}`, ve = (e = "paragraph") => ({
308
- id: Pe(),
309
- type: e,
340
+ }, tt = () => `block-${Date.now()}-${Math.random().toString(36).substring(2, 11)}`, Le = (t = "paragraph") => ({
341
+ id: tt(),
342
+ type: t,
310
343
  content: "",
311
344
  format: {}
312
- }), ur = ({
313
- initialBlocks: e = [],
314
- onChange: t,
345
+ }), Gr = ({
346
+ initialBlocks: t = [],
347
+ onChange: e,
315
348
  placeholder: r = "Start typing...",
316
- readOnly: a = !1,
317
- className: o = "",
318
- maxHeight: p
349
+ readOnly: i = !1,
350
+ theme: a = "light",
351
+ className: m = "",
352
+ maxHeight: s
319
353
  }) => {
320
- const [f, v] = F(
321
- e.length > 0 ? e : [ve()]
322
- ), [$, G] = F(null), [P, q] = F(null), [h, j] = F(!1), A = ee(null);
323
- se(() => {
324
- t && t(f);
325
- }, [f, t]);
326
- const Z = N((l, y) => {
327
- v((c) => c.map((b) => b.id === l ? { ...b, ...y } : b));
328
- }, []), O = N((l = "paragraph", y) => {
329
- const c = ve(l);
330
- v((b) => {
331
- if (!y)
332
- return [...b, c];
333
- const z = b.findIndex((ne) => ne.id === y), E = [...b];
334
- return E.splice(z + 1, 0, c), E;
335
- }), G(c.id);
336
- }, []), S = N((l) => {
337
- v((y) => {
338
- const c = y.filter((b) => b.id !== l);
339
- return c.length > 0 ? c : [ve()];
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
- }, []), R = N((l, y) => {
342
- v((c) => {
343
- const b = c.findIndex((ae) => ae.id === l), z = c.findIndex((ae) => ae.id === y);
344
- if (b === -1 || z === -1) return c;
345
- const E = [...c], [ne] = E.splice(b, 1);
346
- return E.splice(z, 0, ne), E;
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
- }, []), Q = N(
349
- (l, y) => {
350
- a || (q(y), l.dataTransfer.effectAllowed = "move");
382
+ }, []), O = B(
383
+ (f, N) => {
384
+ i || (P(N), f.dataTransfer.effectAllowed = "move");
351
385
  },
352
- [a]
353
- ), K = N((l) => {
354
- l.preventDefault(), l.dataTransfer.dropEffect = "move";
355
- }, []), k = N(
356
- (l, y) => {
357
- l.preventDefault(), P && P !== y && R(P, y), q(null);
386
+ [i]
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
- [P, R]
360
- ), V = N(() => {
361
- q(null);
362
- }, []), C = N(
363
- (l) => {
364
- $ && v(
365
- (y) => y.map((c) => {
366
- if (c.id === $) {
367
- const b = c.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
- ...c,
403
+ ...x,
370
404
  format: {
371
- ...b,
372
- [l]: !b[l]
405
+ ...w,
406
+ [f]: !w[f]
373
407
  }
374
408
  };
375
409
  }
376
- return c;
410
+ return x;
377
411
  })
378
412
  );
379
413
  },
380
- [$]
381
- ), H = N(
382
- (l, y) => {
383
- Z(l, { type: y });
414
+ [L]
415
+ ), U = B(
416
+ (f, N) => {
417
+ d(f, { type: N });
384
418
  },
385
- [Z]
386
- ), D = N(
387
- (l, y) => {
388
- if (!a) {
389
- if ((l.metaKey || l.ctrlKey) && l.key === "b")
390
- l.preventDefault(), C("bold");
391
- else if ((l.metaKey || l.ctrlKey) && l.key === "i")
392
- l.preventDefault(), C("italic");
393
- else if ((l.metaKey || l.ctrlKey) && l.key === "u")
394
- l.preventDefault(), C("underline");
395
- else if (l.key === "Enter" && !l.shiftKey) {
396
- const c = f.find((b) => b.id === y);
397
- c && c.type !== "code" && (l.preventDefault(), O("paragraph", y));
398
- } else if (l.key === "Backspace") {
399
- const c = f.find((b) => b.id === y);
400
- c && !c.content && f.length > 1 && (l.preventDefault(), S(y));
419
+ [d]
420
+ ), R = B(
421
+ (f, N) => {
422
+ if (!i) {
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
- [a, f, C, O, S]
405
- );
406
- return /* @__PURE__ */ u("div", { className: `uiforge-blocks-editor ${o}`, ref: A, style: { maxHeight: p }, children: [
407
- !a && h && $ && /* @__PURE__ */ n(
408
- Ve,
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: f.find((l) => l.id === $),
411
- onFormatToggle: C,
412
- onBlockTypeChange: (l) => H($, l)
444
+ selectedBlock: l.find((f) => f.id === L),
445
+ onFormatToggle: A,
446
+ onBlockTypeChange: (f) => U(L, f)
413
447
  }
414
448
  ),
415
- /* @__PURE__ */ n("div", { className: "uiforge-blocks-editor__content", children: f.map((l, y) => /* @__PURE__ */ n(
416
- De,
449
+ /* @__PURE__ */ n("div", { className: "uiforge-blocks-editor__content", children: l.map((f, N) => /* @__PURE__ */ n(
450
+ nt,
417
451
  {
418
- block: l,
419
- isSelected: $ === l.id,
420
- isDragging: P === l.id,
421
- readOnly: a,
422
- placeholder: y === 0 && f.length === 1 ? r : void 0,
452
+ block: f,
453
+ isSelected: L === f.id,
454
+ isDragging: E === f.id,
455
+ readOnly: i,
456
+ placeholder: N === 0 && l.length === 1 ? r : void 0,
423
457
  onSelect: () => {
424
- G(l.id), j(!0);
458
+ k(f.id), _(!0);
425
459
  },
426
- onChange: (c) => Z(l.id, c),
427
- onDelete: () => S(l.id),
428
- onDragStart: (c) => Q(c, l.id),
429
- onDragOver: K,
430
- onDrop: (c) => k(c, l.id),
431
- onDragEnd: V,
432
- onKeyDown: (c) => D(c, l.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
- l.id
468
+ f.id
435
469
  )) }),
436
- !a && /* @__PURE__ */ n(Be, { onAddBlock: O })
470
+ !i && /* @__PURE__ */ n(it, { onAddBlock: u })
437
471
  ] });
438
- }, Ve = ({ selectedBlock: e, onFormatToggle: t, onBlockTypeChange: r }) => {
439
- if (!e) return null;
440
- const a = e.format || {};
441
- return /* @__PURE__ */ u("div", { className: "uiforge-blocks-editor__toolbar", role: "toolbar", "aria-label": "Text formatting", children: [
442
- /* @__PURE__ */ n("div", { className: "uiforge-blocks-editor__toolbar-group", children: /* @__PURE__ */ u(
472
+ }, rt = ({ selectedBlock: t, onFormatToggle: e, onBlockTypeChange: r }) => {
473
+ if (!t) return null;
474
+ const i = t.format || {};
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
- value: e.type,
446
- onChange: (o) => r(o.target.value),
479
+ value: t.type,
480
+ onChange: (a) => r(a.target.value),
447
481
  className: "uiforge-blocks-editor__toolbar-select",
448
482
  "aria-label": "Block type",
449
483
  children: [
@@ -459,16 +493,16 @@ const cr = ({
459
493
  }
460
494
  ) }),
461
495
  /* @__PURE__ */ n("div", { className: "uiforge-blocks-editor__toolbar-divider" }),
462
- /* @__PURE__ */ u("div", { className: "uiforge-blocks-editor__toolbar-group", children: [
496
+ /* @__PURE__ */ y("div", { className: "uiforge-blocks-editor__toolbar-group", children: [
463
497
  /* @__PURE__ */ n(
464
498
  "button",
465
499
  {
466
500
  type: "button",
467
- className: `uiforge-blocks-editor__toolbar-button ${a.bold ? "active" : ""}`,
468
- onClick: () => t("bold"),
501
+ className: `uiforge-blocks-editor__toolbar-button ${i.bold ? "active" : ""}`,
502
+ onClick: () => e("bold"),
469
503
  title: "Bold (Ctrl+B)",
470
504
  "aria-label": "Bold",
471
- "aria-pressed": a.bold,
505
+ "aria-pressed": i.bold,
472
506
  children: /* @__PURE__ */ n("strong", { children: "B" })
473
507
  }
474
508
  ),
@@ -476,11 +510,11 @@ const cr = ({
476
510
  "button",
477
511
  {
478
512
  type: "button",
479
- className: `uiforge-blocks-editor__toolbar-button ${a.italic ? "active" : ""}`,
480
- onClick: () => t("italic"),
513
+ className: `uiforge-blocks-editor__toolbar-button ${i.italic ? "active" : ""}`,
514
+ onClick: () => e("italic"),
481
515
  title: "Italic (Ctrl+I)",
482
516
  "aria-label": "Italic",
483
- "aria-pressed": a.italic,
517
+ "aria-pressed": i.italic,
484
518
  children: /* @__PURE__ */ n("em", { children: "I" })
485
519
  }
486
520
  ),
@@ -488,11 +522,11 @@ const cr = ({
488
522
  "button",
489
523
  {
490
524
  type: "button",
491
- className: `uiforge-blocks-editor__toolbar-button ${a.underline ? "active" : ""}`,
492
- onClick: () => t("underline"),
525
+ className: `uiforge-blocks-editor__toolbar-button ${i.underline ? "active" : ""}`,
526
+ onClick: () => e("underline"),
493
527
  title: "Underline (Ctrl+U)",
494
528
  "aria-label": "Underline",
495
- "aria-pressed": a.underline,
529
+ "aria-pressed": i.underline,
496
530
  children: /* @__PURE__ */ n("u", { children: "U" })
497
531
  }
498
532
  ),
@@ -500,92 +534,92 @@ const cr = ({
500
534
  "button",
501
535
  {
502
536
  type: "button",
503
- className: `uiforge-blocks-editor__toolbar-button ${a.code ? "active" : ""}`,
504
- onClick: () => t("code"),
537
+ className: `uiforge-blocks-editor__toolbar-button ${i.code ? "active" : ""}`,
538
+ onClick: () => e("code"),
505
539
  title: "Inline Code",
506
540
  "aria-label": "Code",
507
- "aria-pressed": a.code,
541
+ "aria-pressed": i.code,
508
542
  children: "</>"
509
543
  }
510
544
  )
511
545
  ] })
512
546
  ] });
513
- }, De = ({
514
- block: e,
515
- isSelected: t,
547
+ }, nt = ({
548
+ block: t,
549
+ isSelected: e,
516
550
  isDragging: r,
517
- readOnly: a,
518
- placeholder: o,
519
- onSelect: p,
520
- onChange: f,
521
- onDelete: v,
551
+ readOnly: i,
552
+ placeholder: a,
553
+ onSelect: m,
554
+ onChange: s,
555
+ onDelete: l,
522
556
  onDragStart: $,
523
- onDragOver: G,
524
- onDrop: P,
525
- onDragEnd: q,
526
- onKeyDown: h
557
+ onDragOver: L,
558
+ onDrop: k,
559
+ onDragEnd: E,
560
+ onKeyDown: P
527
561
  }) => {
528
- const j = [
562
+ const c = [
529
563
  "uiforge-blocks-editor__block",
530
- `uiforge-blocks-editor__block--${e.type}`,
531
- t ? "uiforge-blocks-editor__block--selected" : "",
564
+ `uiforge-blocks-editor__block--${t.type}`,
565
+ e ? "uiforge-blocks-editor__block--selected" : "",
532
566
  r ? "uiforge-blocks-editor__block--dragging" : ""
533
- ].filter(Boolean).join(" "), A = [
567
+ ].filter(Boolean).join(" "), _ = [
534
568
  "uiforge-blocks-editor__block-text",
535
- e.format?.bold ? "uiforge-blocks-editor__block-text--bold" : "",
536
- e.format?.italic ? "uiforge-blocks-editor__block-text--italic" : "",
537
- e.format?.underline ? "uiforge-blocks-editor__block-text--underline" : "",
538
- e.format?.code ? "uiforge-blocks-editor__block-text--code" : ""
539
- ].filter(Boolean).join(" "), Z = (S) => {
540
- f({ content: S.target.value });
541
- }, O = () => {
542
- const S = {
543
- value: e.content,
544
- onChange: Z,
545
- onFocus: p,
546
- onKeyDown: h,
547
- placeholder: o,
548
- readOnly: a,
549
- className: A
569
+ t.format?.bold ? "uiforge-blocks-editor__block-text--bold" : "",
570
+ t.format?.italic ? "uiforge-blocks-editor__block-text--italic" : "",
571
+ t.format?.underline ? "uiforge-blocks-editor__block-text--underline" : "",
572
+ t.format?.code ? "uiforge-blocks-editor__block-text--code" : ""
573
+ ].filter(Boolean).join(" "), o = (u) => {
574
+ s({ content: u.target.value });
575
+ }, d = () => {
576
+ const u = {
577
+ value: t.content,
578
+ onChange: o,
579
+ onFocus: m,
580
+ onKeyDown: P,
581
+ placeholder: a,
582
+ readOnly: i,
583
+ className: _
550
584
  };
551
- switch (e.type) {
585
+ switch (t.type) {
552
586
  case "heading1":
553
587
  return /* @__PURE__ */ n(
554
588
  "input",
555
589
  {
556
- ...S,
590
+ ...u,
557
591
  type: "text",
558
- className: `${A} uiforge-blocks-editor__heading1`,
559
- placeholder: o || "Heading 1"
592
+ className: `${_} uiforge-blocks-editor__heading1`,
593
+ placeholder: a || "Heading 1"
560
594
  }
561
595
  );
562
596
  case "heading2":
563
597
  return /* @__PURE__ */ n(
564
598
  "input",
565
599
  {
566
- ...S,
600
+ ...u,
567
601
  type: "text",
568
- className: `${A} uiforge-blocks-editor__heading2`,
569
- placeholder: o || "Heading 2"
602
+ className: `${_} uiforge-blocks-editor__heading2`,
603
+ placeholder: a || "Heading 2"
570
604
  }
571
605
  );
572
606
  case "heading3":
573
607
  return /* @__PURE__ */ n(
574
608
  "input",
575
609
  {
576
- ...S,
610
+ ...u,
577
611
  type: "text",
578
- className: `${A} uiforge-blocks-editor__heading3`,
579
- placeholder: o || "Heading 3"
612
+ className: `${_} uiforge-blocks-editor__heading3`,
613
+ placeholder: a || "Heading 3"
580
614
  }
581
615
  );
582
616
  case "code":
583
617
  return /* @__PURE__ */ n(
584
618
  "textarea",
585
619
  {
586
- ...S,
587
- className: `${A} uiforge-blocks-editor__code`,
588
- placeholder: o || "Code block",
620
+ ...u,
621
+ className: `${_} uiforge-blocks-editor__code`,
622
+ placeholder: a || "Code block",
589
623
  rows: 4
590
624
  }
591
625
  );
@@ -593,41 +627,41 @@ const cr = ({
593
627
  return /* @__PURE__ */ n(
594
628
  "textarea",
595
629
  {
596
- ...S,
597
- className: `${A} uiforge-blocks-editor__quote`,
598
- placeholder: o || "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__ */ u("div", { className: "uiforge-blocks-editor__image-block", children: [
637
+ return /* @__PURE__ */ y("div", { className: "uiforge-blocks-editor__image-block", children: [
604
638
  /* @__PURE__ */ n(
605
639
  "input",
606
640
  {
607
641
  type: "text",
608
- value: e.imageUrl || "",
609
- onChange: (R) => f({ imageUrl: R.target.value }),
642
+ value: t.imageUrl || "",
643
+ onChange: (g) => s({ imageUrl: g.target.value }),
610
644
  placeholder: "Image URL",
611
645
  className: "uiforge-blocks-editor__image-url",
612
- readOnly: a
646
+ readOnly: i
613
647
  }
614
648
  ),
615
649
  /* @__PURE__ */ n(
616
650
  "input",
617
651
  {
618
652
  type: "text",
619
- value: e.imageAlt || "",
620
- onChange: (R) => f({ imageAlt: R.target.value }),
653
+ value: t.imageAlt || "",
654
+ onChange: (g) => s({ imageAlt: g.target.value }),
621
655
  placeholder: "Alt text",
622
656
  className: "uiforge-blocks-editor__image-alt",
623
- readOnly: a
657
+ readOnly: i
624
658
  }
625
659
  ),
626
- e.imageUrl && /* @__PURE__ */ n(
660
+ t.imageUrl && /* @__PURE__ */ n(
627
661
  "img",
628
662
  {
629
- src: e.imageUrl,
630
- alt: e.imageAlt || "Block image",
663
+ src: t.imageUrl,
664
+ alt: t.imageAlt || "Block image",
631
665
  className: "uiforge-blocks-editor__image-preview"
632
666
  }
633
667
  )
@@ -636,27 +670,27 @@ const cr = ({
636
670
  return /* @__PURE__ */ n(
637
671
  "textarea",
638
672
  {
639
- ...S,
640
- className: `${A} uiforge-blocks-editor__paragraph`,
641
- placeholder: o || "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__ */ u(
682
+ return /* @__PURE__ */ y(
649
683
  "div",
650
684
  {
651
- className: j,
652
- draggable: !a,
685
+ className: c,
686
+ draggable: !i,
653
687
  onDragStart: $,
654
- onDragOver: G,
655
- onDrop: P,
656
- onDragEnd: q,
657
- "data-block-id": e.id,
688
+ onDragOver: L,
689
+ onDrop: k,
690
+ onDragEnd: E,
691
+ "data-block-id": t.id,
658
692
  children: [
659
- !a && /* @__PURE__ */ u("div", { className: "uiforge-blocks-editor__block-controls", children: [
693
+ !i && /* @__PURE__ */ y("div", { className: "uiforge-blocks-editor__block-controls", children: [
660
694
  /* @__PURE__ */ n(
661
695
  "button",
662
696
  {
@@ -672,32 +706,32 @@ const cr = ({
672
706
  {
673
707
  type: "button",
674
708
  className: "uiforge-blocks-editor__delete-button",
675
- onClick: v,
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__ */ n("div", { className: "uiforge-blocks-editor__block-content", children: O() })
716
+ /* @__PURE__ */ n("div", { className: "uiforge-blocks-editor__block-content", children: d() })
683
717
  ]
684
718
  }
685
719
  );
686
- }, Be = ({ onAddBlock: e }) => {
687
- const [t, r] = F(!1);
688
- return /* @__PURE__ */ u("div", { className: "uiforge-blocks-editor__block-menu", children: [
720
+ }, it = ({ onAddBlock: t }) => {
721
+ const [e, r] = te(!1);
722
+ return /* @__PURE__ */ y("div", { className: "uiforge-blocks-editor__block-menu", children: [
689
723
  /* @__PURE__ */ n(
690
724
  "button",
691
725
  {
692
726
  type: "button",
693
727
  className: "uiforge-blocks-editor__add-button",
694
- onClick: () => r(!t),
728
+ onClick: () => r(!e),
695
729
  "aria-label": "Add block",
696
- "aria-expanded": t,
730
+ "aria-expanded": e,
697
731
  children: "+ Add Block"
698
732
  }
699
733
  ),
700
- t && /* @__PURE__ */ n("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 cr = ({
706
740
  { type: "quote", label: "Quote", icon: '"' },
707
741
  { type: "code", label: "Code", icon: "</>" },
708
742
  { type: "image", label: "Image", icon: "🖼" }
709
- ].map(({ type: o, label: p, icon: f }) => /* @__PURE__ */ u(
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
- e(o), r(!1);
749
+ t(a), r(!1);
716
750
  },
717
751
  children: [
718
- /* @__PURE__ */ n("span", { className: "uiforge-blocks-editor__block-menu-icon", children: f }),
719
- /* @__PURE__ */ n("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
- o
756
+ a
723
757
  )) })
724
758
  ] });
725
759
  };
726
- function ge(e) {
727
- return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
760
+ function Me(t) {
761
+ return t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
728
762
  }
729
- function Ee(e) {
730
- const t = e.trim(), r = ["javascript:", "data:", "vbscript:", "file:"], a = t.toLowerCase();
731
- for (const o of r)
732
- if (a.startsWith(o))
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 t;
768
+ return e;
735
769
  }
736
- function hr(e) {
737
- return e.map((t) => {
738
- let r = ge(t.content);
739
- switch (t.format?.bold && (r = `<strong>${r}</strong>`), t.format?.italic && (r = `<em>${r}</em>`), t.format?.underline && (r = `<u>${r}</u>`), t.format?.code && (r = `<code>${r}</code>`), t.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 hr(e) {
746
780
  case "quote":
747
781
  return `<blockquote>${r}</blockquote>`;
748
782
  case "code":
749
- return `<pre><code>${ge(t.content)}</code></pre>`;
783
+ return `<pre><code>${Me(e.content)}</code></pre>`;
750
784
  case "image": {
751
- const a = Ee(t.imageUrl || ""), o = ge(t.imageAlt || "");
752
- return a ? `<img src="${a}" alt="${o}" />` : "";
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 hr(e) {
759
793
  }).join(`
760
794
  `);
761
795
  }
762
- function mr(e) {
763
- return e.map((t) => {
764
- let r = t.content;
765
- switch (t.format?.bold && (r = `**${r}**`), t.format?.italic && (r = `*${r}*`), t.format?.code && (r = `\`${r}\``), t.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 mr(e) {
773
807
  return `> ${r}`;
774
808
  case "code":
775
809
  return `\`\`\`
776
- ${t.content}
810
+ ${e.content}
777
811
  \`\`\``;
778
812
  case "image":
779
- return `![${t.imageAlt || ""}](${t.imageUrl || ""})`;
813
+ return `![${e.imageAlt || ""}](${e.imageUrl || ""})`;
780
814
  case "list":
781
815
  return `- ${r}`;
782
816
  default:
@@ -786,244 +820,247 @@ ${t.content}
786
820
 
787
821
  `);
788
822
  }
789
- function pr(e) {
790
- return JSON.stringify(e, null, 2);
823
+ function Qr(t) {
824
+ return JSON.stringify(t, null, 2);
791
825
  }
792
- const fr = ({
793
- options: e = [],
794
- value: t,
826
+ const Xr = ({
827
+ options: t = [],
828
+ value: e,
795
829
  onChange: r,
796
- onSearch: a,
797
- placeholder: o = "Select an option...",
798
- disabled: p = !1,
799
- clearable: f = !1,
800
- className: v = "",
801
- renderOption: $,
802
- renderValue: G,
803
- loading: P = !1,
804
- maxHeight: q = "300px",
805
- debounceMs: h = 300,
806
- searchable: j = !0,
807
- noOptionsMessage: A = "No options found",
808
- ariaLabel: Z,
809
- enableCache: O = !1,
810
- cacheTTL: S,
811
- refreshOnOpen: R = !1,
812
- onClearCache: Q,
813
- onForceRefresh: K
830
+ onSearch: i,
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 [k, V] = F(!1), [C, H] = F(""), [D, l] = F([]), [y, c] = F(0), [b, z] = F(!1), E = ee(null), ne = ee(null), ae = ee(null), X = ee(null), W = ee(null), oe = ee(a), s = ee(null), U = ee(!1), m = ee(/* @__PURE__ */ new Map()), L = ee(O), Y = ee(S), g = N((d, w = 0) => d.reduce((re, B) => {
816
- const J = { ...B, level: w };
817
- return re.push(J), B.children && B.children.length > 0 && re.push(...g(B.children, w + 1)), re;
818
- }, []), []), i = (d) => typeof d == "string" && (d.startsWith("http://") || d.startsWith("https://") || d.startsWith("data:") || d.startsWith("/")), x = te(() => g(D.length > 0 ? D : e).find((w) => w.value === t) || null, [t, e, D, g]), _ = N((d, w) => {
819
- if (!w.trim()) return d;
820
- const re = w.toLowerCase(), B = (J) => J.reduce((ie, de) => {
821
- const fe = de.label.toLowerCase().includes(re), pe = de.children ? B(de.children) : [];
822
- return (fe || pe.length > 0) && ie.push({
823
- ...de,
824
- children: pe.length > 0 ? pe : de.children
825
- }), ie;
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 B(d);
862
+ return Y(h);
828
863
  }, []);
829
- se(() => {
830
- oe.current = a, W.current = null;
831
- }, [a]), se(() => {
832
- L.current = O;
833
- }, [O]), se(() => {
834
- Y.current = S;
835
- }, [S]), se(() => {
836
- Q && Q(() => {
837
- m.current.clear();
838
- }), K && K(() => {
839
- if (!oe.current) return;
840
- s.current && s.current.abort(), s.current = new AbortController();
841
- const d = s.current.signal;
842
- z(!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 w = Date.now(), re = C, B = m.current.get(re), J = B && (!Y.current || w - B.timestamp < Y.current);
845
- let ie;
846
- L.current && J ? ie = B.data : (ie = await (oe.current ? oe.current(C, d) : a?.(C, d) ?? []), !d.aborted && L.current && m.current.set(re, { data: ie, timestamp: w })), d.aborted || (l(ie), W.current = C);
847
- } catch (w) {
848
- console.error(w), l([]);
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
- z(!1);
885
+ w(!1);
851
886
  }
852
887
  })();
853
888
  });
854
- }, [Q, K, C, a]), se(() => {
855
- if (a && k) {
856
- const d = W.current === C, w = !U.current && k;
857
- return d && !(R && w) ? void 0 : (X.current && clearTimeout(X.current), X.current = setTimeout(async () => {
858
- s.current && s.current.abort(), s.current = new AbortController();
859
- const B = s.current.signal;
860
- z(!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 J;
863
- const ie = C, de = m.current.get(ie), fe = Date.now(), pe = de && (!Y.current || fe - de.timestamp < Y.current);
864
- if (L.current && pe ? J = de.data : (J = await (oe.current ? oe.current(C, B) : a(C, B)), !B.aborted && L.current && m.current.set(ie, { data: J, timestamp: fe })), B.aborted) return;
865
- l(J), W.current = C;
866
- } catch (J) {
867
- console.error("Error fetching options:", J), l([]);
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
- z(!1);
904
+ w(!1);
870
905
  }
871
- }, h), () => {
872
- X.current && clearTimeout(X.current), s.current && (s.current.abort(), s.current = null);
906
+ }, c), () => {
907
+ ee.current && clearTimeout(ee.current), j.current && (j.current.abort(), j.current = null);
873
908
  });
874
- } else a || l(_(e, C));
875
- U.current = k;
876
- }, [C, k, e, h, _, R, a]), se(() => {
877
- a || l(e);
878
- }, [e, a]), se(() => {
879
- const d = (w) => {
880
- E.current && !E.current.contains(w.target) && (V(!1), H(""));
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", d), () => document.removeEventListener("mousedown", d);
917
+ return document.addEventListener("mousedown", h), () => document.removeEventListener("mousedown", h);
883
918
  }, []);
884
- const I = te(() => g(D.length > 0 ? D : e).filter((w) => !w.disabled), [D, e, g]), le = te(() => g(D.length > 0 ? D : e), [D, e, g]), M = te(() => {
885
- const d = /* @__PURE__ */ new Map();
886
- return le.forEach((w) => {
887
- const re = JSON.stringify({ value: w.value, label: w.label }), B = I.findIndex(
888
- (J) => J.value === w.value && J.label === w.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
- d.set(re, B);
891
- }), d;
892
- }, [le, I]), ue = (d) => {
893
- if (!p)
894
- switch (d.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
- d.preventDefault(), k ? c((w) => w < I.length - 1 ? w + 1 : 0) : V(!0);
931
+ h.preventDefault(), b ? N((z) => z < W.length - 1 ? z + 1 : 0) : M(!0);
897
932
  break;
898
933
  case "ArrowUp":
899
- d.preventDefault(), k && c((w) => w > 0 ? w - 1 : I.length - 1);
934
+ h.preventDefault(), b && N((z) => z > 0 ? z - 1 : W.length - 1);
900
935
  break;
901
936
  case "Enter":
902
- d.preventDefault(), k && I[y] ? he(I[y]) : V(!k);
937
+ h.preventDefault(), b && W[f] ? fe(W[f]) : M(!b);
903
938
  break;
904
939
  case "Escape":
905
- d.preventDefault(), V(!1), H("");
940
+ h.preventDefault(), M(!1), U("");
906
941
  break;
907
942
  case "Tab":
908
- k && (V(!1), H(""));
943
+ b && (M(!1), U(""));
909
944
  break;
910
945
  }
911
946
  };
912
- se(() => {
913
- if (k && ae.current) {
914
- const d = ae.current.querySelector(
915
- `[data-index="${y}"]`
947
+ ae(() => {
948
+ if (b && ie.current) {
949
+ const h = ie.current.querySelector(
950
+ `[data-index="${f}"]`
916
951
  );
917
- d && typeof d.scrollIntoView == "function" && d.scrollIntoView({ block: "nearest" });
918
- }
919
- }, [y, k]);
920
- const he = (d) => {
921
- d.disabled || (r?.(d.value, d), V(!1), H(""), c(0));
922
- }, ce = (d) => {
923
- d.stopPropagation(), r?.(null, null), H("");
924
- }, Le = () => {
925
- p || V((d) => {
926
- const w = !d;
927
- return w && setTimeout(() => ne.current?.focus(), 0), w;
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
- se(() => {
931
- k || (W.current = null);
932
- }, [k]);
933
- const Me = (d) => {
934
- H(d.target.value), k || V(!0), c(0);
935
- }, Ae = (d) => {
936
- const w = (d.level || 0) * 20;
937
- return /* @__PURE__ */ u("div", { className: "uiforge-combobox-option-content", style: { paddingLeft: `${w}px` }, children: [
938
- d.icon && /* @__PURE__ */ n("span", { className: "uiforge-combobox-option-icon", children: i(d.icon) ? /* @__PURE__ */ n(
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: d.icon,
976
+ src: h.icon,
942
977
  alt: "",
943
978
  className: "uiforge-combobox-option-icon-img"
944
979
  }
945
- ) : d.icon }),
946
- /* @__PURE__ */ n("span", { className: "uiforge-combobox-option-label", children: d.label })
980
+ ) : h.icon }),
981
+ /* @__PURE__ */ n("span", { className: "uiforge-combobox-option-label", children: h.label })
947
982
  ] });
948
- }, Se = (d) => d ? /* @__PURE__ */ u("div", { className: "uiforge-combobox-value-content", children: [
949
- d.icon && /* @__PURE__ */ n("span", { className: "uiforge-combobox-value-icon", children: i(d.icon) ? /* @__PURE__ */ n("img", { src: d.icon, alt: "", className: "uiforge-combobox-value-icon-img" }) : d.icon }),
950
- /* @__PURE__ */ n("span", { className: "uiforge-combobox-value-label", children: d.label })
951
- ] }) : o, T = "uiforge-combobox", Ue = [
952
- T,
953
- k && `${T}--open`,
954
- p && `${T}--disabled`,
955
- v
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__ */ u(
993
+ return /* @__PURE__ */ y(
958
994
  "div",
959
995
  {
960
- ref: E,
961
- className: Ue,
962
- onKeyDown: ue,
996
+ ref: se,
997
+ className: Q,
998
+ onKeyDown: K,
963
999
  role: "combobox",
964
- "aria-expanded": k,
1000
+ "aria-expanded": b,
965
1001
  "aria-haspopup": "listbox",
966
- "aria-label": Z,
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__ */ u("div", { className: `${T}-control`, onClick: Le, children: [
971
- j && k ? /* @__PURE__ */ n(
1007
+ /* @__PURE__ */ y("div", { className: `${D}-control`, onClick: ue, children: [
1008
+ _ && b ? /* @__PURE__ */ n(
972
1009
  "input",
973
1010
  {
974
- ref: ne,
1011
+ ref: J,
975
1012
  type: "text",
976
- className: `${T}-input`,
977
- value: C,
978
- onChange: Me,
979
- placeholder: o,
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": `${T}-listbox`
1019
+ "aria-controls": `${D}-listbox`
983
1020
  }
984
- ) : /* @__PURE__ */ n("div", { className: `${T}-value`, children: G ? G(x) : Se(x) }),
985
- /* @__PURE__ */ u("div", { className: `${T}-indicators`, children: [
986
- f && t !== null && t !== void 0 && !p && /* @__PURE__ */ n(
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: `${T}-clear`,
991
- onClick: ce,
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__ */ n("span", { className: `${T}-arrow`, children: "▼" })
1034
+ /* @__PURE__ */ n("span", { className: `${D}-arrow`, children: "▼" })
998
1035
  ] })
999
1036
  ] }),
1000
- k && /* @__PURE__ */ n(
1037
+ b && /* @__PURE__ */ n(
1001
1038
  "div",
1002
1039
  {
1003
- ref: ae,
1004
- className: `${T}-dropdown`,
1005
- style: { maxHeight: q },
1040
+ ref: ie,
1041
+ className: `${D}-dropdown`,
1042
+ style: { maxHeight: P },
1006
1043
  role: "listbox",
1007
- id: `${T}-listbox`,
1008
- children: P || b ? /* @__PURE__ */ n("div", { className: `${T}-loading`, children: "Loading..." }) : I.length === 0 ? /* @__PURE__ */ n("div", { className: `${T}-no-options`, children: A }) : le.map((d) => {
1009
- const w = JSON.stringify({ value: d.value, label: d.label }), re = M.get(w) ?? -1, B = d.value === t, J = re === y, ie = [
1010
- `${T}-option`,
1011
- B && `${T}-option--selected`,
1012
- J && `${T}-option--highlighted`,
1013
- d.disabled && `${T}-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
1052
  return /* @__PURE__ */ n(
1016
1053
  "div",
1017
1054
  {
1018
- className: ie,
1019
- onClick: () => he(d),
1055
+ className: pe,
1056
+ onClick: () => fe(h),
1020
1057
  role: "option",
1021
- "aria-selected": B,
1022
- "aria-disabled": d.disabled,
1023
- "data-index": re,
1024
- children: $ ? $(d) : Ae(d)
1058
+ "aria-selected": Y,
1059
+ "aria-disabled": h.disabled,
1060
+ "data-index": X,
1061
+ children: L ? L(h) : _e(h)
1025
1062
  },
1026
- w
1063
+ z
1027
1064
  );
1028
1065
  })
1029
1066
  }
@@ -1031,50 +1068,424 @@ const fr = ({
1031
1068
  ]
1032
1069
  }
1033
1070
  );
1034
- }, je = ({
1035
- size: e = 16,
1036
- className: t = "",
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 = ({
1446
+ size: t = 16,
1447
+ className: e = "",
1037
1448
  color: r = "currentColor"
1038
- }) => /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, 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" }) }), Oe = ({
1039
- size: e = 16,
1040
- className: t = "",
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 = ({
1450
+ size: t = 16,
1451
+ className: e = "",
1041
1452
  color: r = "currentColor"
1042
- }) => /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, 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" }) }), Re = ({
1043
- size: e = 16,
1044
- className: t = "",
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 = ({
1454
+ size: t = 16,
1455
+ className: e = "",
1045
1456
  color: r = "currentColor"
1046
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, children: [
1457
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1047
1458
  /* @__PURE__ */ n("path", { d: "M8 9.5a1.5 1.5 0 100-3 1.5 1.5 0 000 3z" }),
1048
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" })
1049
- ] }), He = ({
1050
- size: e = 16,
1051
- className: t = "",
1460
+ ] }), bt = ({
1461
+ size: t = 16,
1462
+ className: e = "",
1052
1463
  color: r = "currentColor"
1053
- }) => /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, 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" }) }), ze = ({
1054
- size: e = 16,
1055
- className: t = "",
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 = ({
1465
+ size: t = 16,
1466
+ className: e = "",
1056
1467
  color: r = "currentColor"
1057
- }) => /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, 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" }) }), We = ({
1058
- size: e = 16,
1059
- className: t = "",
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 = ({
1469
+ size: t = 16,
1470
+ className: e = "",
1060
1471
  color: r = "currentColor"
1061
- }) => /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, 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" }) }), Te = ({
1062
- size: e = 16,
1063
- className: t = "",
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 = ({
1473
+ size: t = 16,
1474
+ className: e = "",
1064
1475
  color: r = "currentColor"
1065
- }) => /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, 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" }) }), Fe = ({
1066
- size: e = 16,
1067
- className: t = "",
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 = ({
1477
+ size: t = 16,
1478
+ className: e = "",
1068
1479
  color: r = "currentColor"
1069
- }) => /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, 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" }) }), qe = ({
1070
- size: e = 16,
1071
- className: t = "",
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 = ({
1481
+ size: t = 16,
1482
+ className: e = "",
1072
1483
  color: r = "currentColor"
1073
- }) => /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, 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" }) }), Ze = ({
1074
- size: e = 20,
1075
- className: t = "",
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 = ({
1485
+ size: t = 20,
1486
+ className: e = "",
1076
1487
  color: r = "currentColor"
1077
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 20 20", fill: "none", className: t, children: [
1488
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 20 20", fill: "none", className: e, children: [
1078
1489
  /* @__PURE__ */ n(
1079
1490
  "path",
1080
1491
  {
@@ -1105,11 +1516,11 @@ const fr = ({
1105
1516
  strokeLinejoin: "round"
1106
1517
  }
1107
1518
  )
1108
- ] }), Ke = ({
1109
- size: e = 20,
1110
- className: t = "",
1519
+ ] }), kt = ({
1520
+ size: t = 20,
1521
+ className: e = "",
1111
1522
  color: r = "currentColor"
1112
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 20 20", fill: "none", className: t, children: [
1523
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 20 20", fill: "none", className: e, children: [
1113
1524
  /* @__PURE__ */ n(
1114
1525
  "path",
1115
1526
  {
@@ -1140,64 +1551,64 @@ const fr = ({
1140
1551
  strokeLinejoin: "round"
1141
1552
  }
1142
1553
  )
1143
- ] }), Ye = ({
1144
- size: e = 16,
1145
- className: t = "",
1554
+ ] }), St = ({
1555
+ size: t = 16,
1556
+ className: e = "",
1146
1557
  color: r = "currentColor"
1147
- }) => /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, 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" }) }), Je = ({
1148
- size: e = 16,
1149
- className: t = "",
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 = ({
1559
+ size: t = 16,
1560
+ className: e = "",
1150
1561
  color: r = "currentColor"
1151
- }) => /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, 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" }) }), Ge = ({
1152
- size: e = 16,
1153
- className: t = "",
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 = ({
1563
+ size: t = 16,
1564
+ className: e = "",
1154
1565
  color: r = "currentColor"
1155
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: "none", className: t, children: [
1566
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: "none", className: e, children: [
1156
1567
  /* @__PURE__ */ n("circle", { cx: "8", cy: "8", r: "7", stroke: r, strokeWidth: "1.5" }),
1157
1568
  /* @__PURE__ */ n("path", { d: "M8 1C11.866 1 15 4.134 15 8C15 11.866 11.866 15 8 15", fill: r }),
1158
1569
  /* @__PURE__ */ n("circle", { cx: "8", cy: "5", r: "2", fill: r === "currentColor" ? "white" : "#fff" }),
1159
1570
  /* @__PURE__ */ n("circle", { cx: "8", cy: "11", r: "2", fill: r }),
1160
1571
  /* @__PURE__ */ n("circle", { cx: "8", cy: "5", r: "0.5", fill: r }),
1161
1572
  /* @__PURE__ */ n("circle", { cx: "8", cy: "11", r: "0.5", fill: r === "currentColor" ? "white" : "#fff" })
1162
- ] }), Qe = ({
1163
- size: e = 16,
1164
- className: t = "",
1573
+ ] }), Mt = ({
1574
+ size: t = 16,
1575
+ className: e = "",
1165
1576
  color: r = "currentColor"
1166
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, children: [
1577
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1167
1578
  /* @__PURE__ */ n("circle", { cx: "8", cy: "3", r: "1.5" }),
1168
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" }),
1169
1580
  /* @__PURE__ */ n("path", { d: "M4 9L2 10M12 9L14 10", strokeWidth: "1", stroke: r, fill: "none" })
1170
- ] }), Xe = ({
1171
- size: e = 16,
1172
- className: t = "",
1581
+ ] }), At = ({
1582
+ size: t = 16,
1583
+ className: e = "",
1173
1584
  color: r = "currentColor"
1174
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, children: [
1585
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1175
1586
  /* @__PURE__ */ n("circle", { cx: "8", cy: "2.5", r: "1.5" }),
1176
1587
  /* @__PURE__ */ n("path", { d: "M8 4.5L6 8L4 14H6L7 10H9L10 14H12L10 8L8 4.5Z" }),
1177
1588
  /* @__PURE__ */ n("path", { d: "M6 8L3 6M10 8L13 6", strokeWidth: "1.5", stroke: r, fill: "none" })
1178
- ] }), et = ({
1179
- size: e = 16,
1180
- className: t = "",
1589
+ ] }), Pt = ({
1590
+ size: t = 16,
1591
+ className: e = "",
1181
1592
  color: r = "currentColor"
1182
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, children: [
1593
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1183
1594
  /* @__PURE__ */ n("rect", { x: "1", y: "6", width: "2", height: "4", rx: "0.5" }),
1184
1595
  /* @__PURE__ */ n("rect", { x: "13", y: "6", width: "2", height: "4", rx: "0.5" }),
1185
1596
  /* @__PURE__ */ n("rect", { x: "3", y: "5.5", width: "1", height: "5" }),
1186
1597
  /* @__PURE__ */ n("rect", { x: "12", y: "5.5", width: "1", height: "5" }),
1187
1598
  /* @__PURE__ */ n("rect", { x: "4", y: "7", width: "8", height: "2", rx: "0.5" })
1188
- ] }), tt = ({
1189
- size: e = 16,
1190
- className: t = "",
1599
+ ] }), Et = ({
1600
+ size: t = 16,
1601
+ className: e = "",
1191
1602
  color: r = "currentColor"
1192
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, children: [
1603
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1193
1604
  /* @__PURE__ */ n("circle", { cx: "10", cy: "2.5", r: "1.5" }),
1194
1605
  /* @__PURE__ */ n("path", { d: "M9 4.5L8 6L6 7L4 8L6 9L8 8L10 7L11 9L10 12L9 14H11L12 11L13 9L12 6L10 4.5H9Z" }),
1195
1606
  /* @__PURE__ */ n("path", { d: "M6 14H4L5 11" })
1196
- ] }), rt = ({
1197
- size: e = 16,
1198
- className: t = "",
1607
+ ] }), Dt = ({
1608
+ size: t = 16,
1609
+ className: e = "",
1199
1610
  color: r = "currentColor"
1200
- }) => /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: "none", className: t, children: /* @__PURE__ */ n(
1611
+ }) => /* @__PURE__ */ n("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: "none", className: e, children: /* @__PURE__ */ n(
1201
1612
  "path",
1202
1613
  {
1203
1614
  d: "M2 8H5L6.5 5L8 11L9.5 8H14",
@@ -1206,41 +1617,41 @@ const fr = ({
1206
1617
  strokeLinecap: "round",
1207
1618
  strokeLinejoin: "round"
1208
1619
  }
1209
- ) }), nt = ({
1210
- size: e = 16,
1211
- className: t = "",
1620
+ ) }), zt = ({
1621
+ size: t = 16,
1622
+ className: e = "",
1212
1623
  color: r = "currentColor"
1213
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, children: [
1624
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1214
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" }),
1215
1626
  /* @__PURE__ */ n("circle", { cx: "7", cy: "3", r: "1.5" })
1216
- ] }), at = ({
1217
- size: e = 16,
1218
- className: t = "",
1627
+ ] }), Ot = ({
1628
+ size: t = 16,
1629
+ className: e = "",
1219
1630
  color: r = "currentColor"
1220
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, children: [
1631
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1221
1632
  /* @__PURE__ */ n("rect", { x: "2", y: "2", width: "12", height: "3", rx: "0.5" }),
1222
1633
  /* @__PURE__ */ n("rect", { x: "2", y: "6.5", width: "12", height: "3", rx: "0.5" }),
1223
1634
  /* @__PURE__ */ n("rect", { x: "2", y: "11", width: "12", height: "3", rx: "0.5" }),
1224
1635
  /* @__PURE__ */ n("circle", { cx: "4", cy: "3.5", r: "0.5" }),
1225
1636
  /* @__PURE__ */ n("circle", { cx: "4", cy: "8", r: "0.5" }),
1226
1637
  /* @__PURE__ */ n("circle", { cx: "4", cy: "12.5", r: "0.5" })
1227
- ] }), ot = ({
1228
- size: e = 16,
1229
- className: t = "",
1638
+ ] }), Ut = ({
1639
+ size: t = 16,
1640
+ className: e = "",
1230
1641
  color: r = "currentColor"
1231
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, children: [
1642
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1232
1643
  /* @__PURE__ */ n("ellipse", { cx: "8", cy: "3", rx: "5", ry: "2" }),
1233
1644
  /* @__PURE__ */ n("path", { d: "M3 3V13C3 14.1 5.2 15 8 15C10.8 15 13 14.1 13 13V3" }),
1234
1645
  /* @__PURE__ */ n("path", { d: "M3 8C3 9.1 5.2 10 8 10C10.8 10 13 9.1 13 8" })
1235
- ] }), it = ({
1236
- size: e = 16,
1237
- className: t = "",
1646
+ ] }), Vt = ({
1647
+ size: t = 16,
1648
+ className: e = "",
1238
1649
  color: r = "currentColor"
1239
- }) => /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, 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" }) }), st = ({
1240
- size: e = 16,
1241
- className: t = "",
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 = ({
1651
+ size: t = 16,
1652
+ className: e = "",
1242
1653
  color: r = "currentColor"
1243
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, children: [
1654
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1244
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" }),
1245
1656
  /* @__PURE__ */ n(
1246
1657
  "path",
@@ -1265,11 +1676,11 @@ const fr = ({
1265
1676
  strokeLinecap: "round"
1266
1677
  }
1267
1678
  )
1268
- ] }), lt = ({
1269
- size: e = 16,
1270
- className: t = "",
1679
+ ] }), Tt = ({
1680
+ size: t = 16,
1681
+ className: e = "",
1271
1682
  color: r = "currentColor"
1272
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, children: [
1683
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1273
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" }),
1274
1685
  /* @__PURE__ */ n(
1275
1686
  "path",
@@ -1281,22 +1692,22 @@ const fr = ({
1281
1692
  }
1282
1693
  ),
1283
1694
  /* @__PURE__ */ n("ellipse", { cx: "8", cy: "4", rx: "2.5", ry: "1.5" })
1284
- ] }), ct = ({
1285
- size: e = 16,
1286
- className: t = "",
1695
+ ] }), Bt = ({
1696
+ size: t = 16,
1697
+ className: e = "",
1287
1698
  color: r = "currentColor"
1288
- }) => /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, 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" }) }), dt = ({
1289
- size: e = 16,
1290
- className: t = "",
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 = ({
1700
+ size: t = 16,
1701
+ className: e = "",
1291
1702
  color: r = "currentColor"
1292
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, children: [
1703
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1293
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" }),
1294
1705
  /* @__PURE__ */ n("path", { d: "M2 12C2 12 0 14 0 16C2 16 4 14 4 14" })
1295
- ] }), ut = ({
1296
- size: e = 16,
1297
- className: t = "",
1706
+ ] }), Ht = ({
1707
+ size: t = 16,
1708
+ className: e = "",
1298
1709
  color: r = "currentColor"
1299
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, children: [
1710
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1300
1711
  /* @__PURE__ */ n("rect", { x: "6", y: "6", width: "4", height: "4", rx: "0.5" }),
1301
1712
  /* @__PURE__ */ n(
1302
1713
  "path",
@@ -1312,21 +1723,21 @@ const fr = ({
1312
1723
  /* @__PURE__ */ n("rect", { x: "1", y: "13.5", width: "1.5", height: "1.5" }),
1313
1724
  /* @__PURE__ */ n("rect", { x: "13.5", y: "13.5", width: "1.5", height: "1.5" }),
1314
1725
  /* @__PURE__ */ n("circle", { cx: "8", cy: "8", r: "1" })
1315
- ] }), ht = ({
1316
- size: e = 16,
1317
- className: t = "",
1726
+ ] }), Wt = ({
1727
+ size: t = 16,
1728
+ className: e = "",
1318
1729
  color: r = "currentColor"
1319
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, children: [
1730
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1320
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" }),
1321
1732
  /* @__PURE__ */ n("ellipse", { cx: "6", cy: "5.5", rx: "1.5", ry: "2", fill: "white" }),
1322
1733
  /* @__PURE__ */ n("ellipse", { cx: "10", cy: "5.5", rx: "1.5", ry: "2", fill: "white" }),
1323
1734
  /* @__PURE__ */ n("circle", { cx: "6", cy: "5.5", r: "0.75", fill: r }),
1324
1735
  /* @__PURE__ */ n("circle", { cx: "10", cy: "5.5", r: "0.75", fill: r })
1325
- ] }), mt = ({
1326
- size: e = 16,
1327
- className: t = "",
1736
+ ] }), Ft = ({
1737
+ size: t = 16,
1738
+ className: e = "",
1328
1739
  color: r = "currentColor"
1329
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, children: [
1740
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1330
1741
  /* @__PURE__ */ n("circle", { cx: "8", cy: "8", r: "5" }),
1331
1742
  /* @__PURE__ */ n(
1332
1743
  "ellipse",
@@ -1342,57 +1753,57 @@ const fr = ({
1342
1753
  }
1343
1754
  ),
1344
1755
  /* @__PURE__ */ n("circle", { cx: "6", cy: "6", r: "1", opacity: "0.4", fill: r === "currentColor" ? "white" : "#fff" })
1345
- ] }), pt = ({
1346
- size: e = 16,
1347
- className: t = "",
1756
+ ] }), qt = ({
1757
+ size: t = 16,
1758
+ className: e = "",
1348
1759
  color: r = "currentColor"
1349
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, children: [
1760
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1350
1761
  /* @__PURE__ */ n("path", { d: "M1 8L6 6L14 2L12 10L10 8L8 14H6L8 8L1 8Z" }),
1351
1762
  /* @__PURE__ */ n("path", { d: "M10 8L12 10", strokeWidth: "1.5", stroke: r })
1352
- ] }), ft = ({
1353
- size: e = 16,
1354
- className: t = "",
1763
+ ] }), Kt = ({
1764
+ size: t = 16,
1765
+ className: e = "",
1355
1766
  color: r = "currentColor"
1356
- }) => /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, 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" }) }), vt = ({
1357
- size: e = 16,
1358
- className: t = "",
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 = ({
1768
+ size: t = 16,
1769
+ className: e = "",
1359
1770
  color: r = "currentColor"
1360
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, children: [
1771
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1361
1772
  /* @__PURE__ */ n("circle", { cx: "5", cy: "4", r: "2" }),
1362
1773
  /* @__PURE__ */ n("circle", { cx: "11", cy: "4", r: "2" }),
1363
1774
  /* @__PURE__ */ n("path", { d: "M1 14V12C1 10.5 2.5 9 5 9C7.5 9 9 10.5 9 12V14H1Z" }),
1364
1775
  /* @__PURE__ */ n("path", { d: "M7 14V12C7 10.5 8.5 9 11 9C13.5 9 15 10.5 15 12V14H7Z" })
1365
- ] }), gt = ({
1366
- size: e = 16,
1367
- className: t = "",
1776
+ ] }), Gt = ({
1777
+ size: t = 16,
1778
+ className: e = "",
1368
1779
  color: r = "currentColor"
1369
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, children: [
1780
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1370
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" }),
1371
1782
  /* @__PURE__ */ n("path", { d: "M10 0v3.5c0 .275.225.5.5.5H14", fill: r === "currentColor" ? "white" : "#fff" })
1372
- ] }), yt = ({
1373
- size: e = 16,
1374
- className: t = "",
1783
+ ] }), Yt = ({
1784
+ size: t = 16,
1785
+ className: e = "",
1375
1786
  color: r = "currentColor"
1376
- }) => /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, 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" }) }), bt = ({
1377
- size: e = 16,
1378
- className: t = "",
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 = ({
1788
+ size: t = 16,
1789
+ className: e = "",
1379
1790
  color: r = "currentColor"
1380
- }) => /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, 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" }) }), wt = ({
1381
- size: e = 16,
1382
- className: t = "",
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 = ({
1792
+ size: t = 16,
1793
+ className: e = "",
1383
1794
  color: r = "currentColor"
1384
- }) => /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, 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" }) }), _t = ({
1385
- size: e = 16,
1386
- className: t = "",
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 = ({
1796
+ size: t = 16,
1797
+ className: e = "",
1387
1798
  color: r = "currentColor"
1388
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, children: [
1799
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1389
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" }),
1390
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" })
1391
- ] }), xt = ({
1392
- size: e = 16,
1393
- className: t = "",
1802
+ ] }), er = ({
1803
+ size: t = 16,
1804
+ className: e = "",
1394
1805
  color: r = "currentColor"
1395
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, children: [
1806
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1396
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" }),
1397
1808
  /* @__PURE__ */ n("circle", { cx: "7", cy: "8", r: "1", fill: r === "currentColor" ? "white" : "#fff", opacity: "0.5" }),
1398
1809
  /* @__PURE__ */ n(
@@ -1405,11 +1816,11 @@ const fr = ({
1405
1816
  opacity: "0.5"
1406
1817
  }
1407
1818
  )
1408
- ] }), $t = ({
1409
- size: e = 16,
1410
- className: t = "",
1819
+ ] }), tr = ({
1820
+ size: t = 16,
1821
+ className: e = "",
1411
1822
  color: r = "currentColor"
1412
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, children: [
1823
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1413
1824
  /* @__PURE__ */ n("path", { d: "M8 0L0 3v5c0 5 3 7.5 8 8 5-.5 8-3 8-8V3L8 0z" }),
1414
1825
  /* @__PURE__ */ n(
1415
1826
  "path",
@@ -1418,11 +1829,11 @@ const fr = ({
1418
1829
  fill: r === "currentColor" ? "white" : "#fff"
1419
1830
  }
1420
1831
  )
1421
- ] }), kt = ({
1422
- size: e = 16,
1423
- className: t = "",
1832
+ ] }), rr = ({
1833
+ size: t = 16,
1834
+ className: e = "",
1424
1835
  color: r = "currentColor"
1425
- }) => /* @__PURE__ */ u("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, children: [
1836
+ }) => /* @__PURE__ */ y("svg", { width: t, height: t, viewBox: "0 0 16 16", fill: r, className: e, children: [
1426
1837
  /* @__PURE__ */ n("rect", { x: "1", y: "1", width: "9", height: "11", rx: "1" }),
1427
1838
  /* @__PURE__ */ n(
1428
1839
  "line",
@@ -1459,124 +1870,215 @@ const fr = ({
1459
1870
  strokeLinecap: "round"
1460
1871
  }
1461
1872
  )
1462
- ] }), Ct = ({
1463
- size: e = 16,
1464
- className: t = "",
1873
+ ] }), nr = ({
1874
+ size: t = 16,
1875
+ className: e = "",
1465
1876
  color: r = "currentColor"
1466
- }) => /* @__PURE__ */ n("svg", { width: e, height: e, viewBox: "0 0 16 16", fill: r, className: t, 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" }) }), xe = {
1467
- commit: je,
1468
- pr: Oe,
1469
- issue: Re,
1470
- comment: He,
1471
- star: ze,
1472
- fork: We,
1473
- merge: Te,
1474
- release: Fe,
1475
- deploy: qe
1476
- }, $e = {
1477
- unfold: Ze,
1478
- fold: Ke,
1479
- close: Ye,
1480
- check: Je
1481
- }, vr = {
1482
- taichi: Ge,
1483
- meditation: Qe,
1484
- yoga: Xe
1485
- }, gr = {
1486
- dumbbell: et,
1487
- running: tt,
1488
- heartrate: rt,
1489
- strength: nt
1490
- }, yr = {
1491
- server: at,
1492
- database: ot,
1493
- cloud: it,
1494
- terminal: st,
1495
- bug: lt,
1496
- code: ct
1497
- }, br = {
1498
- rocket: dt,
1499
- satellite: ut,
1500
- alien: ht,
1501
- planet: mt,
1502
- telescope: pt
1503
- }, wr = {
1504
- chart: ft,
1505
- meeting: vt,
1506
- document: gt,
1507
- calendar: yt,
1508
- briefcase: bt
1509
- }, _r = {
1510
- gitbranch: wt,
1511
- prdraft: _t,
1512
- testing: xt,
1513
- deployment: $t,
1514
- review: kt,
1515
- build: Ct
1516
- }, It = (e) => {
1517
- const t = xe[e] || xe.commit;
1518
- return /* @__PURE__ */ n(t, { size: 16 });
1519
- }, ye = (e, t = 2) => {
1520
- if (e.length === 0) return [];
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) => {
2022
+ if (t.length === 0) return [];
1521
2023
  const r = [];
1522
- let a = [], o = null;
1523
- return e.forEach((p, f) => {
1524
- o === p.type ? a.push(p) : (a.length >= t && o ? r.push(ke(a, o)) : a.forEach((v) => {
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) => {
1525
2027
  r.push({
1526
- id: v.id.toString(),
1527
- type: v.type,
2028
+ id: l.id.toString(),
2029
+ type: l.type,
1528
2030
  count: 1,
1529
- title: v.title,
1530
- timestamp: new Date(v.timestamp),
1531
- icon: v.icon,
1532
- events: [v]
2031
+ title: l.title,
2032
+ timestamp: new Date(l.timestamp),
2033
+ icon: l.icon,
2034
+ events: [l]
1533
2035
  });
1534
- }), a = [p], o = p.type), f === e.length - 1 && (a.length >= t && o ? r.push(ke(a, o)) : a.forEach((v) => {
2036
+ }), i = [m], a = m.type), s === t.length - 1 && (i.length >= e && a ? r.push(qe(i, a)) : i.forEach((l) => {
1535
2037
  r.push({
1536
- id: v.id.toString(),
1537
- type: v.type,
2038
+ id: l.id.toString(),
2039
+ type: l.type,
1538
2040
  count: 1,
1539
- title: v.title,
1540
- timestamp: new Date(v.timestamp),
1541
- icon: v.icon,
1542
- events: [v]
2041
+ title: l.title,
2042
+ timestamp: new Date(l.timestamp),
2043
+ icon: l.icon,
2044
+ events: [l]
1543
2045
  });
1544
2046
  }));
1545
2047
  }), r;
1546
- }, ke = (e, t) => {
1547
- const r = e.reduce(
1548
- (f, v) => {
1549
- const $ = v.metadata?.repository || "unknown";
1550
- return f[$] || (f[$] = []), f[$].push(v), f;
2048
+ }, qe = (t, e) => {
2049
+ const r = t.reduce(
2050
+ (s, l) => {
2051
+ const $ = l.metadata?.repository || "unknown";
2052
+ return s[$] || (s[$] = []), s[$].push(l), s;
1551
2053
  },
1552
2054
  {}
1553
- ), a = Object.entries(r), o = a.length > 1;
1554
- let p = "";
1555
- if (o)
1556
- p = `Created ${e.length} ${be(t)} in ${a.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`;
1557
2059
  else {
1558
- const f = a[0][0];
1559
- p = `Created ${e.length} ${be(t)}${f !== "unknown" ? ` in ${f}` : ""}`;
2060
+ const s = i[0][0];
2061
+ m = `Created ${t.length} ${De(e)}${s !== "unknown" ? ` in ${s}` : ""}`;
1560
2062
  }
1561
2063
  return {
1562
- id: `group-${t}-${e[0].id}`,
1563
- type: t,
1564
- count: e.length,
1565
- title: p,
1566
- timestamp: new Date(e[0].timestamp),
1567
- icon: e[0].icon,
1568
- events: e,
1569
- children: o ? a.map(([f, v]) => ({
1570
- id: `group-${t}-${f}`,
1571
- type: t,
1572
- count: v.length,
1573
- title: `Created ${v.length} ${be(t)} in ${f}`,
1574
- timestamp: new Date(v[0].timestamp),
1575
- icon: v[0].icon,
1576
- events: v
2064
+ id: `group-${e}-${t[0].id}`,
2065
+ type: e,
2066
+ count: t.length,
2067
+ title: m,
2068
+ timestamp: new Date(t[0].timestamp),
2069
+ icon: t[0].icon,
2070
+ events: t,
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
1577
2079
  })) : void 0
1578
2080
  };
1579
- }, be = (e) => ({
2081
+ }, De = (t) => ({
1580
2082
  pr: "pull requests",
1581
2083
  issue: "issues",
1582
2084
  commit: "commits",
@@ -1586,966 +2088,1080 @@ const fr = ({
1586
2088
  merge: "merges",
1587
2089
  release: "releases",
1588
2090
  deploy: "deployments"
1589
- })[e] || `${e}s`, we = (e) => {
1590
- if (e.length === 0) return [];
1591
- const t = [];
2091
+ })[t] || `${t}s`, ze = (t) => {
2092
+ if (t.length === 0) return [];
2093
+ const e = [];
1592
2094
  let r = null;
1593
- return e.forEach((a, o) => {
1594
- if ("type" in a && a.type === "date-separator") {
1595
- t.push(a);
2095
+ return t.forEach((i, a) => {
2096
+ if ("type" in i && i.type === "date-separator") {
2097
+ e.push(i);
1596
2098
  return;
1597
2099
  }
1598
- const f = a.timestamp, v = `${f.getFullYear()}-${f.getMonth()}`;
1599
- if (v !== r) {
2100
+ const s = i.timestamp, l = `${s.getFullYear()}-${s.getMonth()}`;
2101
+ if (l !== r) {
1600
2102
  const $ = {
1601
- id: `sep-${o}`,
2103
+ id: `sep-${a}`,
1602
2104
  type: "date-separator",
1603
- date: f,
1604
- label: Nt(f)
2105
+ date: s,
2106
+ label: dr(s)
1605
2107
  };
1606
- t.push($), r = v;
1607
- }
1608
- t.push(a);
1609
- }), t;
1610
- }, Nt = (e) => e.toLocaleDateString("en-US", { month: "long", year: "numeric" }), Lt = (e) => {
1611
- const t = typeof e == "string" ? new Date(e) : e, a = (/* @__PURE__ */ new Date()).getTime() - t.getTime(), o = Math.floor(a / 1e3), p = Math.floor(o / 60), f = Math.floor(p / 60), v = Math.floor(f / 24);
1612
- return o < 60 ? "just now" : p < 60 ? `${p}m ago` : f < 24 ? `${f}h ago` : v < 30 ? `${v}d ago` : t.toLocaleDateString();
1613
- }, xr = ({
1614
- events: e,
1615
- theme: t = "light",
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 = ({
2116
+ events: t,
2117
+ theme: e = "light",
1616
2118
  className: r = "",
2119
+ style: i,
1617
2120
  showLoadMore: a = !0,
1618
- loading: o = !1,
1619
- onLoadMore: p,
1620
- pagination: f,
1621
- maxHeight: v,
1622
- showMoreThreshold: $ = 100,
1623
- initiallyExpandedAll: G = !1,
1624
- emptyMessage: P = "No activity to display",
1625
- onToggleExpand: q,
1626
- enableGrouping: h = !0,
1627
- groupingThreshold: j = 2,
1628
- showDateSeparators: A = !0,
1629
- showTimeline: Z = !0,
1630
- scale: O = 1,
1631
- renderIcon: S,
1632
- renderEvent: R
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
1633
2143
  }) => {
1634
- const [Q, K] = F(() => {
1635
- const s = /* @__PURE__ */ new Set();
1636
- return (h ? A ? we(ye(e, j)) : ye(e, j) : e.map((m) => ({
1637
- id: m.id.toString(),
1638
- type: m.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,
1639
2149
  count: 1,
1640
- title: m.title,
1641
- timestamp: new Date(m.timestamp),
1642
- icon: m.icon,
1643
- events: [m]
1644
- }))).forEach((m) => {
1645
- if ("events" in m && m.type !== "date-separator") {
1646
- const L = m;
1647
- (G || L.events.some((Y) => Y.initiallyExpanded)) && s.add(L.id), L.children && L.children.forEach((Y) => {
1648
- (G || Y.events.some((g) => g.initiallyExpanded)) && s.add(Y.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);
1649
2159
  });
1650
2160
  }
1651
- }), s;
1652
- }), [k, V] = F(!1), C = ee(null), H = ee(null), D = te(() => {
1653
- if (!h) {
1654
- const U = e.map((m) => ({
1655
- id: m.id.toString(),
1656
- type: m.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,
1657
2167
  count: 1,
1658
- title: m.title,
1659
- timestamp: new Date(m.timestamp),
1660
- icon: m.icon,
1661
- events: [m]
2168
+ title: V.title,
2169
+ timestamp: new Date(V.timestamp),
2170
+ icon: V.icon,
2171
+ events: [V]
1662
2172
  }));
1663
- return A ? we(U) : U;
1664
- }
1665
- const s = ye(e, j);
1666
- return A ? we(s) : s;
1667
- }, [e, h, j, A]), l = N(() => {
1668
- if (!H.current || !a || !p) return;
1669
- const { scrollTop: s, scrollHeight: U, clientHeight: m } = H.current, L = U - s - m;
1670
- V(L <= $);
1671
- }, [a, p, $]);
1672
- se(() => {
1673
- const s = H.current;
1674
- if (s)
1675
- return s.addEventListener("scroll", l), l(), () => {
1676
- s.removeEventListener("scroll", l);
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);
1677
2212
  };
1678
- }, [l]);
1679
- const y = N(
1680
- (s, U) => {
1681
- K((m) => {
1682
- const L = new Set(m), Y = L.has(s);
1683
- return Y ? L.delete(s) : L.add(s), q?.(U, !Y), L;
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;
1684
2219
  });
1685
2220
  },
1686
- [q]
1687
- ), c = (s, U = !1) => {
1688
- const m = Q.has(s.id), L = s.children && s.children.length > 0, Y = s.count > 1, g = s.count === 1 && s.events[0]?.description, i = Y || L || g, x = s.count === 1 && s.events.length === 1 ? s.events[0].id : s.id;
1689
- return R && s.count === 1 && s.events.length === 1 ? /* @__PURE__ */ u(
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(
1690
2225
  "div",
1691
2226
  {
1692
- className: `activity-stream__item ${U ? "activity-stream__item--child" : ""}`,
1693
- "data-event-id": s.id,
2227
+ className: `activity-stream__item ${D ? "activity-stream__item--child" : ""}`,
2228
+ "data-event-id": v.id,
1694
2229
  children: [
1695
- Z && !U && /* @__PURE__ */ n("div", { className: "activity-stream__timeline-marker" }),
1696
- R(s.events[0])
2230
+ d && !D && /* @__PURE__ */ n("div", { className: "activity-stream__timeline-marker" }),
2231
+ A(v.events[0])
1697
2232
  ]
1698
2233
  },
1699
- s.id
1700
- ) : /* @__PURE__ */ u(
2234
+ v.id
2235
+ ) : /* @__PURE__ */ y(
1701
2236
  "div",
1702
2237
  {
1703
- className: `activity-stream__item ${U ? "activity-stream__item--child" : ""}`,
1704
- "data-event-id": s.id,
2238
+ className: `activity-stream__item ${D ? "activity-stream__item--child" : ""}`,
2239
+ "data-event-id": v.id,
1705
2240
  children: [
1706
- Z && !U && /* @__PURE__ */ n("div", { className: "activity-stream__timeline-marker" }),
1707
- /* @__PURE__ */ n("div", { className: "activity-stream__icon", children: S && s.events.length === 1 ? S(s.events[0]) : s.icon || It(s.type) }),
1708
- /* @__PURE__ */ u("div", { className: "activity-stream__content", children: [
1709
- /* @__PURE__ */ u(
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(
1710
2245
  "div",
1711
2246
  {
1712
- className: `activity-stream__header ${i ? "activity-stream__header--clickable" : ""}`,
1713
- onClick: () => i && y(s.id, x),
1714
- onKeyDown: (_) => {
1715
- i && (_.key === "Enter" || _.key === " ") && (_.preventDefault(), y(s.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));
1716
2251
  },
1717
- role: i ? "button" : void 0,
1718
- tabIndex: i ? 0 : void 0,
1719
- "aria-expanded": i ? m : void 0,
2252
+ role: X ? "button" : void 0,
2253
+ tabIndex: X ? 0 : void 0,
2254
+ "aria-expanded": X ? V : void 0,
1720
2255
  children: [
1721
- /* @__PURE__ */ n("div", { className: "activity-stream__title", children: s.title }),
1722
- /* @__PURE__ */ n("div", { className: "activity-stream__timestamp", children: Lt(s.timestamp) }),
1723
- i && /* @__PURE__ */ n("div", { className: "activity-stream__toggle", children: m ? /* @__PURE__ */ n($e.fold, { size: 16 }) : /* @__PURE__ */ n($e.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 }) })
1724
2259
  ]
1725
2260
  }
1726
2261
  ),
1727
- m && L && s.children && /* @__PURE__ */ n("div", { className: "activity-stream__children", children: s.children.map((_) => c(_, !0)) }),
1728
- m && !L && s.events.length > 1 && /* @__PURE__ */ n("div", { className: "activity-stream__events-list", children: s.events.map(
1729
- (_) => R ? /* @__PURE__ */ n("div", { className: "activity-stream__event-item", children: R(_) }, _.id) : /* @__PURE__ */ u("div", { className: "activity-stream__event-item", children: [
1730
- /* @__PURE__ */ n("div", { className: "activity-stream__event-title", children: _.title }),
1731
- _.description && /* @__PURE__ */ n("div", { className: "activity-stream__event-description", children: _.description })
1732
- ] }, _.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)
1733
2268
  ) }),
1734
- m && s.count === 1 && s.events[0].description && /* @__PURE__ */ n("div", { className: "activity-stream__description", children: s.events[0].description })
2269
+ V && v.count === 1 && v.events[0].description && /* @__PURE__ */ n("div", { className: "activity-stream__description", children: v.events[0].description })
1735
2270
  ] })
1736
2271
  ]
1737
2272
  },
1738
- s.id
2273
+ v.id
1739
2274
  );
1740
- }, b = (s) => /* @__PURE__ */ u("div", { className: "activity-stream__date-separator", children: [
1741
- /* @__PURE__ */ n("div", { className: "activity-stream__date-label", children: s.label }),
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 }),
1742
2293
  /* @__PURE__ */ n("div", { className: "activity-stream__date-line" })
1743
- ] }, s.id), z = f?.hasMore !== void 0 ? f.hasMore : f?.totalItems !== void 0 ? e.length < f.totalItems : !0, E = "activity-stream", ne = `${E}--${t}`, ae = Z ? `${E}--with-timeline` : "";
1744
- let X = `${E} ${ne} ${ae} ${r}`.trim();
1745
- return O && O < 1 && (X = `${X} ${E}--compact`), O && O > 1 && (X = `${X} ${E}--spacious`), /* @__PURE__ */ n("div", { ref: C, className: X, "data-theme": t, children: /* @__PURE__ */ u(
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(
1746
2305
  "div",
1747
2306
  {
1748
- ref: H,
1749
- className: "activity-stream__container",
1750
- style: {
1751
- ...v ? { maxHeight: v } : void 0,
1752
- ...{ "--activity-stream-scale": O }
1753
- },
1754
- children: [
1755
- D.length === 0 ? /* @__PURE__ */ n("div", { className: "activity-stream__empty", children: P }) : /* @__PURE__ */ n("div", { className: "activity-stream__items", children: D.map(
1756
- (s) => "type" in s && s.type === "date-separator" ? b(s) : c(s)
1757
- ) }),
1758
- o && /* @__PURE__ */ u("div", { className: "activity-stream__loading", children: [
1759
- /* @__PURE__ */ n("div", { className: "activity-stream__spinner" }),
1760
- /* @__PURE__ */ n("span", { children: "Loading..." })
1761
- ] }),
1762
- a && !o && z && p && /* @__PURE__ */ n(
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(
2317
+ "div",
2318
+ {
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(
1763
2359
  "div",
1764
2360
  {
1765
- className: `activity-stream__load-more ${k ? "activity-stream__load-more--visible" : ""}`,
1766
- onClick: p,
1767
- onKeyDown: (s) => {
1768
- (s.key === "Enter" || s.key === " ") && (s.preventDefault(), p());
2361
+ ref: ee,
2362
+ className: "activity-stream__container",
2363
+ style: {
2364
+ ...Se,
2365
+ ..._e
1769
2366
  },
1770
- role: "button",
1771
- tabIndex: 0,
1772
- "aria-label": "Load more activities",
1773
- 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
+ ]
1774
2390
  }
1775
2391
  )
1776
- ]
2392
+ )
1777
2393
  }
1778
2394
  ) });
1779
- }, Mt = {
2395
+ }, hr = {
1780
2396
  name: "youtube",
1781
2397
  displayName: "YouTube",
1782
2398
  domains: ["youtube.com", "youtu.be", "youtube-nocookie.com"],
1783
2399
  tier: "major",
1784
2400
  supportsAutoplay: !0,
1785
2401
  supportsApi: !0,
1786
- extractVideoId: (e) => {
2402
+ extractVideoId: (t) => {
1787
2403
  try {
1788
- const t = new URL(e);
1789
- return t.hostname.replace("www.", "") === "youtu.be" ? t.pathname.slice(1).split("?")[0] : t.searchParams.has("v") ? t.searchParams.get("v") : t.pathname.startsWith("/embed/") || t.pathname.startsWith("/v/") ? t.pathname.split("/")[2] : null;
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;
1790
2406
  } catch {
1791
2407
  return null;
1792
2408
  }
1793
2409
  },
1794
- getEmbedUrl: (e, t = {}) => {
2410
+ getEmbedUrl: (t, e = {}) => {
1795
2411
  const r = new URLSearchParams();
1796
- t.autoplay && r.set("autoplay", "1"), t.muted && r.set("mute", "1"), t.loop && (r.set("loop", "1"), r.set("playlist", e)), t.startTime && r.set("start", String(t.startTime)), t.controls === !1 && r.set("controls", "0");
1797
- const a = "https://www.youtube.com", o = r.toString();
1798
- return `${a}/embed/${e}${o ? `?${o}` : ""}`;
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}` : ""}`;
1799
2415
  }
1800
- }, At = {
2416
+ }, mr = {
1801
2417
  name: "vimeo",
1802
2418
  displayName: "Vimeo",
1803
2419
  domains: ["vimeo.com"],
1804
2420
  tier: "major",
1805
2421
  supportsAutoplay: !0,
1806
2422
  supportsApi: !0,
1807
- extractVideoId: (e) => {
2423
+ extractVideoId: (t) => {
1808
2424
  try {
1809
- const t = new URL(e), r = t.hostname.replace("www.", "");
2425
+ const e = new URL(t), r = e.hostname.replace("www.", "");
1810
2426
  if (r !== "vimeo.com" && r !== "player.vimeo.com")
1811
2427
  return null;
1812
- if (t.pathname.startsWith("/video/"))
1813
- return t.pathname.split("/")[2];
1814
- const a = t.pathname.split("/").filter(Boolean);
1815
- if (a.length > 0) {
1816
- const o = a[0];
1817
- if (/^\d+$/.test(o))
1818
- return o;
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;
1819
2435
  }
1820
2436
  return null;
1821
2437
  } catch {
1822
2438
  return null;
1823
2439
  }
1824
2440
  },
1825
- getEmbedUrl: (e, t = {}) => {
2441
+ getEmbedUrl: (t, e = {}) => {
1826
2442
  const r = new URLSearchParams();
1827
- t.autoplay && r.set("autoplay", "1"), t.muted && r.set("muted", "1"), t.loop && r.set("loop", "1"), t.startTime && r.set("t", `${t.startTime}s`), t.controls === !1 && r.set("controls", "0");
1828
- const a = r.toString();
1829
- return `https://player.vimeo.com/video/${e}${a ? `?${a}` : ""}`;
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}` : ""}`;
1830
2446
  }
1831
- }, St = {
2447
+ }, pr = {
1832
2448
  name: "dailymotion",
1833
2449
  displayName: "Dailymotion",
1834
2450
  domains: ["dailymotion.com", "dai.ly"],
1835
2451
  tier: "major",
1836
2452
  supportsAutoplay: !0,
1837
2453
  supportsApi: !0,
1838
- extractVideoId: (e) => {
2454
+ extractVideoId: (t) => {
1839
2455
  try {
1840
- const t = new URL(e), r = t.hostname.replace("www.", "");
2456
+ const e = new URL(t), r = e.hostname.replace("www.", "");
1841
2457
  if (r === "dai.ly")
1842
- return t.pathname.slice(1).split("?")[0];
2458
+ return e.pathname.slice(1).split("?")[0];
1843
2459
  if (r === "dailymotion.com") {
1844
- if (t.pathname.startsWith("/video/"))
1845
- return t.pathname.split("/")[2].split("_")[0];
1846
- if (t.pathname.startsWith("/embed/video/"))
1847
- return t.pathname.split("/")[3].split("?")[0];
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];
1848
2464
  }
1849
2465
  return null;
1850
2466
  } catch {
1851
2467
  return null;
1852
2468
  }
1853
2469
  },
1854
- getEmbedUrl: (e, t = {}) => {
2470
+ getEmbedUrl: (t, e = {}) => {
1855
2471
  const r = new URLSearchParams();
1856
- t.autoplay && r.set("autoplay", "1"), t.muted && r.set("mute", "1"), t.loop && r.set("loop", "1"), t.startTime && r.set("start", String(t.startTime)), t.controls === !1 && r.set("controls", "0");
1857
- const a = r.toString();
1858
- return `https://www.dailymotion.com/embed/video/${e}${a ? `?${a}` : ""}`;
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}` : ""}`;
1859
2475
  }
1860
- }, Ut = {
2476
+ }, fr = {
1861
2477
  name: "twitch",
1862
2478
  displayName: "Twitch",
1863
2479
  domains: ["twitch.tv", "clips.twitch.tv"],
1864
2480
  tier: "major",
1865
2481
  supportsAutoplay: !0,
1866
2482
  supportsApi: !0,
1867
- extractVideoId: (e) => {
2483
+ extractVideoId: (t) => {
1868
2484
  try {
1869
- const t = new URL(e);
1870
- if (t.hostname.replace("www.", "") === "clips.twitch.tv")
1871
- return `clip:${t.pathname.slice(1)}`;
1872
- if (t.pathname.startsWith("/videos/"))
1873
- return `video:${t.pathname.split("/")[2]}`;
1874
- const a = t.pathname.match(/\/([^/]+)\/clip\/([^/?]+)/);
1875
- return a ? `clip:${a[2]}` : null;
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;
1876
2492
  } catch {
1877
2493
  return null;
1878
2494
  }
1879
2495
  },
1880
- getEmbedUrl: (e, t = {}) => {
1881
- const r = new URLSearchParams(), a = typeof window < "u" ? window.location.hostname : "localhost";
1882
- r.set("parent", a), t.autoplay && r.set("autoplay", "true"), t.muted && r.set("muted", "true");
1883
- const o = r.toString();
1884
- return e.startsWith("video:") ? `https://player.twitch.tv/?video=${e.slice(6)}&${o}` : e.startsWith("clip:") ? `https://clips.twitch.tv/embed?clip=${e.slice(5)}&${o}` : "";
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}` : "";
1885
2501
  }
1886
- }, Pt = {
2502
+ }, vr = {
1887
2503
  name: "kick",
1888
2504
  displayName: "Kick",
1889
2505
  domains: ["kick.com"],
1890
2506
  tier: "major",
1891
2507
  supportsAutoplay: !1,
1892
2508
  supportsApi: !1,
1893
- extractVideoId: (e) => {
2509
+ extractVideoId: (t) => {
1894
2510
  try {
1895
- const t = new URL(e);
1896
- if (t.hostname.replace("www.", "") !== "kick.com")
2511
+ const e = new URL(t);
2512
+ if (e.hostname.replace("www.", "") !== "kick.com")
1897
2513
  return null;
1898
- const a = t.pathname.match(/\/video\/([a-zA-Z0-9-]+)/);
1899
- return a ? a[1] : null;
2514
+ const i = e.pathname.match(/\/video\/([a-zA-Z0-9-]+)/);
2515
+ return i ? i[1] : null;
1900
2516
  } catch {
1901
2517
  return null;
1902
2518
  }
1903
2519
  },
1904
- getEmbedUrl: (e) => `https://player.kick.com/video/${e}`
1905
- }, Vt = {
2520
+ getEmbedUrl: (t) => `https://player.kick.com/video/${t}`
2521
+ }, gr = {
1906
2522
  name: "rumble",
1907
2523
  displayName: "Rumble",
1908
2524
  domains: ["rumble.com"],
1909
2525
  tier: "major",
1910
2526
  supportsAutoplay: !0,
1911
2527
  supportsApi: !1,
1912
- extractVideoId: (e) => {
2528
+ extractVideoId: (t) => {
1913
2529
  try {
1914
- const t = new URL(e);
1915
- if (t.hostname.replace("www.", "") !== "rumble.com")
2530
+ const e = new URL(t);
2531
+ if (e.hostname.replace("www.", "") !== "rumble.com")
1916
2532
  return null;
1917
- if (t.pathname.startsWith("/embed/"))
1918
- return t.pathname.split("/")[2].split("?")[0];
1919
- const a = t.pathname.match(/\/([a-z0-9]+)-/);
1920
- return a ? a[1] : 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;
1921
2537
  } catch {
1922
2538
  return null;
1923
2539
  }
1924
2540
  },
1925
- getEmbedUrl: (e, t = {}) => {
2541
+ getEmbedUrl: (t, e = {}) => {
1926
2542
  const r = new URLSearchParams();
1927
- t.autoplay && r.set("autoplay", "2");
1928
- const a = r.toString();
1929
- return `https://rumble.com/embed/${e}${a ? `?${a}` : ""}`;
2543
+ e.autoplay && r.set("autoplay", "2");
2544
+ const i = r.toString();
2545
+ return `https://rumble.com/embed/${t}${i ? `?${i}` : ""}`;
1930
2546
  }
1931
- }, Dt = {
2547
+ }, yr = {
1932
2548
  name: "odysee",
1933
2549
  displayName: "Odysee",
1934
2550
  domains: ["odysee.com"],
1935
2551
  tier: "major",
1936
2552
  supportsAutoplay: !0,
1937
2553
  supportsApi: !1,
1938
- extractVideoId: (e) => {
2554
+ extractVideoId: (t) => {
1939
2555
  try {
1940
- const t = new URL(e);
1941
- if (t.hostname.replace("www.", "") !== "odysee.com")
2556
+ const e = new URL(t);
2557
+ if (e.hostname.replace("www.", "") !== "odysee.com")
1942
2558
  return null;
1943
- const a = t.pathname.match(/\$\/embed\/(.+)/);
1944
- if (a)
1945
- return a[1];
1946
- const o = t.pathname.slice(1);
1947
- return o.startsWith("@") ? o : 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;
1948
2564
  } catch {
1949
2565
  return null;
1950
2566
  }
1951
2567
  },
1952
- getEmbedUrl: (e) => `https://odysee.com/$/embed/${e}`
1953
- }, Bt = {
2568
+ getEmbedUrl: (t) => `https://odysee.com/$/embed/${t}`
2569
+ }, br = {
1954
2570
  name: "bitchute",
1955
2571
  displayName: "BitChute",
1956
2572
  domains: ["bitchute.com"],
1957
2573
  tier: "major",
1958
2574
  supportsAutoplay: !1,
1959
2575
  supportsApi: !1,
1960
- extractVideoId: (e) => {
2576
+ extractVideoId: (t) => {
1961
2577
  try {
1962
- const t = new URL(e);
1963
- if (t.hostname.replace("www.", "") !== "bitchute.com")
2578
+ const e = new URL(t);
2579
+ if (e.hostname.replace("www.", "") !== "bitchute.com")
1964
2580
  return null;
1965
- const a = t.pathname.match(/\/(video|embed)\/([a-zA-Z0-9]+)/);
1966
- return a ? a[2] : null;
2581
+ const i = e.pathname.match(/\/(video|embed)\/([a-zA-Z0-9]+)/);
2582
+ return i ? i[2] : null;
1967
2583
  } catch {
1968
2584
  return null;
1969
2585
  }
1970
2586
  },
1971
- getEmbedUrl: (e) => `https://www.bitchute.com/embed/${e}/`
1972
- }, Et = {
2587
+ getEmbedUrl: (t) => `https://www.bitchute.com/embed/${t}/`
2588
+ }, wr = {
1973
2589
  name: "vk",
1974
2590
  displayName: "VK Video",
1975
2591
  domains: ["vk.com"],
1976
2592
  tier: "major",
1977
2593
  supportsAutoplay: !0,
1978
2594
  supportsApi: !1,
1979
- extractVideoId: (e) => {
2595
+ extractVideoId: (t) => {
1980
2596
  try {
1981
- const t = new URL(e);
1982
- if (t.hostname.replace("www.", "") !== "vk.com")
2597
+ const e = new URL(t);
2598
+ if (e.hostname.replace("www.", "") !== "vk.com")
1983
2599
  return null;
1984
- const a = t.searchParams.get("z");
1985
- if (a && a.startsWith("video"))
1986
- return a.replace("video", "");
1987
- const o = t.pathname.match(/\/video(-?\d+_\d+)/);
1988
- return o ? o[1] : 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;
1989
2605
  } catch {
1990
2606
  return null;
1991
2607
  }
1992
2608
  },
1993
- getEmbedUrl: (e, t = {}) => {
2609
+ getEmbedUrl: (t, e = {}) => {
1994
2610
  const r = new URLSearchParams();
1995
- t.autoplay && r.set("autoplay", "1");
1996
- const a = e.split("_");
1997
- if (a.length < 2)
2611
+ e.autoplay && r.set("autoplay", "1");
2612
+ const i = t.split("_");
2613
+ if (i.length < 2)
1998
2614
  return console.error("VK video ID must be in format OWNER_ID_VIDEO_ID"), "";
1999
- const o = r.toString();
2000
- return `https://vk.com/video_ext.php?oid=${a[0]}&id=${a[1]}${o ? `&${o}` : ""}`;
2615
+ const a = r.toString();
2616
+ return `https://vk.com/video_ext.php?oid=${i[0]}&id=${i[1]}${a ? `&${a}` : ""}`;
2001
2617
  }
2002
- }, jt = {
2618
+ }, _r = {
2003
2619
  name: "bilibili",
2004
2620
  displayName: "Bilibili",
2005
2621
  domains: ["bilibili.com"],
2006
2622
  tier: "major",
2007
2623
  supportsAutoplay: !1,
2008
2624
  supportsApi: !1,
2009
- extractVideoId: (e) => {
2625
+ extractVideoId: (t) => {
2010
2626
  try {
2011
- const t = new URL(e), r = t.hostname.replace("www.", "");
2627
+ const e = new URL(t), r = e.hostname.replace("www.", "");
2012
2628
  if (r !== "bilibili.com" && r !== "www.bilibili.com")
2013
2629
  return null;
2014
- const a = t.pathname.match(/\/video\/((?:BV|av)[a-zA-Z0-9]+)/);
2015
- return a ? a[1] : null;
2630
+ const i = e.pathname.match(/\/video\/((?:BV|av)[a-zA-Z0-9]+)/);
2631
+ return i ? i[1] : null;
2016
2632
  } catch {
2017
2633
  return null;
2018
2634
  }
2019
2635
  },
2020
- getEmbedUrl: (e, t = {}) => {
2636
+ getEmbedUrl: (t, e = {}) => {
2021
2637
  const r = new URLSearchParams();
2022
- t.autoplay && r.set("autoplay", "1");
2023
- const a = r.toString();
2024
- return `https://player.bilibili.com/player.html?bvid=${e}${a ? `&${a}` : ""}`;
2638
+ e.autoplay && r.set("autoplay", "1");
2639
+ const i = r.toString();
2640
+ return `https://player.bilibili.com/player.html?bvid=${t}${i ? `&${i}` : ""}`;
2025
2641
  }
2026
- }, Ot = {
2642
+ }, xr = {
2027
2643
  name: "niconico",
2028
2644
  displayName: "Niconico",
2029
2645
  domains: ["nicovideo.jp"],
2030
2646
  tier: "major",
2031
2647
  supportsAutoplay: !1,
2032
2648
  supportsApi: !1,
2033
- extractVideoId: (e) => {
2649
+ extractVideoId: (t) => {
2034
2650
  try {
2035
- const t = new URL(e);
2036
- if (t.hostname.replace("www.", "") !== "nicovideo.jp")
2651
+ const e = new URL(t);
2652
+ if (e.hostname.replace("www.", "") !== "nicovideo.jp")
2037
2653
  return null;
2038
- const a = t.pathname.match(/\/watch\/((?:sm|so|nm)\d+)/);
2039
- return a ? a[1] : null;
2654
+ const i = e.pathname.match(/\/watch\/((?:sm|so|nm)\d+)/);
2655
+ return i ? i[1] : null;
2040
2656
  } catch {
2041
2657
  return null;
2042
2658
  }
2043
2659
  },
2044
- getEmbedUrl: (e) => `https://embed.nicovideo.jp/watch/${e}`
2045
- }, Rt = {
2660
+ getEmbedUrl: (t) => `https://embed.nicovideo.jp/watch/${t}`
2661
+ }, $r = {
2046
2662
  name: "wistia",
2047
2663
  displayName: "Wistia",
2048
2664
  domains: ["wistia.com", "wi.st", "wistia.net"],
2049
2665
  tier: "professional",
2050
2666
  supportsAutoplay: !0,
2051
2667
  supportsApi: !0,
2052
- extractVideoId: (e) => {
2668
+ extractVideoId: (t) => {
2053
2669
  try {
2054
- const t = new URL(e), r = t.hostname.replace("www.", "");
2055
- if (t.pathname.includes("/medias/")) {
2056
- const a = t.pathname.match(/\/medias\/([a-zA-Z0-9]+)/);
2057
- if (a)
2058
- return a[1];
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];
2059
2675
  }
2060
- if (r.includes("wistia") && t.pathname.includes("/iframe/")) {
2061
- const a = t.pathname.match(/\/iframe\/([a-zA-Z0-9]+)/);
2062
- if (a)
2063
- return a[1];
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];
2064
2680
  }
2065
2681
  return null;
2066
2682
  } catch {
2067
2683
  return null;
2068
2684
  }
2069
2685
  },
2070
- getEmbedUrl: (e, t = {}) => {
2686
+ getEmbedUrl: (t, e = {}) => {
2071
2687
  const r = new URLSearchParams();
2072
- t.autoplay && r.set("autoPlay", "true"), t.muted && r.set("muted", "true");
2073
- const a = r.toString();
2074
- return `https://fast.wistia.net/embed/iframe/${e}${a ? `?${a}` : ""}`;
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}` : ""}`;
2075
2691
  }
2076
- }, Ht = {
2692
+ }, Ir = {
2077
2693
  name: "brightcove",
2078
2694
  displayName: "Brightcove",
2079
2695
  domains: ["brightcove.com", "bcove.video"],
2080
2696
  tier: "professional",
2081
2697
  supportsAutoplay: !0,
2082
2698
  supportsApi: !0,
2083
- extractVideoId: (e) => {
2699
+ extractVideoId: (t) => {
2084
2700
  try {
2085
- const t = new URL(e), r = t.searchParams.get("videoId");
2701
+ const e = new URL(t), r = e.searchParams.get("videoId");
2086
2702
  if (r) {
2087
- const a = t.pathname.match(/\/(\d+)\//);
2088
- if (a)
2089
- return `${a[1]}:${r}`;
2703
+ const i = e.pathname.match(/\/(\d+)\//);
2704
+ if (i)
2705
+ return `${i[1]}:${r}`;
2090
2706
  }
2091
2707
  return null;
2092
2708
  } catch {
2093
2709
  return null;
2094
2710
  }
2095
2711
  },
2096
- getEmbedUrl: (e) => {
2097
- const t = e.split(":");
2098
- if (t.length < 2)
2712
+ getEmbedUrl: (t) => {
2713
+ const e = t.split(":");
2714
+ if (e.length < 2)
2099
2715
  return console.error("Brightcove video ID must be in format ACCOUNT_ID:VIDEO_ID"), "";
2100
- const [r, ...a] = t, o = a.join(":");
2101
- return `https://players.brightcove.net/${r}/default_default/index.html?videoId=${o}`;
2716
+ const [r, ...i] = e, a = i.join(":");
2717
+ return `https://players.brightcove.net/${r}/default_default/index.html?videoId=${a}`;
2102
2718
  }
2103
- }, zt = {
2719
+ }, Cr = {
2104
2720
  name: "kaltura",
2105
2721
  displayName: "Kaltura",
2106
2722
  domains: ["kaltura.com"],
2107
2723
  tier: "professional",
2108
2724
  supportsAutoplay: !0,
2109
2725
  supportsApi: !0,
2110
- extractVideoId: (e) => {
2726
+ extractVideoId: (t) => {
2111
2727
  try {
2112
- const t = new URL(e), r = t.searchParams.get("entry_id") || t.searchParams.get("entryId");
2728
+ const e = new URL(t), r = e.searchParams.get("entry_id") || e.searchParams.get("entryId");
2113
2729
  if (r) {
2114
- const a = t.pathname.match(/\/p\/(\d+)\//), o = t.pathname.match(/\/uiconf_id\/(\d+)/);
2115
- if (a && o)
2116
- return `${a[1]}:${o[1]}:${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}`;
2117
2733
  }
2118
2734
  return null;
2119
2735
  } catch {
2120
2736
  return null;
2121
2737
  }
2122
2738
  },
2123
- getEmbedUrl: (e) => {
2124
- const t = e.split(":");
2125
- if (t.length < 3)
2739
+ getEmbedUrl: (t) => {
2740
+ const e = t.split(":");
2741
+ if (e.length < 3)
2126
2742
  return console.error("Kaltura video ID must be in format PARTNER_ID:UI_CONF_ID:ENTRY_ID"), "";
2127
- const [r, a, o] = t;
2128
- return `https://cdnapisec.kaltura.com/p/${r}/sp/${r}00/embedIframeJs/uiconf_id/${a}/partner_id/${r}?iframeembed=true&entry_id=${o}`;
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}`;
2129
2745
  }
2130
- }, Wt = {
2746
+ }, kr = {
2131
2747
  name: "panopto",
2132
2748
  displayName: "Panopto",
2133
2749
  domains: ["panopto.com"],
2134
2750
  tier: "professional",
2135
2751
  supportsAutoplay: !1,
2136
2752
  supportsApi: !0,
2137
- extractVideoId: (e) => {
2753
+ extractVideoId: (t) => {
2138
2754
  try {
2139
- const t = new URL(e), r = t.hostname;
2755
+ const e = new URL(t), r = e.hostname;
2140
2756
  if (r === "panopto.com" || r.endsWith(".panopto.com")) {
2141
- const o = t.searchParams.get("id");
2142
- if (o)
2143
- return `${r.split(".")[0]}:${o}`;
2757
+ const a = e.searchParams.get("id");
2758
+ if (a)
2759
+ return `${r.split(".")[0]}:${a}`;
2144
2760
  }
2145
2761
  return null;
2146
2762
  } catch {
2147
2763
  return null;
2148
2764
  }
2149
2765
  },
2150
- getEmbedUrl: (e) => {
2151
- const t = e.split(":");
2152
- if (t.length < 2)
2766
+ getEmbedUrl: (t) => {
2767
+ const e = t.split(":");
2768
+ if (e.length < 2)
2153
2769
  return console.error("Panopto video ID must be in format SUBDOMAIN:SESSION_ID"), "";
2154
- const [r, ...a] = t, o = a.join(":");
2155
- return `https://${r}.panopto.com/Panopto/Pages/Embed.aspx?id=${o}&autoplay=false&offerviewer=true&showtitle=true&showbrand=false&captions=false&interactivity=all`;
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`;
2156
2772
  }
2157
- }, Tt = {
2773
+ }, Sr = {
2158
2774
  name: "jwplayer",
2159
2775
  displayName: "JW Player",
2160
2776
  domains: ["jwplayer.com", "jwplatform.com", "content.jwplatform.com"],
2161
2777
  tier: "professional",
2162
2778
  supportsAutoplay: !0,
2163
2779
  supportsApi: !0,
2164
- extractVideoId: (e) => {
2780
+ extractVideoId: (t) => {
2165
2781
  try {
2166
- const r = new URL(e).pathname.match(/\/players\/([a-zA-Z0-9]+-[a-zA-Z0-9]+)\.html/);
2782
+ const r = new URL(t).pathname.match(/\/players\/([a-zA-Z0-9]+-[a-zA-Z0-9]+)\.html/);
2167
2783
  return r ? r[1] : null;
2168
2784
  } catch {
2169
2785
  return null;
2170
2786
  }
2171
2787
  },
2172
- getEmbedUrl: (e) => `https://content.jwplatform.com/players/${e}.html`
2173
- }, Ft = {
2788
+ getEmbedUrl: (t) => `https://content.jwplatform.com/players/${t}.html`
2789
+ }, Nr = {
2174
2790
  name: "cloudflare",
2175
2791
  displayName: "Cloudflare Stream",
2176
2792
  domains: ["cloudflarestream.com", "videodelivery.net"],
2177
2793
  tier: "professional",
2178
2794
  supportsAutoplay: !0,
2179
2795
  supportsApi: !0,
2180
- extractVideoId: (e) => {
2796
+ extractVideoId: (t) => {
2181
2797
  try {
2182
- const t = new URL(e), r = t.hostname, a = r === "videodelivery.net" || r.endsWith(".videodelivery.net"), o = r === "cloudflarestream.com" || r.endsWith(".cloudflarestream.com");
2183
- if (a || o) {
2184
- const p = t.pathname.match(/\/([a-zA-Z0-9]+)(?:\/|$)/);
2185
- if (p)
2186
- return p[1];
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];
2187
2803
  }
2188
2804
  return null;
2189
2805
  } catch {
2190
2806
  return null;
2191
2807
  }
2192
2808
  },
2193
- getEmbedUrl: (e, t = {}) => {
2809
+ getEmbedUrl: (t, e = {}) => {
2194
2810
  const r = new URLSearchParams();
2195
- t.autoplay && r.set("autoplay", "true"), t.muted && r.set("muted", "true"), t.loop && r.set("loop", "true");
2196
- const a = r.toString();
2197
- return `https://iframe.videodelivery.net/${e}${a ? `?${a}` : ""}`;
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}` : ""}`;
2198
2814
  }
2199
- }, qt = {
2815
+ }, Lr = {
2200
2816
  name: "mux",
2201
2817
  displayName: "Mux",
2202
2818
  domains: ["mux.com", "stream.mux.com"],
2203
2819
  tier: "professional",
2204
2820
  supportsAutoplay: !0,
2205
2821
  supportsApi: !0,
2206
- extractVideoId: (e) => {
2822
+ extractVideoId: (t) => {
2207
2823
  try {
2208
- const t = new URL(e);
2209
- if (t.hostname === "stream.mux.com") {
2210
- const a = t.pathname.slice(1).split(".")[0];
2211
- if (a)
2212
- return a;
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;
2213
2829
  }
2214
2830
  return null;
2215
2831
  } catch {
2216
2832
  return null;
2217
2833
  }
2218
2834
  },
2219
- getEmbedUrl: (e, t = {}) => {
2835
+ getEmbedUrl: (t, e = {}) => {
2220
2836
  const r = new URLSearchParams();
2221
- t.autoplay && r.set("autoplay", "true"), t.muted && r.set("muted", "true");
2222
- const a = r.toString();
2223
- return `https://stream.mux.com/${e}.m3u8${a ? `?${a}` : ""}`;
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}` : ""}`;
2224
2840
  }
2225
- }, Zt = {
2841
+ }, Mr = {
2226
2842
  name: "aws-ivs",
2227
2843
  displayName: "AWS IVS",
2228
2844
  domains: ["ivs.aws", "amazonaws.com"],
2229
2845
  tier: "professional",
2230
2846
  supportsAutoplay: !0,
2231
2847
  supportsApi: !0,
2232
- extractVideoId: (e) => {
2848
+ extractVideoId: (t) => {
2233
2849
  try {
2234
- const t = new URL(e);
2235
- return t.hostname.includes(".channel.ivs.aws") ? t.hostname.split(".")[0] : null;
2850
+ const e = new URL(t);
2851
+ return e.hostname.includes(".channel.ivs.aws") ? e.hostname.split(".")[0] : null;
2236
2852
  } catch {
2237
2853
  return null;
2238
2854
  }
2239
2855
  },
2240
- getEmbedUrl: (e) => `https://${e}.channel.ivs.aws/stream.m3u8`
2241
- }, Kt = {
2856
+ getEmbedUrl: (t) => `https://${t}.channel.ivs.aws/stream.m3u8`
2857
+ }, Ar = {
2242
2858
  name: "azure-media",
2243
2859
  displayName: "Azure Media Services",
2244
2860
  domains: ["azure.net", "azureedge.net"],
2245
2861
  tier: "professional",
2246
2862
  supportsAutoplay: !0,
2247
2863
  supportsApi: !0,
2248
- extractVideoId: (e) => {
2864
+ extractVideoId: (t) => {
2249
2865
  try {
2250
- const t = new URL(e);
2251
- if (t.hostname.endsWith(".streaming.media.azure.net")) {
2252
- const r = t.pathname.split("/");
2866
+ const e = new URL(t);
2867
+ if (e.hostname.endsWith(".streaming.media.azure.net")) {
2868
+ const r = e.pathname.split("/");
2253
2869
  if (r.length >= 2)
2254
- return `${t.hostname}:${r[1]}`;
2870
+ return `${e.hostname}:${r[1]}`;
2255
2871
  }
2256
2872
  return null;
2257
2873
  } catch {
2258
2874
  return null;
2259
2875
  }
2260
2876
  },
2261
- getEmbedUrl: (e) => {
2262
- const t = e.split(":");
2263
- if (t.length < 2)
2877
+ getEmbedUrl: (t) => {
2878
+ const e = t.split(":");
2879
+ if (e.length < 2)
2264
2880
  return console.error("Azure Media video ID must be in format HOSTNAME:ASSET_ID"), "";
2265
- const [r, ...a] = t, o = a.join(":");
2266
- return `https://${r}/${o}/manifest`;
2881
+ const [r, ...i] = e, a = i.join(":");
2882
+ return `https://${r}/${a}/manifest`;
2267
2883
  }
2268
- }, Yt = {
2884
+ }, Pr = {
2269
2885
  name: "google-drive",
2270
2886
  displayName: "Google Drive",
2271
2887
  domains: ["drive.google.com"],
2272
2888
  tier: "cloud",
2273
2889
  supportsAutoplay: !1,
2274
2890
  supportsApi: !1,
2275
- extractVideoId: (e) => {
2891
+ extractVideoId: (t) => {
2276
2892
  try {
2277
- const t = new URL(e);
2278
- if (t.hostname.replace("www.", "") !== "drive.google.com")
2893
+ const e = new URL(t);
2894
+ if (e.hostname.replace("www.", "") !== "drive.google.com")
2279
2895
  return null;
2280
- const a = t.pathname.match(/\/file\/d\/([a-zA-Z0-9_-]+)/);
2281
- if (a)
2282
- return a[1];
2283
- const o = t.searchParams.get("id");
2284
- return o || 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;
2285
2901
  } catch {
2286
2902
  return null;
2287
2903
  }
2288
2904
  },
2289
- getEmbedUrl: (e) => `https://drive.google.com/file/d/${e}/preview`
2290
- }, Jt = {
2905
+ getEmbedUrl: (t) => `https://drive.google.com/file/d/${t}/preview`
2906
+ }, Er = {
2291
2907
  name: "dropbox",
2292
2908
  displayName: "Dropbox",
2293
2909
  domains: ["dropbox.com"],
2294
2910
  tier: "cloud",
2295
2911
  supportsAutoplay: !1,
2296
2912
  supportsApi: !1,
2297
- extractVideoId: (e) => {
2913
+ extractVideoId: (t) => {
2298
2914
  try {
2299
- return new URL(e).hostname.replace("www.", "") !== "dropbox.com" ? null : e;
2915
+ return new URL(t).hostname.replace("www.", "") !== "dropbox.com" ? null : t;
2300
2916
  } catch {
2301
2917
  return null;
2302
2918
  }
2303
2919
  },
2304
- getEmbedUrl: (e) => {
2920
+ getEmbedUrl: (t) => {
2305
2921
  try {
2306
- const t = new URL(e);
2307
- return t.searchParams.delete("dl"), t.searchParams.set("raw", "1"), t.toString();
2922
+ const e = new URL(t);
2923
+ return e.searchParams.delete("dl"), e.searchParams.set("raw", "1"), e.toString();
2308
2924
  } catch {
2309
- return e;
2925
+ return t;
2310
2926
  }
2311
2927
  }
2312
- }, Gt = {
2928
+ }, Dr = {
2313
2929
  name: "facebook",
2314
2930
  displayName: "Facebook Video",
2315
2931
  domains: ["facebook.com", "fb.watch"],
2316
2932
  tier: "social",
2317
2933
  supportsAutoplay: !1,
2318
2934
  supportsApi: !1,
2319
- extractVideoId: (e) => {
2935
+ extractVideoId: (t) => {
2320
2936
  try {
2321
- const t = new URL(e), r = t.hostname.replace("www.", "");
2937
+ const e = new URL(t), r = e.hostname.replace("www.", "");
2322
2938
  if (r === "fb.watch")
2323
- return t.pathname.slice(1);
2939
+ return e.pathname.slice(1);
2324
2940
  if (r === "facebook.com") {
2325
- const a = t.searchParams.get("v");
2941
+ const i = e.searchParams.get("v");
2942
+ if (i)
2943
+ return i;
2944
+ const a = e.pathname.match(/\/videos\/(\d+)/);
2326
2945
  if (a)
2327
- return a;
2328
- const o = t.pathname.match(/\/videos\/(\d+)/);
2329
- if (o)
2330
- return o[1];
2946
+ return a[1];
2331
2947
  }
2332
2948
  return null;
2333
2949
  } catch {
2334
2950
  return null;
2335
2951
  }
2336
2952
  },
2337
- getEmbedUrl: (e) => `https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fwatch%2F%3Fv%3D${e}`
2338
- }, Qt = {
2953
+ getEmbedUrl: (t) => `https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fwatch%2F%3Fv%3D${t}`
2954
+ }, zr = {
2339
2955
  name: "instagram",
2340
2956
  displayName: "Instagram",
2341
2957
  domains: ["instagram.com"],
2342
2958
  tier: "social",
2343
2959
  supportsAutoplay: !1,
2344
2960
  supportsApi: !1,
2345
- extractVideoId: (e) => {
2961
+ extractVideoId: (t) => {
2346
2962
  try {
2347
- const t = new URL(e);
2348
- if (t.hostname.replace("www.", "") !== "instagram.com")
2963
+ const e = new URL(t);
2964
+ if (e.hostname.replace("www.", "") !== "instagram.com")
2349
2965
  return null;
2350
- const a = t.pathname.match(/\/(p|reel|tv)\/([a-zA-Z0-9_-]+)/);
2351
- return a ? a[2] : null;
2966
+ const i = e.pathname.match(/\/(p|reel|tv)\/([a-zA-Z0-9_-]+)/);
2967
+ return i ? i[2] : null;
2352
2968
  } catch {
2353
2969
  return null;
2354
2970
  }
2355
2971
  },
2356
- getEmbedUrl: (e) => `https://www.instagram.com/p/${e}/embed/`
2357
- }, Xt = {
2972
+ getEmbedUrl: (t) => `https://www.instagram.com/p/${t}/embed/`
2973
+ }, Or = {
2358
2974
  name: "twitter",
2359
2975
  displayName: "X (Twitter)",
2360
2976
  domains: ["twitter.com", "x.com"],
2361
2977
  tier: "social",
2362
2978
  supportsAutoplay: !1,
2363
2979
  supportsApi: !1,
2364
- extractVideoId: (e) => {
2980
+ extractVideoId: (t) => {
2365
2981
  try {
2366
- const t = new URL(e), r = t.hostname.replace("www.", "");
2982
+ const e = new URL(t), r = e.hostname.replace("www.", "");
2367
2983
  if (r !== "twitter.com" && r !== "x.com")
2368
2984
  return null;
2369
- const a = t.pathname.match(/\/status\/(\d+)/);
2370
- return a ? a[1] : null;
2985
+ const i = e.pathname.match(/\/status\/(\d+)/);
2986
+ return i ? i[1] : null;
2371
2987
  } catch {
2372
2988
  return null;
2373
2989
  }
2374
2990
  },
2375
- getEmbedUrl: (e) => `https://platform.twitter.com/embed/Tweet.html?id=${e}`
2376
- }, er = {
2991
+ getEmbedUrl: (t) => `https://platform.twitter.com/embed/Tweet.html?id=${t}`
2992
+ }, Ur = {
2377
2993
  name: "pornhub",
2378
2994
  displayName: "Pornhub",
2379
2995
  domains: ["pornhub.com"],
2380
2996
  tier: "adult",
2381
2997
  supportsAutoplay: !0,
2382
2998
  supportsApi: !1,
2383
- extractVideoId: (e) => {
2999
+ extractVideoId: (t) => {
2384
3000
  try {
2385
- const t = new URL(e);
2386
- if (t.hostname.replace("www.", "") !== "pornhub.com")
3001
+ const e = new URL(t);
3002
+ if (e.hostname.replace("www.", "") !== "pornhub.com")
2387
3003
  return null;
2388
- const a = t.searchParams.get("viewkey");
2389
- if (a)
2390
- return a;
2391
- const o = t.pathname.match(/\/embed\/([a-zA-Z0-9]+)/);
2392
- return o ? o[1] : 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;
2393
3009
  } catch {
2394
3010
  return null;
2395
3011
  }
2396
3012
  },
2397
- getEmbedUrl: (e) => `https://www.pornhub.com/embed/${e}`
2398
- }, tr = {
3013
+ getEmbedUrl: (t) => `https://www.pornhub.com/embed/${t}`
3014
+ }, Vr = {
2399
3015
  name: "youporn",
2400
3016
  displayName: "YouPorn",
2401
3017
  domains: ["youporn.com"],
2402
3018
  tier: "adult",
2403
3019
  supportsAutoplay: !1,
2404
3020
  supportsApi: !1,
2405
- extractVideoId: (e) => {
3021
+ extractVideoId: (t) => {
2406
3022
  try {
2407
- const t = new URL(e);
2408
- if (t.hostname.replace("www.", "") !== "youporn.com")
3023
+ const e = new URL(t);
3024
+ if (e.hostname.replace("www.", "") !== "youporn.com")
2409
3025
  return null;
2410
- const a = t.pathname.match(/\/watch\/(\d+)/);
2411
- return a ? a[1] : null;
3026
+ const i = e.pathname.match(/\/watch\/(\d+)/);
3027
+ return i ? i[1] : null;
2412
3028
  } catch {
2413
3029
  return null;
2414
3030
  }
2415
3031
  },
2416
- getEmbedUrl: (e) => `https://www.youporn.com/embed/${e}`
2417
- }, rr = {
3032
+ getEmbedUrl: (t) => `https://www.youporn.com/embed/${t}`
3033
+ }, Rr = {
2418
3034
  name: "redtube",
2419
3035
  displayName: "Redtube",
2420
3036
  domains: ["redtube.com"],
2421
3037
  tier: "adult",
2422
3038
  supportsAutoplay: !1,
2423
3039
  supportsApi: !1,
2424
- extractVideoId: (e) => {
3040
+ extractVideoId: (t) => {
2425
3041
  try {
2426
- const t = new URL(e);
2427
- if (t.hostname.replace("www.", "") !== "redtube.com")
3042
+ const e = new URL(t);
3043
+ if (e.hostname.replace("www.", "") !== "redtube.com")
2428
3044
  return null;
2429
- const a = t.searchParams.get("id");
2430
- if (a)
2431
- return a;
2432
- const o = t.pathname.match(/\/(\d+)/);
2433
- return o ? o[1] : 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;
2434
3050
  } catch {
2435
3051
  return null;
2436
3052
  }
2437
3053
  },
2438
- getEmbedUrl: (e) => `https://embed.redtube.com/?id=${e}`
2439
- }, nr = {
3054
+ getEmbedUrl: (t) => `https://embed.redtube.com/?id=${t}`
3055
+ }, Tr = {
2440
3056
  name: "xhamster",
2441
3057
  displayName: "XHamster",
2442
3058
  domains: ["xhamster.com"],
2443
3059
  tier: "adult",
2444
3060
  supportsAutoplay: !1,
2445
3061
  supportsApi: !1,
2446
- extractVideoId: (e) => {
3062
+ extractVideoId: (t) => {
2447
3063
  try {
2448
- const t = new URL(e);
2449
- if (t.hostname.replace("www.", "") !== "xhamster.com")
3064
+ const e = new URL(t);
3065
+ if (e.hostname.replace("www.", "") !== "xhamster.com")
2450
3066
  return null;
2451
- const a = t.pathname.match(/\/videos\/[^/]+-(\d+)/);
2452
- return a ? a[1] : null;
3067
+ const i = e.pathname.match(/\/videos\/[^/]+-(\d+)/);
3068
+ return i ? i[1] : null;
2453
3069
  } catch {
2454
3070
  return null;
2455
3071
  }
2456
3072
  },
2457
- getEmbedUrl: (e) => `https://xhamster.com/xembed.php?video=${e}`
2458
- }, ar = {
3073
+ getEmbedUrl: (t) => `https://xhamster.com/xembed.php?video=${t}`
3074
+ }, Br = {
2459
3075
  name: "spankbang",
2460
3076
  displayName: "SpankBang",
2461
3077
  domains: ["spankbang.com"],
2462
3078
  tier: "adult",
2463
3079
  supportsAutoplay: !1,
2464
3080
  supportsApi: !1,
2465
- extractVideoId: (e) => {
3081
+ extractVideoId: (t) => {
2466
3082
  try {
2467
- const t = new URL(e);
2468
- if (t.hostname.replace("www.", "") !== "spankbang.com")
3083
+ const e = new URL(t);
3084
+ if (e.hostname.replace("www.", "") !== "spankbang.com")
2469
3085
  return null;
2470
- const a = t.pathname.match(/\/([a-zA-Z0-9]+)\/video\//);
2471
- return a ? a[1] : null;
3086
+ const i = e.pathname.match(/\/([a-zA-Z0-9]+)\/video\//);
3087
+ return i ? i[1] : null;
2472
3088
  } catch {
2473
3089
  return null;
2474
3090
  }
2475
3091
  },
2476
- getEmbedUrl: (e) => `https://spankbang.com/${e}/embed/`
2477
- }, Ce = [
3092
+ getEmbedUrl: (t) => `https://spankbang.com/${t}/embed/`
3093
+ }, Ge = [
2478
3094
  // Tier 1: Major platforms
2479
- Mt,
2480
- At,
2481
- St,
2482
- Ut,
2483
- Pt,
2484
- Vt,
2485
- Dt,
2486
- Bt,
2487
- Et,
2488
- jt,
2489
- Ot,
3095
+ hr,
3096
+ mr,
3097
+ pr,
3098
+ fr,
3099
+ vr,
3100
+ gr,
3101
+ yr,
3102
+ br,
3103
+ wr,
3104
+ _r,
3105
+ xr,
2490
3106
  // Tier 2: Professional/Enterprise platforms
2491
- Rt,
2492
- Ht,
2493
- zt,
2494
- Wt,
2495
- Tt,
2496
- Ft,
2497
- qt,
2498
- Zt,
2499
- Kt,
3107
+ $r,
3108
+ Ir,
3109
+ Cr,
3110
+ kr,
3111
+ Sr,
3112
+ Nr,
3113
+ Lr,
3114
+ Mr,
3115
+ Ar,
2500
3116
  // Tier 3: Cloud storage
2501
- Yt,
2502
- Jt,
3117
+ Pr,
3118
+ Er,
2503
3119
  // Tier 4: Social media
2504
- Gt,
2505
- Qt,
2506
- Xt,
3120
+ Dr,
3121
+ zr,
3122
+ Or,
2507
3123
  // Tier 5: Adult content
2508
- er,
2509
- tr,
2510
- rr,
2511
- nr,
2512
- ar
2513
- ], _e = Ce.reduce(
2514
- (e, t) => (e[t.name] = t, e),
3124
+ Ur,
3125
+ Vr,
3126
+ Rr,
3127
+ Tr,
3128
+ Br
3129
+ ], Oe = Ge.reduce(
3130
+ (t, e) => (t[e.name] = e, t),
2515
3131
  {}
2516
3132
  );
2517
- function Ie(e) {
2518
- if (!e)
3133
+ function Ye(t) {
3134
+ if (!t)
2519
3135
  return null;
2520
3136
  try {
2521
- const r = new URL(e).hostname.toLowerCase().replace("www.", "");
2522
- for (const a of Ce)
2523
- for (const o of a.domains)
2524
- if (r === o || r.endsWith(`.${o}`))
2525
- return a;
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;
2526
3142
  return null;
2527
3143
  } catch {
2528
3144
  return null;
2529
3145
  }
2530
3146
  }
2531
- function Ne(e) {
2532
- const t = Ie(e);
2533
- if (!t)
3147
+ function Je(t) {
3148
+ const e = Ye(t);
3149
+ if (!e)
2534
3150
  return null;
2535
- const r = t.extractVideoId(e);
3151
+ const r = e.extractVideoId(t);
2536
3152
  return r ? {
2537
- provider: t,
3153
+ provider: e,
2538
3154
  videoId: r
2539
3155
  } : null;
2540
3156
  }
2541
- function $r(e, t) {
2542
- const r = Ne(e);
2543
- return r ? r.provider.getEmbedUrl(r.videoId, t) : null;
3157
+ function cn(t, e) {
3158
+ const r = Je(t);
3159
+ return r ? r.provider.getEmbedUrl(r.videoId, e) : null;
2544
3160
  }
2545
- function kr(e) {
2546
- return Ie(e)?.tier === "adult";
3161
+ function dn(t) {
3162
+ return Ye(t)?.tier === "adult";
2547
3163
  }
2548
- const or = () => /* @__PURE__ */ u(
3164
+ const jr = () => /* @__PURE__ */ y(
2549
3165
  "svg",
2550
3166
  {
2551
3167
  width: "64",
@@ -2559,7 +3175,7 @@ const or = () => /* @__PURE__ */ u(
2559
3175
  /* @__PURE__ */ n("path", { d: "M26 20L46 32L26 44V20Z", fill: "currentColor", style: { color: "#3b82f6" } })
2560
3176
  ]
2561
3177
  }
2562
- ), ir = () => /* @__PURE__ */ u(
3178
+ ), Hr = () => /* @__PURE__ */ y(
2563
3179
  "svg",
2564
3180
  {
2565
3181
  width: "20",
@@ -2573,210 +3189,376 @@ const or = () => /* @__PURE__ */ u(
2573
3189
  /* @__PURE__ */ n("path", { d: "M8 7l5 3-5 3V7z" })
2574
3190
  ]
2575
3191
  }
2576
- ), Cr = ({
2577
- title: e,
2578
- description: t,
3192
+ ), un = ({
3193
+ title: t,
3194
+ description: e,
2579
3195
  url: r,
2580
- youtubeId: a,
2581
- vimeoId: o,
2582
- provider: p,
2583
- videoId: f,
2584
- autoplay: v = !1,
3196
+ youtubeId: i,
3197
+ vimeoId: a,
3198
+ provider: m,
3199
+ videoId: s,
3200
+ autoplay: l = !1,
2585
3201
  muted: $ = !1,
2586
- loop: G = !1,
2587
- startTime: P,
2588
- controls: q = !0,
2589
- thumbnailUrl: h,
2590
- onPlay: j,
2591
- onError: A,
2592
- onReady: Z,
2593
- className: O = "",
2594
- overlayIcon: S,
2595
- aspectRatio: R = "16:9",
2596
- width: Q,
2597
- height: K,
2598
- allowAdultContent: k = !1,
2599
- fallback: V
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
2600
3219
  }) => {
2601
- const [C, H] = F(!1), [D, l] = F(null), y = ee(null), c = te(() => {
2602
- if (p && f) {
2603
- const m = _e[p];
2604
- if (m)
2605
- return { provider: m, videoId: f, method: "explicit" };
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" };
2606
3225
  }
2607
3226
  if (r) {
2608
- const m = Ne(r);
2609
- if (m)
2610
- return { ...m, method: "url" };
3227
+ const q = Je(r);
3228
+ if (q)
3229
+ return { ...q, method: "url" };
2611
3230
  }
2612
- if (a) {
2613
- const m = _e.youtube;
2614
- if (m)
2615
- return { provider: m, videoId: a, method: "legacy" };
3231
+ if (i) {
3232
+ const q = Oe.youtube;
3233
+ if (q)
3234
+ return { provider: q, videoId: i, method: "legacy" };
2616
3235
  }
2617
- if (o) {
2618
- const m = _e.vimeo;
2619
- if (m)
2620
- return { provider: m, videoId: o, method: "legacy" };
3236
+ if (a) {
3237
+ const q = Oe.vimeo;
3238
+ if (q)
3239
+ return { provider: q, videoId: a, method: "legacy" };
2621
3240
  }
2622
3241
  return null;
2623
- }, [r, p, f, a, o]), b = te(() => c ? c.provider.tier === "adult" : !1, [c]), z = te(
3242
+ }, [r, m, s, i, a]), se = oe(() => w ? w.provider.tier === "adult" : !1, [w]), J = oe(
2624
3243
  () => ({
2625
3244
  // When user clicks to play, enable autoplay automatically
2626
- autoplay: C ? !0 : v,
3245
+ autoplay: R ? !0 : l,
2627
3246
  muted: $,
2628
- loop: G,
2629
- startTime: P,
2630
- controls: q
3247
+ loop: L,
3248
+ startTime: k,
3249
+ controls: E
2631
3250
  }),
2632
- [v, $, G, P, q, C]
2633
- ), E = te(() => {
2634
- if (!c) return "";
3251
+ [l, $, L, k, E, R]
3252
+ ), ie = oe(() => {
3253
+ if (!w) return "";
2635
3254
  try {
2636
- return c.provider.getEmbedUrl(c.videoId, z);
2637
- } catch (m) {
2638
- return console.error("Error generating embed URL:", m), "";
2639
- }
2640
- }, [c, z]), ne = te(() => {
2641
- if (h) return h;
2642
- if (c?.provider.name === "youtube")
2643
- return `https://img.youtube.com/vi/${c.videoId}/maxresdefault.jpg`;
2644
- }, [h, c]), ae = N(() => {
2645
- c && (H(!0), j && j(c.videoId, c.provider.name), Z && Z(c.videoId, c.provider.name));
2646
- }, [c, j, Z]), X = N(
2647
- (m) => {
2648
- l(m), A && c && A(new Error(m), c.provider.name);
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);
2649
3268
  },
2650
- [A, c]
3269
+ [_, w]
2651
3270
  );
2652
- if (!c)
2653
- return V ? /* @__PURE__ */ n(me, { children: V }) : (console.warn("UIForgeVideo: No valid video source provided"), null);
2654
- if (b && !k) {
2655
- const m = "Adult content must be explicitly enabled with allowAdultContent prop";
2656
- return V ? /* @__PURE__ */ n(me, { children: V }) : (console.warn(`UIForgeVideo: ${m}`), /* @__PURE__ */ n("div", { className: "uiforge-video", children: /* @__PURE__ */ n("div", { className: "uiforge-video__error", children: /* @__PURE__ */ n("p", { children: m }) }) }));
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 }) }) }));
2657
3276
  }
2658
- if (D)
2659
- return V ? /* @__PURE__ */ n(me, { children: V }) : /* @__PURE__ */ n("div", { className: "uiforge-video", children: /* @__PURE__ */ n("div", { className: "uiforge-video__error", children: /* @__PURE__ */ n("p", { children: D }) }) });
2660
- const W = "uiforge-video", oe = `${W} ${O}`.trim(), s = {
2661
- aspectRatio: R !== "auto" ? R.replace(":", "/") : void 0,
2662
- width: Q ? typeof Q == "number" ? `${Q}px` : Q : void 0,
2663
- height: K ? typeof K == "number" ? `${K}px` : K : void 0
2664
- }, U = e || `${c.provider.displayName} Video`;
2665
- return /* @__PURE__ */ u("div", { className: oe, children: [
2666
- (e || t) && /* @__PURE__ */ u("div", { className: `${W}__header`, children: [
2667
- e && /* @__PURE__ */ n("h3", { className: `${W}__title`, children: e }),
2668
- t && /* @__PURE__ */ n("p", { className: `${W}__description`, children: t })
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 })
2669
3289
  ] }),
2670
- /* @__PURE__ */ n("div", { className: `${W}__player-container`, style: s, children: C ? /* @__PURE__ */ n(
3290
+ /* @__PURE__ */ n("div", { className: `${j}__player-container`, style: re, children: R ? /* @__PURE__ */ n(
2671
3291
  "iframe",
2672
3292
  {
2673
- ref: y,
2674
- src: E,
2675
- title: U,
2676
- className: `${W}__iframe`,
3293
+ ref: x,
3294
+ src: ie,
3295
+ title: me,
3296
+ className: `${j}__iframe`,
2677
3297
  allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
2678
3298
  allowFullScreen: !0,
2679
- onError: () => X("Failed to load video")
3299
+ onError: () => le("Failed to load video")
2680
3300
  }
2681
- ) : /* @__PURE__ */ u(me, { children: [
2682
- ne && /* @__PURE__ */ n("img", { src: ne, alt: U, className: `${W}__thumbnail` }),
3301
+ ) : /* @__PURE__ */ y(ye, { children: [
3302
+ ee && /* @__PURE__ */ n("img", { src: ee, alt: me, className: `${j}__thumbnail` }),
2683
3303
  /* @__PURE__ */ n(
2684
3304
  "button",
2685
3305
  {
2686
- className: `${W}__overlay`,
2687
- onClick: ae,
2688
- "aria-label": `Play video: ${U}`,
3306
+ className: `${j}__overlay`,
3307
+ onClick: ce,
3308
+ "aria-label": `Play video: ${me}`,
2689
3309
  type: "button",
2690
- children: S || /* @__PURE__ */ n(or, {})
3310
+ children: u || /* @__PURE__ */ n(jr, {})
2691
3311
  }
2692
3312
  )
2693
3313
  ] }) })
2694
3314
  ] });
2695
- }, Ir = ({
2696
- title: e,
2697
- icon: t,
3315
+ }, hn = ({
3316
+ title: t,
3317
+ icon: e,
2698
3318
  className: r = "",
2699
- onClick: a
3319
+ onClick: i
2700
3320
  }) => {
2701
- const o = "uiforge-video-preview", p = `${o} ${r}`.trim();
2702
- return /* @__PURE__ */ u(a ? "button" : "div", { className: p, ...a ? {
3321
+ const a = "uiforge-video-preview", m = `${a} ${r}`.trim();
3322
+ return /* @__PURE__ */ y(i ? "button" : "div", { className: m, ...i ? {
2703
3323
  type: "button",
2704
3324
  onClick: () => {
2705
- a && a();
3325
+ i && i();
2706
3326
  },
2707
- onKeyDown: (P) => {
2708
- a && (P.key === "Enter" || P.key === " ") && (P.preventDefault(), a());
3327
+ onKeyDown: (k) => {
3328
+ i && (k.key === "Enter" || k.key === " ") && (k.preventDefault(), i());
2709
3329
  }
2710
3330
  } : {}, children: [
2711
- /* @__PURE__ */ n("div", { className: `${o}__icon-container`, children: t || /* @__PURE__ */ n(ir, {}) }),
2712
- /* @__PURE__ */ n("span", { className: `${o}__title`, children: e })
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
+ )
2713
3444
  ] });
2714
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
+ }
2715
3490
  export {
2716
- xe as ActivityIcons,
2717
- ht as AlienIcon,
2718
- bt as BriefcaseIcon,
2719
- lt as BugIcon,
2720
- Ct as BuildIcon,
2721
- wr as BusinessIcons,
2722
- cr as Button,
2723
- yt as CalendarIcon,
2724
- ft as ChartIcon,
2725
- Je as CheckIcon,
2726
- Ye as CloseIcon,
2727
- it as CloudIcon,
2728
- ct as CodeIcon,
2729
- He as CommentIcon,
2730
- je as CommitIcon,
2731
- ot as DatabaseIcon,
2732
- qe as DeployIcon,
2733
- $t as DeploymentIcon,
2734
- _r as DevProcessIcons,
2735
- gt as DocumentIcon,
2736
- et as DumbbellIcon,
2737
- gr as FitnessIcons,
2738
- Ke as FoldIcon,
2739
- We as ForkIcon,
2740
- wt as GitBranchIcon,
2741
- rt as HeartRateIcon,
2742
- Re as IssueIcon,
2743
- Qe as MeditationIcon,
2744
- vt as MeetingIcon,
2745
- Te as MergeIcon,
2746
- mt as PlanetIcon,
2747
- _t as PullRequestDraftIcon,
2748
- Oe as PullRequestIcon,
2749
- Fe as ReleaseIcon,
2750
- kt as ReviewIcon,
2751
- dt as RocketIcon,
2752
- tt as RunningIcon,
2753
- ut as SatelliteIcon,
2754
- at as ServerIcon,
2755
- br as SpaceIcons,
2756
- ze as StarIcon,
2757
- nt as StrengthIcon,
2758
- Ge as TaiChiIcon,
2759
- yr as TechIcons,
2760
- pt as TelescopeIcon,
2761
- st as TerminalIcon,
2762
- xt as TestingIcon,
2763
- xr as UIForgeActivityStream,
2764
- ur as UIForgeBlocksEditor,
2765
- fr as UIForgeComboBox,
2766
- dr as UIForgeGrid,
2767
- Cr as UIForgeVideo,
2768
- Ir as UIForgeVideoPreview,
2769
- $e as UIIcons,
2770
- Ze as UnfoldIcon,
2771
- vr as WellnessIcons,
2772
- Xe as YogaIcon,
2773
- hr as blocksToHTML,
2774
- pr as blocksToJSON,
2775
- mr as blocksToMarkdown,
2776
- Ie as detectProvider,
2777
- Ne as extractVideoId,
2778
- $r as getEmbedUrlFromVideoUrl,
2779
- kr as isAdultContent,
2780
- _e as providersByName,
2781
- Ce as videoProviders
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
2782
3564
  };