@auldrant/ui 0.10.0 → 0.11.1

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.
@@ -1,66 +1,198 @@
1
- import { jsx as r, jsxs as m, Fragment as se } from "preact/jsx-runtime";
2
- import { useId as $, useRef as P, useEffect as H } from "preact/hooks";
3
- import { signal as U, useSignal as D, effect as le } from "@preact/signals";
4
- import { h as K, toChildArray as re } from "preact";
5
- function v(...t) {
1
+ import { jsx as l, jsxs as g, Fragment as ae } from "preact/jsx-runtime";
2
+ import { useId as L, useState as ce, useRef as H, useCallback as ie, useEffect as A } from "preact/hooks";
3
+ import { h as K, toChildArray as de } from "preact";
4
+ import { signal as V, useSignal as M, effect as ue } from "@preact/signals";
5
+ function m(...t) {
6
6
  return t.filter(Boolean).join(" ");
7
7
  }
8
- function N(...t) {
8
+ function D(...t) {
9
9
  return t.filter(Boolean).join(" ") || void 0;
10
10
  }
11
- const ae = "_button_4gn7y_1 _focus-ring_4u8pk_3 _disabled_4u8pk_8", oe = {
12
- button: ae
13
- }, W = (t) => {
14
- const { label: e, onClick: s, type: n = "button", disabled: l, class: a } = t;
15
- return /* @__PURE__ */ r("button", { type: n, class: v(oe.button, a), onClick: s, disabled: l, children: e });
16
- }, ce = "_card_awzw5_1", ie = {
17
- card: ce
18
- }, Pt = (t) => {
11
+ const pe = "_button_4gn7y_1 _focus-ring_4u8pk_3 _disabled_4u8pk_8", _e = {
12
+ button: pe
13
+ }, J = (t) => {
14
+ const { label: e, onClick: s, type: n = "button", disabled: r, class: o } = t;
15
+ return /* @__PURE__ */ l("button", { type: n, class: m(_e.button, o), onClick: s, disabled: r, children: e });
16
+ }, he = "_card_awzw5_1", fe = {
17
+ card: he
18
+ }, Kt = (t) => {
19
19
  const { children: e, class: s } = t;
20
- return /* @__PURE__ */ r("div", { class: v(ie.card, s), children: e });
21
- }, de = "_field_17xwz_1", ue = "_input_17xwz_8 _check-input_4u8pk_32 _focus-ring_4u8pk_3 _disabled_4u8pk_8", _e = "_error_17xwz_12 _field-error_4u8pk_36", T = {
22
- field: de,
23
- input: ue,
24
- error: _e
25
- }, Tt = (t) => {
26
- const { label: e, name: s, checked: n, required: l, disabled: a, error: o, onChange: c, class: i } = t, h = $(), d = `${h}-error`;
27
- return /* @__PURE__ */ m("div", { class: v(T.field, i), children: [
28
- /* @__PURE__ */ r(
20
+ return /* @__PURE__ */ l("div", { class: m(fe.card, s), children: e });
21
+ }, ge = "_field_17xwz_1", me = "_input_17xwz_8 _check-input_4u8pk_32 _focus-ring_4u8pk_3 _disabled_4u8pk_8", be = "_error_17xwz_12 _field-error_4u8pk_36", R = {
22
+ field: ge,
23
+ input: me,
24
+ error: be
25
+ }, Vt = (t) => {
26
+ const { label: e, name: s, checked: n, required: r, disabled: o, error: i, onChange: a, class: c } = t, d = L(), h = `${d}-error`;
27
+ return /* @__PURE__ */ g("div", { class: m(R.field, c), children: [
28
+ /* @__PURE__ */ l(
29
29
  "input",
30
30
  {
31
- id: h,
32
- class: T.input,
31
+ id: d,
32
+ class: R.input,
33
33
  type: "checkbox",
34
34
  name: s,
35
35
  checked: n,
36
- required: l,
37
- disabled: a,
38
- "aria-invalid": !!o || void 0,
39
- "aria-describedby": N(o && d),
40
- onChange: c && ((f) => c(f.target.checked))
36
+ required: r,
37
+ disabled: o,
38
+ "aria-invalid": !!i || void 0,
39
+ "aria-describedby": D(i && h),
40
+ onChange: a && ((u) => a(u.target.checked))
41
41
  }
42
42
  ),
43
- /* @__PURE__ */ r("label", { for: h, children: e }),
44
- o && /* @__PURE__ */ r("p", { id: d, class: T.error, role: "alert", children: o })
43
+ /* @__PURE__ */ l("label", { for: d, children: e }),
44
+ i && /* @__PURE__ */ l("p", { id: h, class: R.error, role: "alert", children: i })
45
45
  ] });
46
- }, pe = "_dialog_1lxj9_1", he = "_panel_1lxj9_14", fe = "_header_1lxj9_23", me = "_title_1lxj9_30", be = "_close_1lxj9_35 _focus-ring_4u8pk_3", ve = "_body_1lxj9_51", ke = "_message_1lxj9_56", ge = "_footer_1lxj9_60", ye = "_action_1lxj9_67 _focus-ring_4u8pk_3 _disabled_4u8pk_8", we = "_primary_1lxj9_82", y = {
47
- dialog: pe,
48
- panel: he,
49
- header: fe,
50
- title: me,
51
- close: be,
52
- body: ve,
53
- message: ke,
54
- footer: ge,
55
- action: ye,
56
- primary: we
57
- }, R = {
46
+ };
47
+ function ye(t, e, s) {
48
+ const [n, r] = ce(!1), o = H({ x: 0, y: 0, offsetX: 0, offsetY: 0 }), i = ie(() => {
49
+ const a = e.current;
50
+ a && (a.style.removeProperty("--drag-x"), a.style.removeProperty("--drag-y"));
51
+ }, [e]);
52
+ return A(() => {
53
+ const a = t.current, c = e.current;
54
+ if (!a || !c || !s)
55
+ return;
56
+ const d = (h) => {
57
+ if (h.target.closest("button"))
58
+ return;
59
+ const u = c.getBoundingClientRect(), p = Number.parseFloat(c.style.getPropertyValue("--drag-x") || "0"), _ = Number.parseFloat(c.style.getPropertyValue("--drag-y") || "0");
60
+ o.current = {
61
+ x: h.clientX,
62
+ y: h.clientY,
63
+ offsetX: p,
64
+ offsetY: _
65
+ }, a.setPointerCapture(h.pointerId), r(!0);
66
+ const b = -(u.left - p), y = window.innerWidth - u.right + p, v = -(u.top - _), w = window.innerHeight - u.bottom + _, N = (I) => {
67
+ const j = I.clientX - o.current.x + o.current.offsetX, P = I.clientY - o.current.y + o.current.offsetY, f = Math.max(b, Math.min(y, j)), $ = Math.max(v, Math.min(w, P));
68
+ c.style.setProperty("--drag-x", `${f}px`), c.style.setProperty("--drag-y", `${$}px`);
69
+ }, x = () => {
70
+ a.removeEventListener("pointermove", N), a.removeEventListener("pointerup", x), r(!1);
71
+ };
72
+ a.addEventListener("pointermove", N), a.addEventListener("pointerup", x);
73
+ };
74
+ return a.addEventListener("pointerdown", d), () => a.removeEventListener("pointerdown", d);
75
+ }, [t, e, s]), { isDragging: n, reset: i };
76
+ }
77
+ const ke = "_dialog_k7njf_1", ve = "_panel_k7njf_21", we = "_header_k7njf_30", xe = "_title_k7njf_37", $e = "_close_k7njf_42 _focus-ring_4u8pk_3", Ce = "_body_k7njf_61", Le = "_message_k7njf_66", Ie = "_footer_k7njf_70", Ne = "_action_k7njf_77 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Ee = "_primary_k7njf_92", De = "_draggable_k7njf_103", je = "_dragging_k7njf_109", k = {
78
+ dialog: ke,
79
+ panel: ve,
80
+ header: we,
81
+ title: xe,
82
+ close: $e,
83
+ body: Ce,
84
+ message: Le,
85
+ footer: Ie,
86
+ action: Ne,
87
+ primary: Ee,
88
+ draggable: De,
89
+ dragging: je
90
+ };
91
+ const Pe = (...t) => t.filter((e, s, n) => !!e && e.trim() !== "" && n.indexOf(e) === s).join(" ").trim();
92
+ const Q = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
93
+ const Se = (t) => t.replace(
94
+ /^([A-Z])|[\s-_]+(\w)/g,
95
+ (e, s, n) => n ? n.toUpperCase() : s.toLowerCase()
96
+ );
97
+ const ee = (t) => {
98
+ const e = Se(t);
99
+ return e.charAt(0).toUpperCase() + e.slice(1);
100
+ };
101
+ var Be = {
102
+ xmlns: "http://www.w3.org/2000/svg",
103
+ width: 24,
104
+ height: 24,
105
+ viewBox: "0 0 24 24",
106
+ fill: "none",
107
+ stroke: "currentColor",
108
+ "stroke-width": "2",
109
+ "stroke-linecap": "round",
110
+ "stroke-linejoin": "round"
111
+ };
112
+ const He = (t) => {
113
+ for (const e in t)
114
+ if (e.startsWith("aria-") || e === "role" || e === "title")
115
+ return !0;
116
+ return !1;
117
+ };
118
+ const Ae = ({
119
+ color: t = "currentColor",
120
+ size: e = 24,
121
+ strokeWidth: s = 2,
122
+ absoluteStrokeWidth: n,
123
+ children: r,
124
+ iconNode: o,
125
+ class: i = "",
126
+ ...a
127
+ }) => K(
128
+ "svg",
129
+ {
130
+ ...Be,
131
+ width: String(e),
132
+ height: e,
133
+ stroke: t,
134
+ "stroke-width": n ? Number(s) * 24 / Number(e) : s,
135
+ class: ["lucide", i].join(" "),
136
+ ...!r && !He(a) && { "aria-hidden": "true" },
137
+ ...a
138
+ },
139
+ [...o.map(([c, d]) => K(c, d)), ...de(r)]
140
+ );
141
+ const W = (t, e) => {
142
+ const s = ({ class: n = "", className: r = "", children: o, ...i }) => K(
143
+ Ae,
144
+ {
145
+ ...i,
146
+ iconNode: e,
147
+ class: Pe(
148
+ `lucide-${Q(ee(t))}`,
149
+ `lucide-${Q(t)}`,
150
+ n,
151
+ r
152
+ )
153
+ },
154
+ o
155
+ );
156
+ return s.displayName = ee(t), s;
157
+ };
158
+ const Me = W("eye", [
159
+ [
160
+ "path",
161
+ {
162
+ d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
163
+ key: "1nclc0"
164
+ }
165
+ ],
166
+ ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
167
+ ]);
168
+ const qe = W("eye-off", [
169
+ [
170
+ "path",
171
+ {
172
+ d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
173
+ key: "ct8e1f"
174
+ }
175
+ ],
176
+ ["path", { d: "M14.084 14.158a3 3 0 0 1-4.242-4.242", key: "151rxh" }],
177
+ [
178
+ "path",
179
+ {
180
+ d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",
181
+ key: "13bj9a"
182
+ }
183
+ ],
184
+ ["path", { d: "m2 2 20 20", key: "1ooewy" }]
185
+ ]);
186
+ const Te = W("x", [
187
+ ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
188
+ ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
189
+ ]), F = {
58
190
  cancel: "Cancel",
59
191
  cancelDescription: "Dismiss this dialog",
60
192
  closeDescription: "Close this dialog"
61
193
  };
62
- function xe(t) {
63
- const e = t.split("+"), s = e.at(-1) ?? "", n = e.slice(0, -1).map((l) => l.toLowerCase());
194
+ function ze(t) {
195
+ const e = t.split("+"), s = e.at(-1) ?? "", n = e.slice(0, -1).map((r) => r.toLowerCase());
64
196
  return {
65
197
  key: s.toLowerCase(),
66
198
  ctrl: n.includes("ctrl"),
@@ -68,132 +200,140 @@ function xe(t) {
68
200
  alt: n.includes("alt")
69
201
  };
70
202
  }
71
- function z(t) {
203
+ function O(t) {
72
204
  return `(${t})`;
73
205
  }
74
- const Y = (t) => {
206
+ const re = (t) => {
75
207
  const {
76
208
  open: e,
77
209
  title: s,
78
210
  alert: n,
79
- onDismiss: l,
80
- onBackdropClick: a,
81
- message: o,
211
+ draggable: r,
212
+ onDismiss: o,
213
+ onBackdropClick: i,
214
+ message: a,
82
215
  defaultAction: c,
83
- actions: i,
216
+ actions: d,
84
217
  cancelLabel: h,
85
- onCancel: d,
86
- focusCancel: f,
218
+ onCancel: u,
219
+ focusCancel: p,
87
220
  children: _,
88
- class: u
89
- } = t, b = P(null), g = P(null), C = P(null), I = $();
90
- H(() => {
91
- const p = b.current;
92
- p && (e && !p.open ? (p.showModal(), f && C.current ? C.current.focus() : g.current && g.current.focus()) : !e && p.open && p.close());
93
- }, [e, f]), H(() => {
94
- const p = b.current;
95
- if (!p)
221
+ class: b
222
+ } = t, y = H(null), v = H(null), w = H(null), N = H(null), x = L(), { isDragging: I, reset: j } = ye(v, y, e && !!r);
223
+ A(() => {
224
+ const f = y.current;
225
+ f && (e && !f.open ? (f.showModal(), p && N.current ? N.current.focus() : w.current && w.current.focus()) : !e && f.open && (f.close(), j()));
226
+ }, [e, p, j]), A(() => {
227
+ const f = y.current;
228
+ if (!f)
96
229
  return;
97
- const k = (L) => {
98
- L.preventDefault(), l();
230
+ const $ = (S) => {
231
+ S.preventDefault(), o();
99
232
  };
100
- return p.addEventListener("cancel", k), () => p.removeEventListener("cancel", k);
101
- }, [l]), H(() => {
102
- const p = b.current;
103
- if (!p || !e)
233
+ return f.addEventListener("cancel", $), () => f.removeEventListener("cancel", $);
234
+ }, [o]), A(() => {
235
+ const f = y.current;
236
+ if (!f || !e)
104
237
  return;
105
- const k = [...i ?? [], ...c ? [c] : []];
106
- if (k.length === 0)
238
+ const $ = [...d ?? [], ...c ? [c] : []];
239
+ if ($.length === 0)
107
240
  return;
108
- const L = k.map((w) => ({
109
- parsed: xe(w.shortcut),
110
- handler: w.onClick
111
- })), j = (w) => {
112
- for (const { parsed: A, handler: ne } of L)
113
- if (w.key.toLowerCase() === A.key && w.ctrlKey === A.ctrl && w.shiftKey === A.shift && w.altKey === A.alt) {
114
- w.preventDefault(), ne();
241
+ const S = $.map((E) => ({
242
+ parsed: ze(E.shortcut),
243
+ handler: E.onClick
244
+ })), Z = (E) => {
245
+ for (const { parsed: T, handler: oe } of S)
246
+ if (E.key.toLowerCase() === T.key && E.ctrlKey === T.ctrl && E.shiftKey === T.shift && E.altKey === T.alt) {
247
+ E.preventDefault(), oe();
115
248
  return;
116
249
  }
117
250
  };
118
- return p.addEventListener("keydown", j), () => p.removeEventListener("keydown", j);
119
- }, [e, i, c]), H(() => {
120
- const p = b.current;
121
- if (!p || !e || !a)
251
+ return f.addEventListener("keydown", Z), () => f.removeEventListener("keydown", Z);
252
+ }, [e, d, c]), A(() => {
253
+ const f = y.current;
254
+ if (!f || !e || !i)
122
255
  return;
123
- const k = (L) => {
124
- L.target === p && a();
256
+ const $ = (S) => {
257
+ S.target === f && i();
125
258
  };
126
- return p.addEventListener("click", k), () => p.removeEventListener("click", k);
127
- }, [e, a]);
128
- const q = c || d || i && i.length > 0;
129
- return /* @__PURE__ */ r(
259
+ return f.addEventListener("click", $), () => f.removeEventListener("click", $);
260
+ }, [e, i]);
261
+ const P = c || u || d && d.length > 0;
262
+ return /* @__PURE__ */ l(
130
263
  "dialog",
131
264
  {
132
- ref: b,
133
- class: v(y.dialog, u),
134
- "aria-labelledby": I,
265
+ ref: y,
266
+ class: m(k.dialog, b),
267
+ "aria-labelledby": x,
135
268
  role: n ? "alertdialog" : void 0,
136
- children: /* @__PURE__ */ m("div", { class: y.panel, children: [
137
- /* @__PURE__ */ m("header", { class: y.header, children: [
138
- /* @__PURE__ */ r("h2", { id: I, class: y.title, children: s }),
139
- !n && /* @__PURE__ */ r(
140
- "button",
141
- {
142
- type: "button",
143
- class: y.close,
144
- title: R.closeDescription,
145
- onClick: l,
146
- children: "×"
147
- }
148
- )
149
- ] }),
150
- /* @__PURE__ */ m("div", { class: y.body, children: [
151
- o && /* @__PURE__ */ r("p", { class: y.message, children: o }),
269
+ children: /* @__PURE__ */ g("div", { class: k.panel, children: [
270
+ /* @__PURE__ */ g(
271
+ "header",
272
+ {
273
+ ref: v,
274
+ class: m(k.header, r && k.draggable, I && k.dragging),
275
+ children: [
276
+ /* @__PURE__ */ l("h2", { id: x, class: k.title, children: s }),
277
+ !n && /* @__PURE__ */ l(
278
+ "button",
279
+ {
280
+ type: "button",
281
+ class: k.close,
282
+ title: F.closeDescription,
283
+ onClick: o,
284
+ children: /* @__PURE__ */ l(Te, { size: "1.5em", "aria-hidden": "true" })
285
+ }
286
+ )
287
+ ]
288
+ }
289
+ ),
290
+ /* @__PURE__ */ g("div", { class: k.body, children: [
291
+ a && /* @__PURE__ */ l("p", { class: k.message, children: a }),
152
292
  _
153
293
  ] }),
154
- q && /* @__PURE__ */ m("footer", { class: y.footer, children: [
155
- i?.map((p) => /* @__PURE__ */ m(
294
+ P && /* @__PURE__ */ g("footer", { class: k.footer, children: [
295
+ d?.map((f) => /* @__PURE__ */ g(
156
296
  "button",
157
297
  {
158
298
  type: "button",
159
- class: y.action,
160
- title: p.description,
161
- onClick: p.onClick,
299
+ class: k.action,
300
+ title: f.description,
301
+ onClick: f.onClick,
162
302
  children: [
163
- p.label,
303
+ f.label,
164
304
  " ",
165
- z(p.shortcut)
305
+ O(f.shortcut)
166
306
  ]
167
307
  },
168
- p.label
308
+ f.label
169
309
  )),
170
- c && /* @__PURE__ */ m(
310
+ c && /* @__PURE__ */ g(
171
311
  "button",
172
312
  {
173
- ref: g,
313
+ ref: w,
174
314
  type: "button",
175
- class: v(y.action, y.primary),
315
+ class: m(k.action, k.primary),
176
316
  title: c.description,
177
317
  onClick: c.onClick,
178
318
  children: [
179
319
  c.label,
180
320
  " ",
181
- z(c.shortcut)
321
+ O(c.shortcut)
182
322
  ]
183
323
  }
184
324
  ),
185
- d && /* @__PURE__ */ m(
325
+ u && /* @__PURE__ */ g(
186
326
  "button",
187
327
  {
188
- ref: C,
328
+ ref: N,
189
329
  type: "button",
190
- class: y.action,
191
- title: R.cancelDescription,
192
- onClick: d,
330
+ class: k.action,
331
+ title: F.cancelDescription,
332
+ onClick: u,
193
333
  children: [
194
- h ?? R.cancel,
334
+ h ?? F.cancel,
195
335
  " ",
196
- z("Esc")
336
+ O("Esc")
197
337
  ]
198
338
  }
199
339
  )
@@ -201,683 +341,592 @@ const Y = (t) => {
201
341
  ] })
202
342
  }
203
343
  );
204
- }, Rt = (t) => {
344
+ }, Wt = (t) => {
205
345
  const {
206
346
  open: e,
207
347
  title: s,
208
348
  onClose: n,
209
- message: l,
210
- defaultAction: a,
211
- actions: o,
349
+ message: r,
350
+ defaultAction: o,
351
+ actions: i,
352
+ draggable: a = !0,
212
353
  children: c,
213
- class: i
354
+ class: d
214
355
  } = t;
215
- return /* @__PURE__ */ r(
216
- Y,
356
+ return /* @__PURE__ */ l(
357
+ re,
217
358
  {
218
359
  open: e,
219
360
  title: s,
361
+ draggable: a,
220
362
  onDismiss: n,
221
363
  onBackdropClick: n,
222
- message: l,
223
- defaultAction: a,
224
- actions: o,
225
- class: i,
364
+ message: r,
365
+ defaultAction: o,
366
+ actions: i,
367
+ class: d,
226
368
  children: c
227
369
  }
228
370
  );
229
- }, $e = "_link_7wgic_1 _link_4u8pk_22 _focus-ring_4u8pk_3", Ce = {
230
- link: $e
231
- }, zt = (t) => {
232
- const { href: e, fileName: s, label: n, class: l } = t;
233
- return /* @__PURE__ */ r("a", { href: e, download: s, class: v(Ce.link, l), children: n });
234
- }, Ie = "_form_jr324_1", Le = "_actions_jr324_6", Ne = "_status_jr324_13", O = {
235
- form: Ie,
236
- actions: Le,
237
- status: Ne
238
- }, Ot = (t) => {
371
+ }, Re = "_link_7wgic_1 _link_4u8pk_22 _focus-ring_4u8pk_3", Fe = {
372
+ link: Re
373
+ }, Gt = (t) => {
374
+ const { href: e, fileName: s, label: n, class: r } = t;
375
+ return /* @__PURE__ */ l("a", { href: e, download: s, class: m(Fe.link, r), children: n });
376
+ }, Oe = "_form_jr324_1", Xe = "_actions_jr324_6", Ye = "_status_jr324_13", X = {
377
+ form: Oe,
378
+ actions: Xe,
379
+ status: Ye
380
+ }, Zt = (t) => {
239
381
  const {
240
382
  onSubmit: e,
241
383
  submitLabel: s = "Submit",
242
384
  resetLabel: n,
243
- status: l,
244
- children: a,
245
- class: o
385
+ status: r,
386
+ children: o,
387
+ class: i
246
388
  } = t;
247
- return /* @__PURE__ */ m(
389
+ return /* @__PURE__ */ g(
248
390
  "form",
249
391
  {
250
- class: v(O.form, o),
251
- onSubmit: (c) => {
252
- c.preventDefault();
253
- const i = new FormData(c.currentTarget);
254
- e(i);
392
+ class: m(X.form, i),
393
+ onSubmit: (a) => {
394
+ a.preventDefault();
395
+ const c = new FormData(a.currentTarget);
396
+ e(c);
255
397
  },
256
398
  children: [
257
- a,
258
- /* @__PURE__ */ m("div", { class: O.actions, children: [
259
- /* @__PURE__ */ r(W, { type: "submit", label: s }),
260
- n && /* @__PURE__ */ r(W, { type: "reset", label: n })
399
+ o,
400
+ /* @__PURE__ */ g("div", { class: X.actions, children: [
401
+ /* @__PURE__ */ l(J, { type: "submit", label: s }),
402
+ n && /* @__PURE__ */ l(J, { type: "reset", label: n })
261
403
  ] }),
262
- l && /* @__PURE__ */ r("output", { class: O.status, children: l })
404
+ r && /* @__PURE__ */ l("output", { class: X.status, children: r })
263
405
  ]
264
406
  }
265
407
  );
266
- }, je = "_field_7l9ux_1", Ee = "_label_7l9ux_8", De = "_required_7l9ux_12", Se = "_error_7l9ux_16 _field-error_4u8pk_36", B = {
267
- field: je,
268
- label: Ee,
269
- required: De,
270
- error: Se
271
- }, S = (t) => {
272
- const { for: e, label: s, required: n, error: l, errorId: a, children: o, class: c } = t;
273
- return /* @__PURE__ */ m("div", { class: v(B.field, c), children: [
274
- /* @__PURE__ */ m("label", { class: B.label, for: e, children: [
408
+ }, Ue = "_field_7l9ux_1", Ke = "_label_7l9ux_8", Ve = "_required_7l9ux_12", We = "_error_7l9ux_16 _field-error_4u8pk_36", z = {
409
+ field: Ue,
410
+ label: Ke,
411
+ required: Ve,
412
+ error: We
413
+ }, q = (t) => {
414
+ const { for: e, label: s, required: n, error: r, errorId: o, children: i, class: a } = t;
415
+ return /* @__PURE__ */ g("div", { class: m(z.field, a), children: [
416
+ /* @__PURE__ */ g("label", { class: z.label, for: e, children: [
275
417
  s,
276
418
  ":",
277
- n && /* @__PURE__ */ m("span", { class: B.required, "aria-hidden": "true", children: [
419
+ n && /* @__PURE__ */ g("span", { class: z.required, "aria-hidden": "true", children: [
278
420
  " ",
279
421
  "*"
280
422
  ] })
281
423
  ] }),
282
- o,
283
- l && /* @__PURE__ */ r("p", { id: a, class: B.error, role: "alert", children: l })
424
+ i,
425
+ r && /* @__PURE__ */ l("p", { id: o, class: z.error, role: "alert", children: r })
284
426
  ] });
285
- }, Ae = "_input_1j10x_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", He = {
286
- input: Ae
287
- }, Be = {
427
+ }, Ge = "_input_1j10x_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Ze = {
428
+ input: Ge
429
+ }, Je = {
288
430
  email: "email",
289
431
  tel: "tel",
290
432
  url: "url"
291
- }, Ft = (t) => {
433
+ }, Jt = (t) => {
292
434
  const {
293
435
  label: e,
294
436
  name: s,
295
437
  type: n = "text",
296
- value: l,
297
- placeholder: a,
298
- maxLength: o,
299
- autocomplete: c,
300
- readOnly: i,
301
- pattern: h,
302
- required: d,
303
- disabled: f,
304
- error: _,
305
- onInput: u,
438
+ value: r,
439
+ placeholder: o,
440
+ maxLength: i,
441
+ autocomplete: a,
442
+ readOnly: c,
443
+ pattern: d,
444
+ required: h,
445
+ disabled: u,
446
+ error: p,
447
+ onInput: _,
306
448
  class: b
307
- } = t, g = $(), C = `${g}-error`;
308
- return /* @__PURE__ */ r(
309
- S,
449
+ } = t, y = L(), v = `${y}-error`;
450
+ return /* @__PURE__ */ l(
451
+ q,
310
452
  {
311
453
  label: e,
312
- for: g,
313
- required: d,
314
- error: _,
315
- errorId: C,
454
+ for: y,
455
+ required: h,
456
+ error: p,
457
+ errorId: v,
316
458
  class: b,
317
- children: /* @__PURE__ */ r(
459
+ children: /* @__PURE__ */ l(
318
460
  "input",
319
461
  {
320
- id: g,
321
- class: He.input,
462
+ id: y,
463
+ class: Ze.input,
322
464
  type: n,
323
465
  name: s,
324
- value: l,
325
- placeholder: a,
326
- maxLength: o,
327
- autoComplete: c ?? Be[n],
328
- readOnly: i,
329
- pattern: h,
330
- required: d,
331
- disabled: f,
332
- "aria-invalid": !!_ || void 0,
333
- "aria-describedby": N(_ && C),
334
- onInput: u && ((I) => u(I.target.value))
466
+ value: r,
467
+ placeholder: o,
468
+ maxLength: i,
469
+ autoComplete: a ?? Je[n],
470
+ readOnly: c,
471
+ pattern: d,
472
+ required: h,
473
+ disabled: u,
474
+ "aria-invalid": !!p || void 0,
475
+ "aria-describedby": D(p && v),
476
+ onInput: _ && ((w) => _(w.target.value))
335
477
  }
336
478
  )
337
479
  }
338
480
  );
339
- }, G = U(window.location.pathname), ee = U(window.location.hash.slice(1));
340
- function qe(t) {
481
+ }, G = V(window.location.pathname), le = V(window.location.hash.slice(1));
482
+ function Qe(t) {
341
483
  const e = t.indexOf("#");
342
484
  let s = "", n = t;
343
485
  e >= 0 && (s = t.slice(e + 1), n = t.slice(0, e));
344
- const l = n.indexOf("?");
345
- let a = "", o = n;
346
- return l >= 0 && (a = n.slice(l), o = n.slice(0, l)), { pathname: o || "/", search: a, hash: s };
486
+ const r = n.indexOf("?");
487
+ let o = "", i = n;
488
+ return r >= 0 && (o = n.slice(r), i = n.slice(0, r)), { pathname: i || "/", search: o, hash: s };
347
489
  }
348
- function Pe(t, e) {
349
- const { pathname: s, search: n, hash: l } = qe(t), a = s + n + (l ? `#${l}` : "");
350
- e?.replace ? history.replaceState(null, "", a) : history.pushState(null, "", a), G.value = s, ee.value = l;
490
+ function et(t, e) {
491
+ const { pathname: s, search: n, hash: r } = Qe(t), o = s + n + (r ? `#${r}` : "");
492
+ e?.replace ? history.replaceState(null, "", o) : history.pushState(null, "", o), G.value = s, le.value = r;
351
493
  }
352
494
  window.addEventListener("popstate", () => {
353
- G.value = window.location.pathname, ee.value = window.location.hash.slice(1);
495
+ G.value = window.location.pathname, le.value = window.location.hash.slice(1);
354
496
  });
355
- const Te = "_link_7wgic_1 _link_4u8pk_22 _focus-ring_4u8pk_3", Z = {
356
- link: Te
497
+ const tt = "_link_7wgic_1 _link_4u8pk_22 _focus-ring_4u8pk_3", te = {
498
+ link: tt
357
499
  };
358
- function Re(t) {
500
+ function nt(t) {
359
501
  try {
360
502
  return new URL(t, window.location.href).origin !== window.location.origin;
361
503
  } catch {
362
504
  return !1;
363
505
  }
364
506
  }
365
- const Mt = (t) => {
366
- const { href: e, children: s, external: n, class: l } = t;
367
- return n ?? Re(e) ? /* @__PURE__ */ r("a", { href: e, class: v(Z.link, l), rel: "noopener noreferrer", children: s }) : /* @__PURE__ */ r(
507
+ const Qt = (t) => {
508
+ const { href: e, children: s, external: n, class: r } = t;
509
+ return n ?? nt(e) ? /* @__PURE__ */ l("a", { href: e, class: m(te.link, r), rel: "noopener noreferrer", children: s }) : /* @__PURE__ */ l(
368
510
  "a",
369
511
  {
370
512
  href: e,
371
- class: v(Z.link, l),
372
- onClick: (o) => {
373
- o.preventDefault(), Pe(e);
513
+ class: m(te.link, r),
514
+ onClick: (i) => {
515
+ i.preventDefault(), et(e);
374
516
  },
375
517
  children: s
376
518
  }
377
519
  );
378
- }, Kt = (t) => {
520
+ }, en = (t) => {
379
521
  const {
380
522
  open: e,
381
523
  title: s,
382
524
  onCancel: n,
383
- cancelLabel: l,
384
- message: a,
385
- defaultAction: o,
386
- actions: c,
387
- focusCancel: i,
525
+ cancelLabel: r,
526
+ message: o,
527
+ defaultAction: i,
528
+ actions: a,
529
+ focusCancel: c,
530
+ draggable: d = !1,
388
531
  children: h,
389
- class: d
532
+ class: u
390
533
  } = t;
391
- return /* @__PURE__ */ r(
392
- Y,
534
+ return /* @__PURE__ */ l(
535
+ re,
393
536
  {
394
537
  open: e,
395
538
  title: s,
396
539
  alert: !0,
540
+ draggable: d,
397
541
  onDismiss: n,
398
542
  onCancel: n,
399
- cancelLabel: l,
400
- message: a,
401
- defaultAction: o,
402
- actions: c,
403
- focusCancel: i,
404
- class: d,
543
+ cancelLabel: r,
544
+ message: o,
545
+ defaultAction: i,
546
+ actions: a,
547
+ focusCancel: c,
548
+ class: u,
405
549
  children: h
406
550
  }
407
551
  );
408
- }, ze = "_nav_778nl_1", Oe = "_title_778nl_6", V = {
409
- nav: ze,
410
- title: Oe
411
- }, Ut = (t) => {
412
- const { title: e, children: s, class: n } = t, l = $();
413
- return /* @__PURE__ */ m("nav", { class: v(V.nav, n), "aria-labelledby": e ? l : void 0, children: [
414
- e && /* @__PURE__ */ r("h2", { id: l, class: V.title, children: e }),
552
+ }, st = "_nav_778nl_1", rt = "_title_778nl_6", ne = {
553
+ nav: st,
554
+ title: rt
555
+ }, tn = (t) => {
556
+ const { title: e, children: s, class: n } = t, r = L();
557
+ return /* @__PURE__ */ g("nav", { class: m(ne.nav, n), "aria-labelledby": e ? r : void 0, children: [
558
+ e && /* @__PURE__ */ l("h2", { id: r, class: ne.title, children: e }),
415
559
  s
416
560
  ] });
417
- }, Fe = "_input_1j10x_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Me = {
418
- input: Fe
419
- }, Gt = (t) => {
561
+ }, lt = "_input_1j10x_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", ot = {
562
+ input: lt
563
+ }, nn = (t) => {
420
564
  const {
421
565
  label: e,
422
566
  name: s,
423
567
  min: n,
424
- max: l,
425
- step: a,
426
- value: o,
427
- placeholder: c,
428
- required: i,
429
- disabled: h,
430
- error: d,
431
- onInput: f,
432
- class: _
433
- } = t, u = $(), b = `${u}-error`;
434
- return /* @__PURE__ */ r(
435
- S,
568
+ max: r,
569
+ step: o,
570
+ value: i,
571
+ placeholder: a,
572
+ required: c,
573
+ disabled: d,
574
+ error: h,
575
+ onInput: u,
576
+ class: p
577
+ } = t, _ = L(), b = `${_}-error`;
578
+ return /* @__PURE__ */ l(
579
+ q,
436
580
  {
437
581
  label: e,
438
- for: u,
439
- required: i,
440
- error: d,
582
+ for: _,
583
+ required: c,
584
+ error: h,
441
585
  errorId: b,
442
- class: _,
443
- children: /* @__PURE__ */ r(
586
+ class: p,
587
+ children: /* @__PURE__ */ l(
444
588
  "input",
445
589
  {
446
- id: u,
447
- class: Me.input,
590
+ id: _,
591
+ class: ot.input,
448
592
  type: "number",
449
593
  name: s,
450
594
  min: n,
451
- max: l,
452
- step: a,
453
- value: o,
454
- placeholder: c,
455
- required: i,
456
- disabled: h,
457
- "aria-invalid": !!d || void 0,
458
- "aria-describedby": N(d && b),
459
- onInput: f && ((g) => f(g.target.valueAsNumber))
595
+ max: r,
596
+ step: o,
597
+ value: i,
598
+ placeholder: a,
599
+ required: c,
600
+ disabled: d,
601
+ "aria-invalid": !!h || void 0,
602
+ "aria-describedby": D(h && b),
603
+ onInput: u && ((y) => u(y.target.valueAsNumber))
460
604
  }
461
605
  )
462
606
  }
463
607
  );
464
- }, Ke = "_wrapper_16zfv_1", Ue = "_input_16zfv_5 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Ge = "_toggle_16zfv_11 _focus-ring_4u8pk_3 _disabled_4u8pk_8", F = {
465
- wrapper: Ke,
466
- input: Ue,
467
- toggle: Ge
468
- };
469
- const We = (...t) => t.filter((e, s, n) => !!e && e.trim() !== "" && n.indexOf(e) === s).join(" ").trim();
470
- const J = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
471
- const Ze = (t) => t.replace(
472
- /^([A-Z])|[\s-_]+(\w)/g,
473
- (e, s, n) => n ? n.toUpperCase() : s.toLowerCase()
474
- );
475
- const Q = (t) => {
476
- const e = Ze(t);
477
- return e.charAt(0).toUpperCase() + e.slice(1);
478
- };
479
- var Ve = {
480
- xmlns: "http://www.w3.org/2000/svg",
481
- width: 24,
482
- height: 24,
483
- viewBox: "0 0 24 24",
484
- fill: "none",
485
- stroke: "currentColor",
486
- "stroke-width": "2",
487
- "stroke-linecap": "round",
488
- "stroke-linejoin": "round"
489
- };
490
- const Je = (t) => {
491
- for (const e in t)
492
- if (e.startsWith("aria-") || e === "role" || e === "title")
493
- return !0;
494
- return !1;
495
- };
496
- const Qe = ({
497
- color: t = "currentColor",
498
- size: e = 24,
499
- strokeWidth: s = 2,
500
- absoluteStrokeWidth: n,
501
- children: l,
502
- iconNode: a,
503
- class: o = "",
504
- ...c
505
- }) => K(
506
- "svg",
507
- {
508
- ...Ve,
509
- width: String(e),
510
- height: e,
511
- stroke: t,
512
- "stroke-width": n ? Number(s) * 24 / Number(e) : s,
513
- class: ["lucide", o].join(" "),
514
- ...!l && !Je(c) && { "aria-hidden": "true" },
515
- ...c
516
- },
517
- [...a.map(([i, h]) => K(i, h)), ...re(l)]
518
- );
519
- const te = (t, e) => {
520
- const s = ({ class: n = "", className: l = "", children: a, ...o }) => K(
521
- Qe,
522
- {
523
- ...o,
524
- iconNode: e,
525
- class: We(
526
- `lucide-${J(Q(t))}`,
527
- `lucide-${J(t)}`,
528
- n,
529
- l
530
- )
531
- },
532
- a
533
- );
534
- return s.displayName = Q(t), s;
535
- };
536
- const Xe = te("eye", [
537
- [
538
- "path",
539
- {
540
- d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
541
- key: "1nclc0"
542
- }
543
- ],
544
- ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
545
- ]);
546
- const Ye = te("eye-off", [
547
- [
548
- "path",
549
- {
550
- d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
551
- key: "ct8e1f"
552
- }
553
- ],
554
- ["path", { d: "M14.084 14.158a3 3 0 0 1-4.242-4.242", key: "151rxh" }],
555
- [
556
- "path",
557
- {
558
- d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",
559
- key: "13bj9a"
560
- }
561
- ],
562
- ["path", { d: "m2 2 20 20", key: "1ooewy" }]
563
- ]), et = {
608
+ }, at = "_wrapper_16zfv_1", ct = "_input_16zfv_5 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", it = "_toggle_16zfv_11 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Y = {
609
+ wrapper: at,
610
+ input: ct,
611
+ toggle: it
612
+ }, dt = {
564
613
  current: "current-password",
565
614
  new: "new-password"
566
- }, Wt = (t) => {
615
+ }, sn = (t) => {
567
616
  const {
568
617
  label: e,
569
618
  name: s,
570
619
  purpose: n,
571
- value: l,
572
- placeholder: a,
573
- required: o,
574
- disabled: c,
575
- error: i,
576
- onInput: h,
577
- class: d
578
- } = t, f = $(), _ = `${f}-error`, u = D(!1);
579
- return /* @__PURE__ */ r(
580
- S,
620
+ value: r,
621
+ placeholder: o,
622
+ required: i,
623
+ disabled: a,
624
+ error: c,
625
+ onInput: d,
626
+ class: h
627
+ } = t, u = L(), p = `${u}-error`, _ = M(!1);
628
+ return /* @__PURE__ */ l(
629
+ q,
581
630
  {
582
631
  label: e,
583
- for: f,
584
- required: o,
585
- error: i,
586
- errorId: _,
587
- class: d,
588
- children: /* @__PURE__ */ m("div", { class: F.wrapper, children: [
589
- /* @__PURE__ */ r(
632
+ for: u,
633
+ required: i,
634
+ error: c,
635
+ errorId: p,
636
+ class: h,
637
+ children: /* @__PURE__ */ g("div", { class: Y.wrapper, children: [
638
+ /* @__PURE__ */ l(
590
639
  "input",
591
640
  {
592
- id: f,
593
- class: F.input,
594
- type: u.value ? "text" : "password",
641
+ id: u,
642
+ class: Y.input,
643
+ type: _.value ? "text" : "password",
595
644
  name: s,
596
- value: l,
597
- placeholder: a,
598
- autoComplete: et[n],
599
- required: o,
600
- disabled: c,
601
- "aria-invalid": !!i || void 0,
602
- "aria-describedby": N(i && _),
603
- onInput: h && ((b) => h(b.target.value))
645
+ value: r,
646
+ placeholder: o,
647
+ autoComplete: dt[n],
648
+ required: i,
649
+ disabled: a,
650
+ "aria-invalid": !!c || void 0,
651
+ "aria-describedby": D(c && p),
652
+ onInput: d && ((b) => d(b.target.value))
604
653
  }
605
654
  ),
606
- /* @__PURE__ */ r(
655
+ /* @__PURE__ */ l(
607
656
  "button",
608
657
  {
609
658
  type: "button",
610
- class: F.toggle,
611
- disabled: c,
612
- "aria-label": u.value ? "Hide password" : "Show password",
659
+ class: Y.toggle,
660
+ disabled: a,
661
+ "aria-label": _.value ? "Hide password" : "Show password",
613
662
  onClick: () => {
614
- u.value = !u.value;
663
+ _.value = !_.value;
615
664
  },
616
- children: u.value ? /* @__PURE__ */ r(Ye, { size: "1em" }) : /* @__PURE__ */ r(Xe, { size: "1em" })
665
+ children: _.value ? /* @__PURE__ */ l(qe, { size: "1em" }) : /* @__PURE__ */ l(Me, { size: "1em" })
617
666
  }
618
667
  )
619
668
  ] })
620
669
  }
621
670
  );
622
- }, tt = "_fieldset_lymkd_1", nt = "_legend_lymkd_6", st = "_option_lymkd_11", lt = "_input_lymkd_19 _check-input_4u8pk_32 _focus-ring_4u8pk_3", rt = "_error_lymkd_23 _field-error_4u8pk_36", E = {
623
- fieldset: tt,
624
- legend: nt,
625
- option: st,
626
- input: lt,
627
- error: rt
628
- }, Zt = (t) => {
671
+ }, ut = "_fieldset_lymkd_1", pt = "_legend_lymkd_6", _t = "_option_lymkd_11", ht = "_input_lymkd_19 _check-input_4u8pk_32 _focus-ring_4u8pk_3", ft = "_error_lymkd_23 _field-error_4u8pk_36", B = {
672
+ fieldset: ut,
673
+ legend: pt,
674
+ option: _t,
675
+ input: ht,
676
+ error: ft
677
+ }, rn = (t) => {
629
678
  const {
630
679
  legend: e,
631
680
  name: s,
632
681
  options: n,
633
- value: l,
634
- required: a,
635
- disabled: o,
636
- error: c,
637
- onChange: i,
638
- class: h
639
- } = t, d = $(), f = `${d}-error`;
640
- return /* @__PURE__ */ m(
682
+ value: r,
683
+ required: o,
684
+ disabled: i,
685
+ error: a,
686
+ onChange: c,
687
+ class: d
688
+ } = t, h = L(), u = `${h}-error`;
689
+ return /* @__PURE__ */ g(
641
690
  "fieldset",
642
691
  {
643
- class: v(E.fieldset, h),
644
- "aria-invalid": !!c || void 0,
645
- "aria-describedby": N(c && f),
692
+ class: m(B.fieldset, d),
693
+ "aria-invalid": !!a || void 0,
694
+ "aria-describedby": D(a && u),
646
695
  children: [
647
- /* @__PURE__ */ r("legend", { class: E.legend, children: e }),
648
- n.map((_) => {
649
- const u = `${d}-${_.value}`;
650
- return /* @__PURE__ */ m("div", { class: E.option, children: [
651
- /* @__PURE__ */ r(
696
+ /* @__PURE__ */ l("legend", { class: B.legend, children: e }),
697
+ n.map((p) => {
698
+ const _ = `${h}-${p.value}`;
699
+ return /* @__PURE__ */ g("div", { class: B.option, children: [
700
+ /* @__PURE__ */ l(
652
701
  "input",
653
702
  {
654
- id: u,
655
- class: E.input,
703
+ id: _,
704
+ class: B.input,
656
705
  type: "radio",
657
706
  name: s,
658
- value: _.value,
659
- checked: l === _.value,
660
- required: a,
661
- disabled: o,
662
- onChange: i && (() => i(_.value))
707
+ value: p.value,
708
+ checked: r === p.value,
709
+ required: o,
710
+ disabled: i,
711
+ onChange: c && (() => c(p.value))
663
712
  }
664
713
  ),
665
- /* @__PURE__ */ r("label", { for: u, children: _.label })
666
- ] }, _.value);
714
+ /* @__PURE__ */ l("label", { for: _, children: p.label })
715
+ ] }, p.value);
667
716
  }),
668
- c && /* @__PURE__ */ r("p", { id: f, class: E.error, role: "alert", children: c })
717
+ a && /* @__PURE__ */ l("p", { id: u, class: B.error, role: "alert", children: a })
669
718
  ]
670
719
  }
671
720
  );
672
- }, Vt = (t) => {
721
+ }, ln = (t) => {
673
722
  const { path: e, children: s } = t, n = G.value;
674
723
  if (e.endsWith("/*")) {
675
- const l = e.slice(0, -1);
676
- if (!n.startsWith(l) && n !== l.slice(0, -1))
724
+ const r = e.slice(0, -1);
725
+ if (!n.startsWith(r) && n !== r.slice(0, -1))
677
726
  return null;
678
727
  } else if (n !== e)
679
728
  return null;
680
- return /* @__PURE__ */ r(se, { children: s });
681
- }, at = "_section_4nogy_1", ot = {
682
- section: at
683
- }, Jt = (t) => {
684
- const { title: e, level: s = 2, children: n, class: l } = t, a = $(), o = `h${s}`;
685
- return /* @__PURE__ */ m("section", { class: v(ot.section, l), "aria-labelledby": a, children: [
686
- /* @__PURE__ */ r(o, { id: a, children: e }),
729
+ return /* @__PURE__ */ l(ae, { children: s });
730
+ }, gt = "_section_4nogy_1", mt = {
731
+ section: gt
732
+ }, on = (t) => {
733
+ const { title: e, level: s = 2, children: n, class: r } = t, o = L(), i = `h${s}`;
734
+ return /* @__PURE__ */ g("section", { class: m(mt.section, r), "aria-labelledby": o, children: [
735
+ /* @__PURE__ */ l(i, { id: o, children: e }),
687
736
  n
688
737
  ] });
689
- }, ct = "_select_1cxnx_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", it = {
690
- select: ct
691
- }, dt = (t) => "options" in t, Qt = (t) => {
738
+ }, bt = "_select_1cxnx_1 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", yt = {
739
+ select: bt
740
+ }, kt = (t) => "options" in t, an = (t) => {
692
741
  const {
693
742
  label: e,
694
743
  name: s,
695
744
  value: n,
696
- placeholder: l,
697
- options: a,
698
- required: o,
699
- disabled: c,
700
- error: i,
701
- onChange: h,
702
- class: d
703
- } = t, f = $(), _ = `${f}-error`;
704
- return /* @__PURE__ */ r(
705
- S,
745
+ placeholder: r,
746
+ options: o,
747
+ required: i,
748
+ disabled: a,
749
+ error: c,
750
+ onChange: d,
751
+ class: h
752
+ } = t, u = L(), p = `${u}-error`;
753
+ return /* @__PURE__ */ l(
754
+ q,
706
755
  {
707
756
  label: e,
708
- for: f,
709
- required: o,
710
- error: i,
711
- errorId: _,
712
- class: d,
713
- children: /* @__PURE__ */ m(
757
+ for: u,
758
+ required: i,
759
+ error: c,
760
+ errorId: p,
761
+ class: h,
762
+ children: /* @__PURE__ */ g(
714
763
  "select",
715
764
  {
716
- id: f,
717
- class: it.select,
765
+ id: u,
766
+ class: yt.select,
718
767
  name: s,
719
768
  value: n,
720
- required: o,
721
- disabled: c,
722
- "aria-invalid": !!i || void 0,
723
- "aria-describedby": N(i && _),
724
- onChange: h && ((u) => h(u.target.value)),
769
+ required: i,
770
+ disabled: a,
771
+ "aria-invalid": !!c || void 0,
772
+ "aria-describedby": D(c && p),
773
+ onChange: d && ((_) => d(_.target.value)),
725
774
  children: [
726
- l && /* @__PURE__ */ r("option", { value: "", disabled: !0, children: l }),
727
- a.map(
728
- (u) => dt(u) ? /* @__PURE__ */ r("optgroup", { label: u.label, children: u.options.map((b) => /* @__PURE__ */ r("option", { value: b.value, children: b.label }, b.value)) }, u.label) : /* @__PURE__ */ r("option", { value: u.value, children: u.label }, u.value)
775
+ r && /* @__PURE__ */ l("option", { value: "", disabled: !0, children: r }),
776
+ o.map(
777
+ (_) => kt(_) ? /* @__PURE__ */ l("optgroup", { label: _.label, children: _.options.map((b) => /* @__PURE__ */ l("option", { value: b.value, children: b.label }, b.value)) }, _.label) : /* @__PURE__ */ l("option", { value: _.value, children: _.label }, _.value)
729
778
  )
730
779
  ]
731
780
  }
732
781
  )
733
782
  }
734
783
  );
735
- }, ut = "_skip_xbsul_1 _focus-ring_4u8pk_3", _t = {
736
- skip: ut
737
- }, Xt = (t) => {
784
+ }, vt = "_skip_xbsul_1 _focus-ring_4u8pk_3", wt = {
785
+ skip: vt
786
+ }, cn = (t) => {
738
787
  const { target: e = "#main", label: s = "Skip to main content", class: n } = t;
739
- return /* @__PURE__ */ r("a", { href: e, class: v(_t.skip, n), children: s });
740
- }, pt = "_table_185y9_1", ht = "_caption_185y9_6", ft = "_captionHidden_185y9_12 _visually-hidden_4u8pk_42", mt = "_headerCell_185y9_16", bt = "_cell_185y9_17", vt = "_head_185y9_16", kt = "_row_185y9_41", gt = "_striped_185y9_45", yt = "_dense_185y9_53", x = {
741
- table: pt,
742
- caption: ht,
743
- captionHidden: ft,
744
- headerCell: mt,
745
- cell: bt,
746
- head: vt,
747
- row: kt,
748
- striped: gt,
749
- dense: yt
750
- }, Yt = (t) => {
788
+ return /* @__PURE__ */ l("a", { href: e, class: m(wt.skip, n), children: s });
789
+ }, xt = "_table_185y9_1", $t = "_caption_185y9_6", Ct = "_captionHidden_185y9_12 _visually-hidden_4u8pk_42", Lt = "_headerCell_185y9_16", It = "_cell_185y9_17", Nt = "_head_185y9_16", Et = "_row_185y9_41", Dt = "_striped_185y9_45", jt = "_dense_185y9_53", C = {
790
+ table: xt,
791
+ caption: $t,
792
+ captionHidden: Ct,
793
+ headerCell: Lt,
794
+ cell: It,
795
+ head: Nt,
796
+ row: Et,
797
+ striped: Dt,
798
+ dense: jt
799
+ }, dn = (t) => {
751
800
  const {
752
801
  caption: e,
753
802
  headers: s,
754
803
  data: n,
755
- rowHeader: l,
756
- striped: a,
757
- dense: o,
758
- captionHidden: c,
759
- class: i
804
+ rowHeader: r,
805
+ striped: o,
806
+ dense: i,
807
+ captionHidden: a,
808
+ class: c
760
809
  } = t;
761
- return /* @__PURE__ */ m("table", { class: v(x.table, a && x.striped, o && x.dense, i), children: [
762
- /* @__PURE__ */ r("caption", { class: v(x.caption, c && x.captionHidden), children: e }),
763
- /* @__PURE__ */ r("thead", { class: x.head, children: /* @__PURE__ */ r("tr", { children: s.map((h, d) => /* @__PURE__ */ r("th", { class: x.headerCell, scope: "col", children: h }, `${h}-${d}`)) }) }),
764
- /* @__PURE__ */ r("tbody", { children: n.map((h, d) => /* @__PURE__ */ r("tr", { class: x.row, children: h.map(
765
- (f, _) => l && _ === 0 ? /* @__PURE__ */ r("th", { class: x.headerCell, scope: "row", children: f }, `${s[_]}-${d}-${_}`) : /* @__PURE__ */ r("td", { class: x.cell, children: f }, `${s[_]}-${d}-${_}`)
766
- ) }, d)) })
810
+ return /* @__PURE__ */ g("table", { class: m(C.table, o && C.striped, i && C.dense, c), children: [
811
+ /* @__PURE__ */ l("caption", { class: m(C.caption, a && C.captionHidden), children: e }),
812
+ /* @__PURE__ */ l("thead", { class: C.head, children: /* @__PURE__ */ l("tr", { children: s.map((d, h) => /* @__PURE__ */ l("th", { class: C.headerCell, scope: "col", children: d }, `${d}-${h}`)) }) }),
813
+ /* @__PURE__ */ l("tbody", { children: n.map((d, h) => /* @__PURE__ */ l("tr", { class: C.row, children: d.map(
814
+ (u, p) => r && p === 0 ? /* @__PURE__ */ l("th", { class: C.headerCell, scope: "row", children: u }, `${s[p]}-${h}-${p}`) : /* @__PURE__ */ l("td", { class: C.cell, children: u }, `${s[p]}-${h}-${p}`)
815
+ ) }, h)) })
767
816
  ] });
768
- }, wt = "_hidden_19nib_1 _visually-hidden_4u8pk_42", xt = {
769
- hidden: wt
770
- }, $t = (t) => {
817
+ }, Pt = "_hidden_19nib_1 _visually-hidden_4u8pk_42", St = {
818
+ hidden: Pt
819
+ }, Bt = (t) => {
771
820
  const { children: e } = t;
772
- return /* @__PURE__ */ r("span", { class: xt.hidden, children: e });
773
- }, Ct = "_wrapper_1kyv1_1", It = "_textarea_1kyv1_6 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Lt = "_counter_1kyv1_11", M = {
774
- wrapper: Ct,
775
- textarea: It,
776
- counter: Lt
777
- }, X = [75, 90, 100], Nt = 10;
778
- function jt(t) {
779
- for (let e = X.length - 1; e >= 0; e--) {
780
- const s = X[e];
821
+ return /* @__PURE__ */ l("span", { class: St.hidden, children: e });
822
+ }, Ht = "_wrapper_1kyv1_1", At = "_textarea_1kyv1_6 _text-input_4u8pk_13 _focus-ring_4u8pk_3 _disabled_4u8pk_8", Mt = "_counter_1kyv1_11", U = {
823
+ wrapper: Ht,
824
+ textarea: At,
825
+ counter: Mt
826
+ }, se = [75, 90, 100], qt = 10;
827
+ function Tt(t) {
828
+ for (let e = se.length - 1; e >= 0; e--) {
829
+ const s = se[e];
781
830
  if (s !== void 0 && t >= s)
782
831
  return s;
783
832
  }
784
833
  return 0;
785
834
  }
786
- const en = (t) => {
835
+ const un = (t) => {
787
836
  const {
788
837
  label: e,
789
838
  name: s,
790
839
  maxChars: n,
791
- value: l,
792
- placeholder: a,
793
- required: o,
794
- disabled: c,
795
- error: i,
796
- onInput: h,
797
- class: d
798
- } = t, f = $(), _ = `${f}-error`, u = `${f}-counter`, b = D(l?.length ?? 0), g = D(""), C = D(0), I = D(!1);
799
- return /* @__PURE__ */ r(
800
- S,
840
+ value: r,
841
+ placeholder: o,
842
+ required: i,
843
+ disabled: a,
844
+ error: c,
845
+ onInput: d,
846
+ class: h
847
+ } = t, u = L(), p = `${u}-error`, _ = `${u}-counter`, b = M(r?.length ?? 0), y = M(""), v = M(0), w = M(!1);
848
+ return /* @__PURE__ */ l(
849
+ q,
801
850
  {
802
851
  label: e,
803
- for: f,
804
- required: o,
805
- error: i,
806
- errorId: _,
807
- class: d,
808
- children: /* @__PURE__ */ m("div", { class: M.wrapper, children: [
809
- /* @__PURE__ */ r(
852
+ for: u,
853
+ required: i,
854
+ error: c,
855
+ errorId: p,
856
+ class: h,
857
+ children: /* @__PURE__ */ g("div", { class: U.wrapper, children: [
858
+ /* @__PURE__ */ l(
810
859
  "textarea",
811
860
  {
812
- id: f,
813
- class: M.textarea,
861
+ id: u,
862
+ class: U.textarea,
814
863
  name: s,
815
864
  maxLength: n,
816
- placeholder: a,
817
- required: o,
818
- disabled: c,
819
- "aria-invalid": !!i || void 0,
820
- "aria-describedby": N(i && _, u),
821
- onInput: (q) => {
822
- const p = q.target.value;
823
- b.value = p.length;
824
- const k = n - p.length, L = p.length / n * 100, j = jt(L), w = !I.value && k <= Nt && k > 0;
825
- (j > C.value || w) && (g.value = `${k} character${k === 1 ? "" : "s"} remaining`, C.value = j, w && (I.value = !0)), h?.(p);
865
+ placeholder: o,
866
+ required: i,
867
+ disabled: a,
868
+ "aria-invalid": !!c || void 0,
869
+ "aria-describedby": D(c && p, _),
870
+ onInput: (N) => {
871
+ const x = N.target.value;
872
+ b.value = x.length;
873
+ const I = n - x.length, j = x.length / n * 100, P = Tt(j), f = !w.value && I <= qt && I > 0;
874
+ (P > v.value || f) && (y.value = `${I} character${I === 1 ? "" : "s"} remaining`, v.value = P, f && (w.value = !0)), d?.(x);
826
875
  },
827
- children: l
876
+ children: r
828
877
  }
829
878
  ),
830
- /* @__PURE__ */ m("span", { id: u, class: M.counter, children: [
879
+ /* @__PURE__ */ g("span", { id: _, class: U.counter, children: [
831
880
  b,
832
881
  " / ",
833
882
  n
834
883
  ] }),
835
- /* @__PURE__ */ r($t, { children: /* @__PURE__ */ r("span", { "aria-live": "polite", children: g }) })
884
+ /* @__PURE__ */ l(Bt, { children: /* @__PURE__ */ l("span", { "aria-live": "polite", children: y }) })
836
885
  ] })
837
886
  }
838
887
  );
839
- }, Et = "_theme_1x47p_11", Dt = {
840
- theme: Et
841
- }, tn = {
888
+ }, zt = "_theme_1x47p_11", Rt = {
889
+ theme: zt
890
+ }, pn = {
842
891
  blue: "aui-blue",
843
892
  purple: "aui-purple",
844
893
  teal: "aui-teal",
845
894
  red: "aui-red",
846
895
  orange: "aui-orange",
847
896
  yellow: "aui-yellow"
848
- }, nn = (t) => {
897
+ }, _n = (t) => {
849
898
  const { children: e, class: s } = t;
850
- return /* @__PURE__ */ r("div", { class: v(Dt.theme, s), children: e });
851
- }, St = U(document.title);
852
- le(() => {
853
- document.title = St.value;
899
+ return /* @__PURE__ */ l("div", { class: m(Rt.theme, s), children: e });
900
+ }, Ft = V(document.title);
901
+ ue(() => {
902
+ document.title = Ft.value;
854
903
  });
855
904
  export {
856
- W as Button,
857
- Pt as Card,
858
- Tt as Checkbox,
859
- Rt as Dialog,
860
- zt as DownloadLink,
861
- Ot as Form,
862
- Ft as Input,
863
- Mt as Link,
864
- Kt as Modal,
865
- Ut as Nav,
866
- Gt as NumberInput,
867
- tn as Palette,
868
- Wt as PasswordInput,
869
- Zt as RadioGroup,
870
- Vt as Route,
871
- Jt as Section,
872
- Qt as Select,
873
- Xt as SkipLink,
874
- Yt as Table,
875
- en as Textarea,
876
- nn as Theme,
877
- $t as VisuallyHidden,
878
- v as cx,
879
- ee as hash,
905
+ J as Button,
906
+ Kt as Card,
907
+ Vt as Checkbox,
908
+ Wt as Dialog,
909
+ Gt as DownloadLink,
910
+ Zt as Form,
911
+ Jt as Input,
912
+ Qt as Link,
913
+ en as Modal,
914
+ tn as Nav,
915
+ nn as NumberInput,
916
+ pn as Palette,
917
+ sn as PasswordInput,
918
+ rn as RadioGroup,
919
+ ln as Route,
920
+ on as Section,
921
+ an as Select,
922
+ cn as SkipLink,
923
+ dn as Table,
924
+ un as Textarea,
925
+ _n as Theme,
926
+ Bt as VisuallyHidden,
927
+ m as cx,
928
+ le as hash,
880
929
  G as location,
881
- Pe as navigate,
882
- St as title
930
+ et as navigate,
931
+ Ft as title
883
932
  };