@tempots/beatui 0.39.0 → 0.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +11 -11
  2. package/dist/{2019-1S9vgvv2.cjs → 2019-BFDr925O.cjs} +1 -1
  3. package/dist/{2019-DPD_eCKE.js → 2019-DnG5Y5sm.js} +2 -2
  4. package/dist/{2020-aLm9VmDL.js → 2020-D0-tZTo7.js} +2 -2
  5. package/dist/{2020-CGrbEEmD.cjs → 2020-gUs7l1CJ.cjs} +1 -1
  6. package/dist/{ar-B0vT_MPe.cjs → ar-BLgxAefV.cjs} +1 -1
  7. package/dist/{ar-CbM09z5P.js → ar-DpQo8C31.js} +1 -1
  8. package/dist/auth/index.cjs.js +1 -1
  9. package/dist/auth/index.es.js +54 -49
  10. package/dist/beatui.css +216 -129
  11. package/dist/beatui.tailwind.css +216 -129
  12. package/dist/{de-tK36cL_u.cjs → de-Bv-qs--J.cjs} +1 -1
  13. package/dist/{de-Dd907tZQ.js → de-D1MQ4wen.js} +1 -1
  14. package/dist/{es-K35LRZa-.cjs → es-3r8Ko5Dn.cjs} +1 -1
  15. package/dist/{es-BkJxjMdG.js → es-DwPjonS7.js} +1 -1
  16. package/dist/{fa-BBikwwku.cjs → fa-Qw6uVZeX.cjs} +1 -1
  17. package/dist/{fa-DBTUBsw_.js → fa-fxf_lWjh.js} +1 -1
  18. package/dist/{fr-Fmupo556.js → fr-BDDsMHRZ.js} +1 -1
  19. package/dist/{fr-DMtXrrnJ.cjs → fr-pVhG9qik.cjs} +1 -1
  20. package/dist/{he-DkI64oaY.js → he-B4deK_wE.js} +1 -1
  21. package/dist/{he-on3Ivp8g.cjs → he-D-fvzfe1.cjs} +1 -1
  22. package/dist/{hi-GdD5MihT.js → hi-CxQT8nRD.js} +1 -1
  23. package/dist/{hi-CNFV8ITE.cjs → hi-DKgxHzmH.cjs} +1 -1
  24. package/dist/{index-BK8t6gqu.js → index-Acyxme63.js} +680 -677
  25. package/dist/{index-e8oQ-k0x.cjs → index-BZ2AX5sk.cjs} +4 -4
  26. package/dist/{index-BfFlhmAq.js → index-BwEJlbG2.js} +1 -1
  27. package/dist/{index-DjShJtXp.js → index-CAeOFdez.js} +1 -1
  28. package/dist/{index-BI5w0jSz.js → index-CBT2SLat.js} +224 -223
  29. package/dist/{index-BkQ7xHgi.js → index-CWq36UAJ.js} +770 -757
  30. package/dist/{index-Bv2gn_kV.cjs → index-ClFVnBUS.cjs} +3 -3
  31. package/dist/{index-LUItEwlw.js → index-Clw0AwwJ.js} +1 -1
  32. package/dist/{index-wdi93sK4.cjs → index-DRDJFYRb.cjs} +1 -1
  33. package/dist/{index-CKyH3jwP.cjs → index-KPHFBjQB.cjs} +1 -1
  34. package/dist/{index-BA93M8Ux.cjs → index-Lj0QS2po.cjs} +1 -1
  35. package/dist/{index-CPBlySmE.cjs → index-nVVPqgLq.cjs} +12 -12
  36. package/dist/index.cjs.js +4 -4
  37. package/dist/index.es.js +2200 -2181
  38. package/dist/{it-Bpnfd60V.js → it-6QS5PWzQ.js} +1 -1
  39. package/dist/{it-BDOzBRkQ.cjs → it-Ck0r9TO3.cjs} +1 -1
  40. package/dist/{ja-SjlGNgs9.js → ja-D2VvVGEN.js} +1 -1
  41. package/dist/{ja-N-7c7zD7.cjs → ja-D6b9suYB.cjs} +1 -1
  42. package/dist/json-schema/index.cjs.js +1 -1
  43. package/dist/json-schema/index.es.js +1 -1
  44. package/dist/{ko-CH69ZNts.js → ko-CP_WopWz.js} +1 -1
  45. package/dist/{ko-BBeTXIlY.cjs → ko-CzvM2Bjv.cjs} +1 -1
  46. package/dist/markdown/index.cjs.js +1 -1
  47. package/dist/markdown/index.es.js +1 -1
  48. package/dist/modal-BmSRMdY9.cjs +1 -0
  49. package/dist/{modal-BD76Rve3.js → modal-DMc-R2VT.js} +234 -209
  50. package/dist/{nl-DnvMlW8v.js → nl-DZ4dFolZ.js} +1 -1
  51. package/dist/{nl-C2C9QDH2.cjs → nl-_9vJc8JD.cjs} +1 -1
  52. package/dist/{notice-CQZseCQs.js → notice-B5Yn_3Ay.js} +205 -195
  53. package/dist/notice-D3P0lewM.cjs +2 -0
  54. package/dist/{pl-CBEX2qN1.js → pl-BE81iFSF.js} +1 -1
  55. package/dist/{pl-sNBCzEUd.cjs → pl-DKcVCojx.cjs} +1 -1
  56. package/dist/prosemirror/index.cjs.js +1 -1
  57. package/dist/prosemirror/index.es.js +1 -1
  58. package/dist/{pt-ByFqFAdQ.js → pt-BcCdXUA2.js} +1 -1
  59. package/dist/{pt-Bvxg9VEA.cjs → pt-DNVS1_MF.cjs} +1 -1
  60. package/dist/{ru-6d5JfoDw.js → ru-Bo_jc3s1.js} +1 -1
  61. package/dist/{ru-CPAdsn4m.cjs → ru-DTn9Rssv.cjs} +1 -1
  62. package/dist/{toolbar-Cl_TAa3r.js → toolbar-DhD5GmMa.js} +1 -1
  63. package/dist/{toolbar-Dw2VQD9y.cjs → toolbar-jPGzdJGi.cjs} +1 -1
  64. package/dist/{tr-IKZtCQQR.cjs → tr-BhTJYHQ3.cjs} +1 -1
  65. package/dist/{tr-gv4vJfm8.js → tr-CBw3FlOg.js} +1 -1
  66. package/dist/{translations-DXLmnUiB.js → translations-B0HuWYIz.js} +1 -1
  67. package/dist/{translations-CK426qyd.cjs → translations-B7_3phoA.cjs} +1 -1
  68. package/dist/translations-C21osktO.cjs +1 -0
  69. package/dist/{translations-djDSPqdb.js → translations-D-fMB_IO.js} +212 -183
  70. package/dist/types/components/form/controller/color-controller.d.ts +1 -1
  71. package/dist/types/components/form/input/color-input.d.ts +2 -5
  72. package/dist/types/components/form/input/color-swatch-input.d.ts +9 -0
  73. package/dist/types/components/form/input/index.d.ts +1 -0
  74. package/dist/types/components/form/input/input-container.d.ts +7 -0
  75. package/dist/types/components/misc/notification-provider.d.ts +3 -3
  76. package/dist/types/utils/{color-validation.d.ts → color.d.ts} +13 -0
  77. package/dist/types/utils/index.d.ts +1 -1
  78. package/dist/types/utils/use-animated-toggle.d.ts +17 -4
  79. package/dist/{ur-Bgq_2yjr.cjs → ur-BjuXyU8Z.cjs} +1 -1
  80. package/dist/{ur-Bo6bjEBS.js → ur-BsXnPgxd.js} +1 -1
  81. package/dist/utils-BOEQMy82.js +2512 -0
  82. package/dist/utils-DH-SYrQg.cjs +1 -0
  83. package/dist/{vi-BrUQnj-8.cjs → vi-CvsTHMkK.cjs} +1 -1
  84. package/dist/{vi-xDLJ3TIx.js → vi-D1rLo6MX.js} +1 -1
  85. package/dist/{zh-BivWxJJh.js → zh-BoLsjdfz.js} +1 -1
  86. package/dist/{zh-BqH1Cioq.cjs → zh-zh1FJ4Ud.cjs} +1 -1
  87. package/package.json +4 -3
  88. package/dist/modal-DQycMZ8_.cjs +0 -1
  89. package/dist/notice-CFoc4PJe.cjs +0 -2
  90. package/dist/translations-DJR65Jii.cjs +0 -1
  91. package/dist/utils-Bsrfm-0d.cjs +0 -1
  92. package/dist/utils-Bw911Eo4.js +0 -2418
@@ -1,2418 +0,0 @@
1
- import { Use as H, Value as u, prop as et, html as I, attr as a, on as C, WithElement as it, OnDispose as W, aria as N, bind as _t, computedOf as L, style as dt, When as E, NotEmpty as Gt, Fragment as V, ForEach as ft, svg as At, svgAttr as ht, Empty as T, emitValue as P, coalesce as Qt, Ensure as Jt, OneOfType as Kt, Repeat as Pt, signal as Ft, input as K, emitValueAsNullableDate as te, emitValueAsNullableDateTime as ee, emitValueAsNumber as G, emit as ne, Task as Bt } from "@tempots/dom";
2
- import { f as se } from "./colors-WfmhQ5e1.js";
3
- import { g as re } from "./timer-DzWb416P.js";
4
- import { ElementRect as jt, AutoSelect as le } from "@tempots/ui";
5
- import { a as X, b as O, f as ae, I as z, C as j, d as yt, T as oe, L as ce, c as Vt, e as ie, B as gt } from "./translations-djDSPqdb.js";
6
- import { C as $t, m as ue, d as pe, I as Ht, E as de, P as fe, S as ct, s as me, e as bt, O as lt, f as Lt } from "./notice-CQZseCQs.js";
7
- class he extends Error {
8
- constructor(e = "Missing implementation") {
9
- super(e), this.name = "MissingImplementationError";
10
- }
11
- }
12
- const un = (t) => ge(t).split("_").join(" "), ge = (t) => (t = t.replace(/::/g, "/"), t = t.replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2"), t = t.replace(/([a-z\d])([A-Z])/g, "$1_$2"), t = t.replace(/-/g, "_"), t.toLowerCase()), pn = (t) => t.substring(0, 1).toUpperCase() + t.substring(1), be = (t) => {
13
- if (typeof Buffer < "u")
14
- return Buffer.from(t, "base64").toString("utf8");
15
- if (typeof atob < "u")
16
- return atob(t);
17
- throw new he(
18
- "No implementation found for base64 decoding"
19
- );
20
- };
21
- function Et({
22
- onChange: t,
23
- value: e,
24
- accept: r = "*/*",
25
- enableClick: n = !0,
26
- content: s,
27
- disabled: c = !1,
28
- allowMultiple: l
29
- }) {
30
- return H(X, (i) => {
31
- const o = u.deriveProp(e ?? []), p = et(!1), m = (g) => {
32
- g.preventDefault(), g.stopPropagation(), p.value = !0;
33
- }, f = (g) => {
34
- g.preventDefault(), g.stopPropagation(), (!g.currentTarget || !g.currentTarget.contains(g.relatedTarget)) && (p.value = !1);
35
- }, v = (g) => {
36
- g.preventDefault(), g.stopPropagation(), p.value = !1;
37
- const b = Array.from(g.dataTransfer?.files || []);
38
- b.length > 0 && (o.value = b, t(b));
39
- }, d = (g) => {
40
- u.get(n) && g.currentTarget.querySelector(
41
- 'input[type="file"]'
42
- )?.click();
43
- };
44
- let x = null;
45
- const h = () => {
46
- if (x == null) return;
47
- const g = Array.from(x.files ?? []);
48
- g.length > 0 && (o.value = g, t(g)), x.value = "";
49
- }, y = (g) => {
50
- u.get(n) && (g.key === "Enter" || g.key === " ") && (g.preventDefault(), d(g));
51
- };
52
- return I.div(
53
- a.role("button"),
54
- a.tabindex(
55
- u.map(n, (g) => g ? 0 : -1)
56
- ),
57
- a.style("position: relative;"),
58
- C.dragover(m),
59
- C.dragleave(f),
60
- C.drop(v),
61
- C.click(d),
62
- C.keydown(y),
63
- // Hidden file input
64
- I.input(
65
- a.type("file"),
66
- a.disabled(c),
67
- a.accept(r),
68
- a.multiple(l),
69
- a.style(
70
- "position: absolute; left: -9999px; opacity: 0; pointer-events: none;"
71
- ),
72
- C.change(h),
73
- it((g) => (x = g, W(
74
- o.on((b) => {
75
- const D = globalThis.DataTransfer;
76
- if (D != null) {
77
- const k = new D();
78
- b.forEach((_) => k.items.add(_)), g.files = k.files;
79
- }
80
- })
81
- )))
82
- ),
83
- // Screen reader instructions
84
- N.label(_t(i.$.dropZoneInstructions)(n)),
85
- // Content
86
- s({ files: o, clear: () => o.value = [], change: o.set })
87
- );
88
- });
89
- }
90
- function ve(t, e) {
91
- return t.length === e.length && t.every((r, n) => r === e[n]);
92
- }
93
- function xe(t, e) {
94
- const r = ["bc-segmented-control", `bc-segmented-control--size-${t}`];
95
- return e && r.push("bc-segmented-control--disabled"), r.join(" ");
96
- }
97
- function dn({
98
- options: t,
99
- value: e,
100
- onChange: r,
101
- size: n = "md",
102
- disabled: s = !1
103
- }, ...c) {
104
- const l = se(t).map(([i, o]) => ({
105
- key: i,
106
- label: o
107
- }));
108
- return it(() => {
109
- const i = Object.fromEntries(
110
- l.map((p, m) => [p.key, m])
111
- ), o = et(
112
- l.map(() => ({ left: 0, width: 0 })),
113
- ve
114
- );
115
- return I.div(
116
- a.class(
117
- L(
118
- n,
119
- s
120
- )(
121
- (p, m) => xe(p ?? "md", m ?? !1)
122
- )
123
- ),
124
- I.div(
125
- a.class("bc-segmented-control__container"),
126
- I.div(
127
- a.class("bc-segmented-control__indicator"),
128
- dt.width(
129
- L(
130
- e,
131
- o
132
- )((p, m) => {
133
- const { width: f } = m[i[p] ?? 0];
134
- return `${f}px`;
135
- })
136
- ),
137
- dt.left(
138
- L(
139
- e,
140
- o
141
- )((p, m) => {
142
- const { left: f } = m[i[p] ?? 0];
143
- return `${f}px`;
144
- })
145
- )
146
- ),
147
- // clickable buttons
148
- l.map(({ label: p, key: m }, f) => I.button(
149
- a.type("button"),
150
- C.click((v) => {
151
- v.preventDefault(), u.get(s) || r?.(m);
152
- }),
153
- a.disabled(s),
154
- a.class("bc-segmented-control__segment"),
155
- a.class(
156
- u.map(e, (v) => v === m ? "bc-segmented-control__segment--active" : "bc-segmented-control__segment--inactive")
157
- ),
158
- jt((v) => {
159
- function d() {
160
- o.update((h) => {
161
- const y = [...h];
162
- return y[f] = {
163
- width: v.value.width,
164
- left: v.value.localLeft
165
- }, y;
166
- });
167
- }
168
- const x = re(d);
169
- return W(x, v.on(d));
170
- }),
171
- p
172
- ))
173
- ),
174
- ...c
175
- );
176
- });
177
- }
178
- function we(t) {
179
- const e = t.type.toLowerCase();
180
- return e.startsWith("image/") && (e.includes("jpeg") || e.includes("jpg") || e.includes("png") || e.includes("gif") || e.includes("webp") || e.includes("svg"));
181
- }
182
- function _e(t) {
183
- const e = t.type.toLowerCase();
184
- return e.startsWith("image/") ? "vscode-icons:file-type-image" : e.startsWith("video/") ? "vscode-icons:file-type-video" : e.startsWith("audio/") ? "vscode-icons:file-type-audio" : e.includes("pdf") ? "vscode-icons:file-type-pdf2" : e.includes("word") || e.includes("document") ? "vscode-icons:file-type-word" : e.includes("excel") || e.includes("spreadsheet") ? "vscode-icons:file-type-excel" : e.includes("powerpoint") || e.includes("presentation") ? "vscode-icons:file-type-powerpoint" : e.includes("zip") || e.includes("archive") ? "vscode-icons:file-type-zip" : e.includes("text") ? "vscode-icons:file-type-text" : e.includes("json") ? "vscode-icons:file-type-json-official" : e.includes("csv") ? "vscode-icons:file-type-csv" : e.includes("xml") ? "vscode-icons:file-type-xml" : e.includes("yaml") ? "vscode-icons:file-type-yaml-official" : "vscode-icons:file-type-binary";
185
- }
186
- function Ut(t) {
187
- return E(
188
- t.map(we),
189
- () => {
190
- const e = et(null);
191
- return t.on((r) => {
192
- e.value && URL.revokeObjectURL(e.value);
193
- const n = URL.createObjectURL(r);
194
- e.value = n;
195
- }), I.div(
196
- a.class("bc-file-input__thumbnail-container"),
197
- I.img(
198
- a.src(e),
199
- a.alt(t.map((r) => r.name)),
200
- a.class("bc-file-input__thumbnail"),
201
- W(() => {
202
- e.value && URL.revokeObjectURL(e.value);
203
- })
204
- )
205
- );
206
- },
207
- () => z({ icon: t.map(_e) })
208
- );
209
- }
210
- const ye = (t, ...e) => {
211
- const {
212
- value: r = et([]),
213
- accept: n = "*/*",
214
- maxFiles: s,
215
- maxFileSize: c,
216
- onChange: l,
217
- onBlur: i,
218
- disabled: o,
219
- hasError: p,
220
- mode: m = "default",
221
- showFileList: f = !0,
222
- ...v
223
- } = t, d = r, x = u.map(m, (k) => k === "compact"), h = (k) => {
224
- let _ = k;
225
- if (s != null) {
226
- const w = u.get(s);
227
- _ = _.slice(0, w);
228
- }
229
- if (c) {
230
- const w = u.get(c);
231
- _ = _.filter(($) => $.size <= w);
232
- }
233
- l?.(_);
234
- }, y = (k) => {
235
- const w = d.value.filter(($, M) => M !== k);
236
- l?.(w);
237
- }, g = () => {
238
- l?.([]);
239
- }, b = ({
240
- files: k,
241
- clear: _,
242
- change: w
243
- }) => H(
244
- X,
245
- ($) => I.div(
246
- a.class("bc-file-input__drop-zone"),
247
- I.div(
248
- a.class(
249
- "bc-file-input__drop-zone-content bc-file-input__drop-zone-content--empty"
250
- ),
251
- z({ icon: "mdi:cloud-upload-outline", size: "xl" }),
252
- I.div(
253
- a.class("bc-file-input__drop-zone-text"),
254
- _t($.$.filesInputInstructions)(
255
- s,
256
- c,
257
- $.$.fileSizeUnits.value
258
- )
259
- )
260
- )
261
- )
262
- ), D = ({
263
- files: k
264
- }) => H(
265
- X,
266
- (_) => I.div(
267
- a.class("bc-file-input__compact-input"),
268
- E(
269
- k.map((w) => w.length > 0),
270
- () => I.span(
271
- a.class("bc-file-input__compact-value"),
272
- ft(
273
- k,
274
- (w) => I.span(
275
- a.class("bc-file-input__compact-value-item"),
276
- Ut(w),
277
- I.span(
278
- a.class("bc-file-input__compact-value-item-name"),
279
- w.$.name
280
- )
281
- )
282
- )
283
- ),
284
- () => I.span(
285
- a.class("bc-file-input__compact-placeholder"),
286
- z({ icon: "mdi:cloud-upload-outline", size: "sm" }),
287
- " ",
288
- _t(_.$.filesInputInstructions)(
289
- s,
290
- c,
291
- _.$.fileSizeUnits.value
292
- )
293
- )
294
- )
295
- )
296
- );
297
- return H(
298
- X,
299
- (k) => O(
300
- {
301
- baseContainer: u.map(x, (_) => !_),
302
- disabled: o,
303
- hasError: p,
304
- after: E(
305
- x,
306
- () => E(
307
- d.map(({ length: _ }) => _ > 0),
308
- () => $t(
309
- {
310
- size: "sm",
311
- label: k.$.clearAllFiles,
312
- disabled: o,
313
- onClick: g
314
- },
315
- a.class("bc-file-input__compact-clear")
316
- )
317
- )
318
- ),
319
- ...v,
320
- input: E(
321
- x,
322
- () => I.div(
323
- a.class("bc-file-input bc-file-input--compact"),
324
- Et({
325
- value: d,
326
- accept: n,
327
- enableClick: !0,
328
- allowMultiple: u.map(s ?? 1 / 0, (_) => _ > 1),
329
- disabled: o,
330
- onChange: h,
331
- content: D
332
- })
333
- ),
334
- () => I.div(
335
- a.class("bc-file-input"),
336
- Et({
337
- value: d,
338
- accept: n,
339
- enableClick: !0,
340
- allowMultiple: u.map(s ?? 1 / 0, (_) => _ > 1),
341
- disabled: o,
342
- onChange: h,
343
- content: b
344
- }),
345
- E(
346
- f,
347
- () => Gt(
348
- d,
349
- () => V(
350
- I.div(
351
- a.class("bc-file-input__file-list"),
352
- ft(d, (_, w) => {
353
- const $ = w.index;
354
- return I.div(
355
- a.class("bc-file-input__file-item"),
356
- I.div(
357
- a.class("bc-file-input__file-icon"),
358
- Ut(_)
359
- ),
360
- I.div(
361
- a.class("bc-file-input__file-info"),
362
- I.div(
363
- a.class("bc-file-input__file-name"),
364
- a.title(_.$.name),
365
- _.$.name
366
- ),
367
- I.div(
368
- a.class("bc-file-input__file-meta"),
369
- L(
370
- _.$.size,
371
- k.$.fileSizeUnits
372
- )(
373
- (M, A) => ae(M, { units: A })
374
- ),
375
- " • ",
376
- L(
377
- _.$.type,
378
- k.$.unknownType
379
- )((M, A) => M || A)
380
- )
381
- ),
382
- $t(
383
- {
384
- size: "sm",
385
- label: k.$.removeFile,
386
- disabled: o,
387
- onClick: () => y($)
388
- },
389
- a.class("bc-file-input__remove-button")
390
- )
391
- );
392
- })
393
- ),
394
- E(
395
- d.map(({ length: _ }) => _ > 1),
396
- () => I.div(
397
- a.class(
398
- "bc-file-input__clear-all-button-container"
399
- ),
400
- I.button(
401
- a.type("button"),
402
- a.class("bc-file-input__clear-all-button"),
403
- a.disabled(o),
404
- k.$.clearAllFiles,
405
- C.click((_) => {
406
- _.preventDefault(), _.stopPropagation(), g();
407
- })
408
- )
409
- )
410
- )
411
- )
412
- )
413
- )
414
- )
415
- )
416
- },
417
- ...e
418
- )
419
- );
420
- };
421
- async function $e(t) {
422
- return new Promise((e, r) => {
423
- const n = new FileReader();
424
- n.readAsDataURL(t), n.onload = () => {
425
- const s = n.result;
426
- e(s.split(",")[1]);
427
- }, n.onerror = (s) => r(s);
428
- });
429
- }
430
- function ke(t) {
431
- return Promise.all(t.map($e));
432
- }
433
- function Ie(t) {
434
- if (t.length >= 4) {
435
- if (t[0] === 137 && t[1] === 80 && t[2] === 78 && t[3] === 71)
436
- return "image/png";
437
- if (t[0] === 255 && t[1] === 216) return "image/jpeg";
438
- if (t[0] === 71 && t[1] === 73 && t[2] === 70)
439
- return "image/gif";
440
- if (t[0] === 82 && t[1] === 73 && t[2] === 70 && t[3] === 70 && t.length >= 12 && t[8] === 87 && t[9] === 69 && t[10] === 66 && t[11] === 80)
441
- return "image/webp";
442
- }
443
- try {
444
- if (new TextDecoder("utf-8").decode(t.slice(0, 256)).includes("<svg")) return "image/svg+xml";
445
- } catch {
446
- }
447
- return "application/octet-stream";
448
- }
449
- function Ce(t) {
450
- const e = be(t ?? ""), r = e.length, n = new Uint8Array(r);
451
- for (let s = 0; s < r; s++) n[s] = e.charCodeAt(s);
452
- return n;
453
- }
454
- function Me(t) {
455
- const {
456
- value: e,
457
- onChange: r,
458
- onInput: n,
459
- ...s
460
- } = t, c = /* @__PURE__ */ new Map(), l = u.toSignal(e).map((m) => m.map((f, v) => {
461
- const d = c.get(f), x = Ce(f ?? ""), h = d?.type || Ie(x), y = d?.name ?? `file-${v}`, g = x.buffer.slice(
462
- x.byteOffset,
463
- x.byteOffset + x.byteLength
464
- ), b = new Blob([g], { type: h });
465
- return new File([b], y, { type: h });
466
- })), i = (m) => (f) => {
467
- m && ke(f).then((v) => {
468
- for (const [d, x] of v.entries())
469
- c.set(x, { name: f[d].name, type: f[d].type });
470
- m(v);
471
- });
472
- }, o = i(r), p = i(n);
473
- return ye({
474
- ...s,
475
- value: l,
476
- onChange: o,
477
- onInput: p
478
- });
479
- }
480
- function fn(t) {
481
- const {
482
- value: e,
483
- onInput: r,
484
- onChange: n,
485
- ...s
486
- } = t;
487
- return Me({
488
- ...s,
489
- maxFiles: 1,
490
- value: u.map(e, (c) => c == null ? [] : [c]),
491
- onChange: (c) => {
492
- n?.(c[0]);
493
- },
494
- onInput: (c) => {
495
- r?.(c[0]);
496
- }
497
- });
498
- }
499
- function kt(t) {
500
- const e = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
501
- return e ? [parseInt(e[1], 16), parseInt(e[2], 16), parseInt(e[3], 16)] : [0, 0, 0];
502
- }
503
- function It(t, e, r) {
504
- const n = (s) => s.toString(16).padStart(2, "0");
505
- return `#${n(Math.max(0, Math.min(255, t)))}${n(
506
- Math.max(0, Math.min(255, e))
507
- )}${n(Math.max(0, Math.min(255, r)))}`;
508
- }
509
- function De(t) {
510
- if (!t) return [0, 0, 0, 1];
511
- const r = t.trim().match(
512
- /^#?([a-fA-F0-9]{3,4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$/
513
- );
514
- if (r) {
515
- const f = r[1];
516
- if (f.length === 8) {
517
- const v = parseInt(f.slice(0, 2), 16), d = parseInt(f.slice(2, 4), 16), x = parseInt(f.slice(4, 6), 16), h = parseInt(f.slice(6, 8), 16) / 255;
518
- return [v, d, x, h];
519
- }
520
- if (f.length === 6)
521
- return [
522
- parseInt(f.slice(0, 2), 16),
523
- parseInt(f.slice(2, 4), 16),
524
- parseInt(f.slice(4, 6), 16),
525
- 1
526
- ];
527
- if (f.length === 4) {
528
- const v = parseInt(f[0] + f[0], 16), d = parseInt(f[1] + f[1], 16), x = parseInt(f[2] + f[2], 16), h = parseInt(f[3] + f[3], 16) / 255;
529
- return [v, d, x, h];
530
- }
531
- if (f.length === 3) {
532
- const v = parseInt(f[0] + f[0], 16), d = parseInt(f[1] + f[1], 16), x = parseInt(f[2] + f[2], 16);
533
- return [v, d, x, 1];
534
- }
535
- }
536
- const n = t.match(
537
- /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0|1|0?\.\d+)\s*\)$/i
538
- );
539
- if (n)
540
- return [
541
- parseInt(n[1], 10),
542
- parseInt(n[2], 10),
543
- parseInt(n[3], 10),
544
- parseFloat(n[4])
545
- ];
546
- const s = t.match(
547
- /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i
548
- );
549
- if (s)
550
- return [parseInt(s[1], 10), parseInt(s[2], 10), parseInt(s[3], 10), 1];
551
- const c = t.match(
552
- /^hsla?\(\s*([+-]?[\d.]+)(?:deg)?\s*[ ,]?\s*([\d.]+)%\s*[ ,]?\s*([\d.]+)%\s*(?:[/,]\s*(\d?(?:\.\d+)?))?\s*\)$/i
553
- );
554
- if (c) {
555
- const f = parseFloat(c[1]), v = parseFloat(c[2]), d = parseFloat(c[3]), x = c[4] != null ? parseFloat(c[4]) : 1, [h, y, g] = Wt(f, v / 100, d / 100);
556
- return [h, y, g, x];
557
- }
558
- const l = t.match(
559
- /^hwb\(\s*([+-]?[\d.]+)(?:deg)?\s*[, ]\s*([\d.]+)%\s*[, ]\s*([\d.]+)%\s*(?:[/]\s*(\d?(?:\.\d+)?))?\s*\)$/i
560
- );
561
- if (l) {
562
- const f = parseFloat(l[1]), v = parseFloat(l[2]) / 100, d = parseFloat(l[3]) / 100, x = l[4] != null ? parseFloat(l[4]) : 1, [h, y, g] = Ae(f, v, d);
563
- return [h, y, g, x];
564
- }
565
- const i = t.match(
566
- /^oklch\(\s*([+-]?[\d.]+%?)\s+([\d.]+)\s+([+-]?[\d.]+)(?:deg)?(?:\s*\/\s*(\d?(?:\.\d+)?))?\s*\)$/i
567
- );
568
- if (i) {
569
- const f = i[1], v = parseFloat(i[2]), d = parseFloat(i[3]), x = i[4] != null ? parseFloat(i[4]) : 1, h = f.endsWith("%") ? Math.max(0, Math.min(1, parseFloat(f) / 100)) : Math.max(0, Math.min(1, parseFloat(f))), [y, g, b] = Be(h, v, d);
570
- return [y, g, b, x];
571
- }
572
- const [o, p, m] = kt(t);
573
- return [o, p, m, 1];
574
- }
575
- const Se = (t, e, r, n) => `rgba(${Math.round(t)}, ${Math.round(e)}, ${Math.round(r)}, ${Math.max(
576
- 0,
577
- Math.min(1, Math.round(n * 100) / 100)
578
- )})`;
579
- function Te(t) {
580
- let e = t + 1831565813;
581
- return function() {
582
- return e = Math.imul(e ^ e >>> 15, e | 1), e ^= e + Math.imul(e ^ e >>> 7, e | 61), ((e ^ e >>> 14) >>> 0) / 4294967296;
583
- };
584
- }
585
- function Wt(t, e, r) {
586
- t = (t % 360 + 360) % 360;
587
- const n = (1 - Math.abs(2 * r - 1)) * e, s = n * (1 - Math.abs(t / 60 % 2 - 1)), c = r - n / 2;
588
- let l = 0, i = 0, o = 0;
589
- return 0 <= t && t < 60 ? [l, i, o] = [n, s, 0] : 60 <= t && t < 120 ? [l, i, o] = [s, n, 0] : 120 <= t && t < 180 ? [l, i, o] = [0, n, s] : 180 <= t && t < 240 ? [l, i, o] = [0, s, n] : 240 <= t && t < 300 ? [l, i, o] = [s, 0, n] : [l, i, o] = [n, 0, s], [
590
- Math.round((l + c) * 255),
591
- Math.round((i + c) * 255),
592
- Math.round((o + c) * 255)
593
- ];
594
- }
595
- function Ae(t, e, r) {
596
- t = (t % 360 + 360) % 360;
597
- const n = e + r;
598
- n > 1 && (e /= n, r /= n);
599
- const [s, c, l] = Wt(t, 1, 0.5).map((f) => f / 255), i = 1 - e - r, o = s * i + e, p = c * i + e, m = l * i + e;
600
- return [Math.round(o * 255), Math.round(p * 255), Math.round(m * 255)];
601
- }
602
- function Ct(t, e, r) {
603
- t /= 255, e /= 255, r /= 255;
604
- const n = Math.max(t, e, r), s = Math.min(t, e, r);
605
- let c = 0, l = 0;
606
- const i = (n + s) / 2, o = n - s;
607
- if (o !== 0) {
608
- switch (l = i > 0.5 ? o / (2 - n - s) : o / (n + s), n) {
609
- case t:
610
- c = (e - r) / o + (e < r ? 6 : 0);
611
- break;
612
- case e:
613
- c = (r - t) / o + 2;
614
- break;
615
- default:
616
- c = (t - e) / o + 4;
617
- }
618
- c *= 60;
619
- }
620
- return [Math.round(c), Math.round(l * 100), Math.round(i * 100)];
621
- }
622
- function Fe(t, e, r) {
623
- const [n] = Ct(t, e, r), s = t / 255, c = e / 255, l = r / 255, i = Math.min(s, c, l), o = 1 - Math.max(s, c, l);
624
- return [n, Math.round(i * 100), Math.round(o * 100)];
625
- }
626
- function vt(t) {
627
- const e = t / 255;
628
- return e <= 0.04045 ? e / 12.92 : Math.pow((e + 0.055) / 1.055, 2.4);
629
- }
630
- function xt(t) {
631
- const e = t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 0.4166666666666667) - 0.055;
632
- return Math.round(Math.max(0, Math.min(1, e)) * 255);
633
- }
634
- function Be(t, e, r) {
635
- const n = r * Math.PI / 180, s = Math.cos(n) * e, c = Math.sin(n) * e, l = t + 0.3963377774 * s + 0.2158037573 * c, i = t - 0.1055613458 * s - 0.0638541728 * c, o = t - 0.0894841775 * s - 1.291485548 * c, p = l * l * l, m = i * i * i, f = o * o * o, v = 4.0767416621 * p - 3.3077115913 * m + 0.2309699292 * f, d = -1.2684380046 * p + 2.6097574011 * m - 0.3413193965 * f, x = -0.0041960863 * p - 0.7034186147 * m + 1.707614701 * f;
636
- return [xt(v), xt(d), xt(x)];
637
- }
638
- function Ve(t, e, r) {
639
- const n = vt(t), s = vt(e), c = vt(r), l = 0.4122214708 * n + 0.5363325363 * s + 0.0514459929 * c, i = 0.2119034982 * n + 0.6806995451 * s + 0.1073969566 * c, o = 0.0883024619 * n + 0.2817188376 * s + 0.6299787005 * c, p = Math.cbrt(l), m = Math.cbrt(i), f = Math.cbrt(o), v = 0.2104542553 * p + 0.793617785 * m - 0.0040720468 * f, d = 1.9779984951 * p - 2.428592205 * m + 0.4505937099 * f, x = 0.0259040371 * p + 0.7827717662 * m - 0.808675766 * f, h = Math.sqrt(d * d + x * x);
640
- let y = Math.atan2(x, d) * 180 / Math.PI;
641
- return y < 0 && (y += 360), [v, h, y];
642
- }
643
- function at(t, e, r, n, s, c) {
644
- switch (s) {
645
- case "hex":
646
- if (c) {
647
- const l = (o) => o.toString(16).padStart(2, "0"), i = Math.max(0, Math.min(255, Math.round(n * 255)));
648
- return `#${l(t)}${l(e)}${l(r)}${l(i)}`;
649
- }
650
- return It(t, e, r);
651
- case "rgb":
652
- return `rgb(${t}, ${e}, ${r})`;
653
- case "rgba":
654
- return `rgba(${t}, ${e}, ${r}, ${Math.round(n * 100) / 100})`;
655
- case "hsl": {
656
- const [l, i, o] = Ct(t, e, r);
657
- return `hsl(${l}, ${i}%, ${o}%)`;
658
- }
659
- case "hsla": {
660
- const [l, i, o] = Ct(t, e, r);
661
- return `hsla(${l}, ${i}%, ${o}%, ${Math.round(n * 100) / 100})`;
662
- }
663
- case "hwb": {
664
- const [l, i, o] = Fe(t, e, r);
665
- return n < 1 ? `hwb(${l} ${i}% ${o}% / ${Math.round(n * 100) / 100})` : `hwb(${l} ${i}% ${o}%)`;
666
- }
667
- case "oklch": {
668
- const [l, i, o] = Ve(t, e, r), p = (Math.round(l * 1e3) / 1e3).toFixed(3), m = (Math.round(i * 1e3) / 1e3).toFixed(3), f = (Math.round(o * 10) / 10).toFixed(1), v = Math.round(n * 100) / 100;
669
- return c || n < 1 ? `oklch(${p} ${m} ${f} / ${v})` : `oklch(${p} ${m} ${f})`;
670
- }
671
- }
672
- }
673
- function ot(t, e) {
674
- return e ? t === "rgb" ? "rgba" : t === "hsl" ? "hsla" : t : t === "rgba" ? "rgb" : t === "hsla" ? "hsl" : t;
675
- }
676
- function Le(t, e) {
677
- const [r, n, s] = t, c = r << 16 ^ n << 8 ^ s, l = Te(c), i = 6 + Math.floor(l() * 5), o = 0.18 + l() * 0.06, p = [];
678
- for (let d = 0; d < i; d++) {
679
- const x = d / i * Math.PI * 2, h = e * (1 + (l() * 2 - 1) * o), y = Math.cos(x) * h, g = Math.sin(x) * h;
680
- p.push({ x: y, y: g });
681
- }
682
- const m = (p[0].x + p[i - 1].x) / 2, f = (p[0].y + p[i - 1].y) / 2;
683
- let v = `M ${m.toFixed(3)} ${f.toFixed(3)}`;
684
- for (let d = 0; d < i; d++) {
685
- const x = p[d], h = p[(d + 1) % i], y = (x.x + h.x) / 2, g = (x.y + h.y) / 2;
686
- v += ` Q ${x.x.toFixed(3)} ${x.y.toFixed(3)} ${y.toFixed(3)} ${g.toFixed(3)}`;
687
- }
688
- return v += " Z", v;
689
- }
690
- const mn = (t) => {
691
- const { value: e, onBlur: r, onChange: n, onInput: s, displayValue: c, size: l, withAlpha: i } = t, o = u.map(l ?? 32, (w) => w), p = u.map(e, (w) => De(w ?? "#000000")), m = u.map(
692
- p,
693
- ([w, $, M]) => [w, $, M]
694
- ), f = u.map(p, ([, , , w]) => w), v = et(u.get(f) ?? 1), d = u.map(i ?? !1, (w) => w), x = u.map(
695
- t.colorTextFormat ?? "rgb",
696
- (w) => w
697
- ), h = L(
698
- m,
699
- v,
700
- x,
701
- d
702
- )(
703
- ([w, $, M], A, F, S) => at(w, $, M, A ?? 1, ot(F, S), S)
704
- ), y = u.map(
705
- t.colorTextFormat ?? "hex",
706
- (w) => w
707
- ), g = u.map(o, (w) => `${-w / 2} ${-w / 2} ${w} ${w}`), b = L(
708
- m,
709
- o
710
- )((w, $) => Le(w, $ / 2)), D = L(
711
- m,
712
- v,
713
- d
714
- )(
715
- ([w, $, M], A, F) => F || A < 1 ? Se(w, $, M, A) : It(w, $, M)
716
- ), k = I.div(
717
- a.class("bc-color-input__control"),
718
- a.class(
719
- u.map(
720
- d,
721
- (w) => w ? "bc-color-input__control--alpha" : ""
722
- )
723
- ),
724
- a.style(
725
- L(o)((w) => `min-width:${w + 2}px;height:${w + 2}px`)
726
- ),
727
- // The SVG blob preview
728
- At.svg(
729
- a.class("bc-color-input__svg"),
730
- ht.viewBox(g),
731
- At.path(ht.d(b), ht.fill(D))
732
- ),
733
- // Invisible native input overlays the blob for picker and accessibility
734
- I.input(
735
- a.type("color"),
736
- j(t),
737
- // Native color input needs hex without alpha
738
- a.value(u.map(m, ([w, $, M]) => It(w, $, M))),
739
- a.class("bc-input bc-color-input bc-color-input__native"),
740
- r != null ? C.blur(r) : T,
741
- n != null ? C.change((w) => {
742
- const $ = w.target.value;
743
- if (!n) return;
744
- const [M, A, F] = kt($), S = u.get(v) ?? 1, B = ot(
745
- u.get(y),
746
- u.get(d)
747
- ), R = at(M, A, F, S, B, u.get(d));
748
- n(R);
749
- }) : T,
750
- s != null ? C.input((w) => {
751
- const $ = w.target.value;
752
- if (!s) return;
753
- const [M, A, F] = kt($), S = u.get(v) ?? 1, B = ot(
754
- u.get(y),
755
- u.get(d)
756
- ), R = at(M, A, F, S, B, u.get(d));
757
- s(R);
758
- }) : T
759
- )
760
- ), _ = E(
761
- d,
762
- () => I.input(
763
- a.type("range"),
764
- a.class("bc-color-input__alpha"),
765
- a.min(0),
766
- a.max(1),
767
- a.step(0.01),
768
- a.value(u.map(v, (w) => String(w ?? 1))),
769
- a.disabled(t.disabled),
770
- C.input((w) => {
771
- const $ = parseFloat(w.target.value);
772
- v.set($);
773
- const [M, A, F] = u.get(m), S = ot(
774
- u.get(y),
775
- u.get(d)
776
- ), B = at(M, A, F, $, S, u.get(d));
777
- s?.(B);
778
- }),
779
- C.change((w) => {
780
- const $ = parseFloat(w.target.value);
781
- v.set($);
782
- const [M, A, F] = u.get(m), S = ot(
783
- u.get(y),
784
- u.get(d)
785
- ), B = at(M, A, F, $, S, u.get(d));
786
- n?.(B);
787
- })
788
- )
789
- );
790
- return O({
791
- baseContainer: !0,
792
- ...t,
793
- // ensure our control does not try to grow
794
- growInput: !1,
795
- input: k,
796
- // If caller provided an `after`, append RGB before it
797
- after: V(
798
- E(
799
- c ?? !1,
800
- () => I.span(a.class("bc-color-input__rgb"), h)
801
- ),
802
- _,
803
- t.after
804
- )
805
- });
806
- }, Dt = "$$tts-exp-", Ee = (t, e) => it((r) => {
807
- const n = `${Dt}${t}`;
808
- return W(u.on(e, (s) => Reflect.set(r, n, s)));
809
- }), hn = (t, e) => {
810
- const r = `${Dt}${t}`;
811
- return (n) => {
812
- e(Reflect.get(n.target, r));
813
- };
814
- }, Ue = (t, e) => {
815
- const r = `${Dt}${t}`;
816
- return (n) => {
817
- const s = n.target, c = s.selectedIndex, l = s.options[c];
818
- e(Reflect.get(l, r));
819
- };
820
- };
821
- function Ne(t, e, r) {
822
- const n = ["bc-card"];
823
- return t !== "default" && n.push(`bc-card--${t}`), e !== "md" && n.push(`bc-card--padding-${e}`), r !== "lg" && n.push(`bc-card--rounded-${r}`), n.join(" ");
824
- }
825
- function gn({ variant: t = "default", size: e = "md", roundedness: r = "lg" } = {}, ...n) {
826
- return I.div(
827
- a.class(
828
- L(
829
- t,
830
- e,
831
- r
832
- )(
833
- (s, c, l) => Ne(
834
- s ?? "default",
835
- c ?? "md",
836
- l ?? "lg"
837
- )
838
- )
839
- ),
840
- ...n
841
- );
842
- }
843
- function pt(...t) {
844
- return I.div(a.class("bc-group"), ...t);
845
- }
846
- const bn = ({
847
- startEditing: t,
848
- value: e,
849
- onChange: r,
850
- placeholder: n,
851
- disabled: s
852
- }) => {
853
- const c = u.deriveProp(t ?? !1), l = et(!1), i = u.map(s ?? !1, (o) => o);
854
- return I.div(
855
- a.class("bc-editable-text"),
856
- a.class(
857
- u.map(
858
- i,
859
- (o) => o ? "bc-editable-text--disabled" : ""
860
- )
861
- ),
862
- N.disabled(i),
863
- E(
864
- c,
865
- () => I.input(
866
- a.placeholder(n),
867
- a.value(e),
868
- a.class("bc-editable-text__input"),
869
- le(),
870
- C.keydown((o) => {
871
- o.key === "Enter" ? c.set(!1) : o.key === "Escape" && (l.set(!0), c.set(!1));
872
- }),
873
- C.blur(
874
- P((o) => {
875
- if (c.set(!1), l.value) {
876
- l.set(!1);
877
- return;
878
- }
879
- r(o);
880
- })
881
- )
882
- ),
883
- () => I.span(
884
- C.click(() => {
885
- u.get(i) || c.set(!0);
886
- }),
887
- a.class("bc-editable-text__display"),
888
- E(
889
- u.map(e, (o) => o != null && o.trim() !== ""),
890
- () => I.span(a.class("bc-editable-text__text"), e),
891
- () => I.span(
892
- a.class("bc-editable-text__placeholder"),
893
- n
894
- )
895
- ),
896
- E(
897
- u.map(i, (o) => !o),
898
- () => I.button(
899
- a.type("button"),
900
- a.class("bc-editable-text__edit-button"),
901
- H(X, (o) => N.label(o.$.editLabel)),
902
- C.click(() => c.set(!0)),
903
- z({ icon: "line-md/pencil", color: "neutral" })
904
- )
905
- )
906
- )
907
- )
908
- );
909
- }, Zt = (t, e, r) => Jt(
910
- t,
911
- (n) => Kt(n, {
912
- value: (s) => {
913
- const c = L(
914
- s,
915
- r
916
- )((l, i) => e(l.value, i));
917
- return I.option(
918
- W(c.dispose),
919
- a.selected(c),
920
- Ee("value", s.$.value),
921
- s.$.label
922
- );
923
- },
924
- group: (s) => I.optgroup(
925
- a.label(s.$.group),
926
- ft(
927
- s.$.options,
928
- (c) => Zt(
929
- c,
930
- e,
931
- r
932
- )
933
- )
934
- ),
935
- break: () => I.hr()
936
- })
937
- ), ze = (t) => {
938
- const {
939
- value: e,
940
- onBlur: r,
941
- onChange: n,
942
- options: s,
943
- unselectedLabel: c,
944
- equality: l = (p, m) => p === m,
945
- after: i
946
- } = t;
947
- let o;
948
- return O(
949
- {
950
- ...t,
951
- after: V(
952
- z({
953
- icon: "ph:caret-down-bold",
954
- color: "neutral",
955
- size: "sm"
956
- }),
957
- i
958
- ),
959
- input: I.select(
960
- it((p) => {
961
- o = p;
962
- const m = new MutationObserver((f) => {
963
- const { removedNodes: v } = f[0];
964
- v.length > 0 && (o.selectedIndex = 0);
965
- });
966
- return m.observe(p, { childList: !0 }), W(() => m.disconnect());
967
- }),
968
- j(t),
969
- a.class("bc-native-select bc-input"),
970
- H(
971
- X,
972
- (p) => I.option(
973
- a.hidden("hidden"),
974
- Qt(c, p.$.selectOne)
975
- )
976
- ),
977
- ft(s, (p) => Zt(p, l, e)),
978
- r != null ? C.blur(r) : T,
979
- n != null ? C.change(Ue("value", (p) => n(p))) : T
980
- )
981
- },
982
- C.click(() => {
983
- o?.focus(), typeof o?.showPicker == "function" && o.showPicker();
984
- })
985
- );
986
- };
987
- function Re(t) {
988
- const { controller: e, onChange: r, onBlur: n, ...s } = t;
989
- return ze({
990
- ...s,
991
- value: e.signal,
992
- onChange: pe(e, r),
993
- onBlur: ue(e, n)
994
- });
995
- }
996
- function vn(t) {
997
- return Ht({
998
- ...t,
999
- content: Re(t)
1000
- });
1001
- }
1002
- function Oe(t, e, r) {
1003
- const n = t.length.map((s) => s);
1004
- return V(
1005
- W(() => n.dispose()),
1006
- Pt(
1007
- n,
1008
- (s) => {
1009
- const c = t.item(s.index), l = [];
1010
- return V(
1011
- W(() => {
1012
- c.dispose(), l.forEach((i) => i());
1013
- }),
1014
- e({
1015
- list: t,
1016
- item: c,
1017
- position: s,
1018
- remove: () => t.removeAt(s.index),
1019
- move: (i) => {
1020
- switch (i) {
1021
- case "up":
1022
- if (s.index === 0) return;
1023
- t.move(s.index, s.index - 1);
1024
- break;
1025
- case "down":
1026
- if (s.index === t.length.value - 1) return;
1027
- t.move(s.index, s.index + 1);
1028
- break;
1029
- case "first":
1030
- t.move(s.index, 0);
1031
- break;
1032
- case "last":
1033
- t.move(s.index, t.length.value - 1);
1034
- }
1035
- },
1036
- canMove: (i) => {
1037
- const o = (() => {
1038
- switch (i) {
1039
- case "up":
1040
- return Ft(s.index > 0);
1041
- case "down":
1042
- return t.length.map((p) => s.index < p - 1);
1043
- }
1044
- })();
1045
- return l.push(() => o.dispose()), o;
1046
- },
1047
- cannotMove: (i) => {
1048
- const o = (() => {
1049
- switch (i) {
1050
- case "up":
1051
- return Ft(s.index === 0);
1052
- case "down":
1053
- return t.length.map((p) => s.index === p - 1);
1054
- }
1055
- })();
1056
- return l.push(() => o.dispose()), o;
1057
- }
1058
- })
1059
- );
1060
- },
1061
- r
1062
- )
1063
- );
1064
- }
1065
- const Nt = {
1066
- 9: { pattern: /^[0-9]$/ },
1067
- A: { pattern: /^[A-Za-z]$/, transform: (t) => t.toUpperCase() },
1068
- "*": { pattern: /^.$/ }
1069
- }, Pe = (t) => t instanceof RegExp;
1070
- function Yt(t, e, r) {
1071
- if (t == null) return [];
1072
- const n = r ? { ...Nt, ...e } : e ?? Nt, s = (l, i) => {
1073
- const o = n[i];
1074
- o ? l.push({ type: "pattern", name: i, ...o }) : l.push({ type: "literal", char: i });
1075
- }, c = [];
1076
- if (typeof t == "string") {
1077
- for (const l of t) s(c, l);
1078
- return c;
1079
- }
1080
- for (const l of t)
1081
- if (typeof l == "string")
1082
- if (l.length <= 1) s(c, l);
1083
- else for (const i of l) s(c, i);
1084
- else Pe(l) ? c.push({ type: "pattern", pattern: l }) : typeof l == "object" && l && c.push(l);
1085
- return c;
1086
- }
1087
- function je(t, e) {
1088
- return (r) => {
1089
- switch (t) {
1090
- case "digits":
1091
- return /[0-9]/.test(r);
1092
- case "letters":
1093
- return /[A-Za-z]/.test(r);
1094
- case "alphanumeric":
1095
- return /[A-Za-z0-9]/.test(r);
1096
- case "custom":
1097
- return e?.(r) ?? !0;
1098
- default:
1099
- return !0;
1100
- }
1101
- };
1102
- }
1103
- function zt(t, e, r, n, s, c) {
1104
- const l = {
1105
- raw: t,
1106
- previousConformed: e,
1107
- cursor: s ?? t.length,
1108
- completed: !1
1109
- }, i = n.definitions ?? {}, o = typeof r == "function" ? r(t, l) : r, p = Yt(
1110
- o,
1111
- i,
1112
- n.useDefaultDefinitions ?? !0
1113
- ), m = je(n.allowMode, n.allow), f = /* @__PURE__ */ new Set();
1114
- for (const S of p) S.type === "literal" && f.add(S.char);
1115
- if (n.prefix) for (const S of n.prefix) f.add(S);
1116
- if (n.suffix) for (const S of n.suffix) f.add(S);
1117
- const v = Array.from(t).filter((S) => m(S) && !f.has(S));
1118
- if (v.length === 0) return { value: "", cursor: 0, completed: !1 };
1119
- const d = [], x = [];
1120
- let h = 0, y = 0, g = 0, b = -1;
1121
- for (const S of p) {
1122
- if (S.type === "literal") {
1123
- d.push(S.char), x.push({ kind: "literal", filled: !0 });
1124
- continue;
1125
- }
1126
- y += S.optional ? 0 : 1;
1127
- const B = v[h];
1128
- if (B == null)
1129
- break;
1130
- if (S.type === "any") {
1131
- g++, d.push(S.transform ? S.transform(B) : B), x.push({ kind: "slot", filled: !0 }), b = x.length - 1, h++;
1132
- continue;
1133
- }
1134
- if (S.type === "pattern")
1135
- if (S.pattern.test(B)) {
1136
- g++;
1137
- const R = S.transform ? S.transform(B) : B;
1138
- d.push(R), x.push({ kind: "slot", filled: !0 }), b = x.length - 1, h++;
1139
- } else {
1140
- h++;
1141
- continue;
1142
- }
1143
- }
1144
- const D = d.join(""), k = (n.prefix ?? "") + D + (n.suffix ?? "");
1145
- let w = (n.prefix ?? "").length;
1146
- if (b >= 0) {
1147
- let S = b + 1;
1148
- if ((c?.policy ?? "smart") !== "sticky")
1149
- for (; S < x.length && x[S].kind === "literal"; ) S++;
1150
- w += S;
1151
- }
1152
- const $ = n.completion?.mode === "min" ? (n.completion.minChars ?? 0) <= g : n.completion?.mode === "custom" ? !!n.completion.isComplete?.(k) : y > 0 && g >= y, M = n.pipe?.(k, { ...l, completed: $ });
1153
- let A, F = w;
1154
- return M === !1 ? (A = e, F = e.length) : typeof M == "string" ? (A = M, F = M.length) : typeof M == "object" && M ? (A = M.value, F = M.cursor ?? M.value.length) : A = k, { value: A, cursor: F, completed: $ };
1155
- }
1156
- function He(t, e) {
1157
- const r = e?.strategy ?? "none";
1158
- return r === "custom" && e?.unmask ? e.unmask(t) : r === "strip" ? t.replace(/[^A-Za-z0-9]/g, "") : t;
1159
- }
1160
- const Xt = (t) => {
1161
- const {
1162
- value: e,
1163
- onBlur: r,
1164
- onChange: n,
1165
- onInput: s,
1166
- onAccept: c,
1167
- onComplete: l,
1168
- mask: i,
1169
- definitions: o,
1170
- useDefaultDefinitions: p,
1171
- extraLiterals: m,
1172
- prefix: f,
1173
- suffix: v,
1174
- autofix: d,
1175
- pipe: x,
1176
- completion: h,
1177
- unmask: y,
1178
- allowMode: g,
1179
- allow: b,
1180
- placeholder: D,
1181
- placeholderOptions: k
1182
- } = t, _ = L(
1183
- e,
1184
- i,
1185
- o,
1186
- p,
1187
- m,
1188
- f,
1189
- v,
1190
- d,
1191
- h,
1192
- y,
1193
- g,
1194
- D,
1195
- k
1196
- )(($, M, A, F, S, B, R, st, rt, tt, Q, ut, q) => M ? zt($ ?? "", "", M, {
1197
- definitions: A ?? {},
1198
- useDefaultDefinitions: F ?? !0,
1199
- extraLiterals: S ?? [],
1200
- autofix: st ?? "none",
1201
- completion: rt ?? { mode: "mask" },
1202
- pipe: x ?? ((U) => U),
1203
- unmask: tt ?? { strategy: "none" },
1204
- allowMode: Q ?? "all",
1205
- allow: b,
1206
- prefix: B,
1207
- suffix: R
1208
- }).value : $ ?? ""), w = ($, M) => {
1209
- const A = $.value ?? "", F = u.get(e) ?? "", S = i != null ? u.get(i) : null, B = o != null ? u.get(o) : void 0, R = p != null ? u.get(p) : void 0, st = m != null ? u.get(m) : void 0, rt = d != null ? u.get(d) : void 0, tt = h != null ? u.get(h) : void 0, Q = y != null ? u.get(y) : void 0, ut = g != null ? u.get(g) : void 0, q = f != null ? u.get(f) : void 0, U = v != null ? u.get(v) : void 0, {
1210
- value: J,
1211
- cursor: mt,
1212
- completed: St
1213
- } = S ? zt(
1214
- A,
1215
- F,
1216
- S,
1217
- {
1218
- definitions: B ?? {},
1219
- useDefaultDefinitions: R ?? !0,
1220
- extraLiterals: st ?? [],
1221
- autofix: rt ?? "none",
1222
- completion: tt ?? { mode: "mask" },
1223
- pipe: x ?? ((qt) => qt),
1224
- unmask: Q ?? { strategy: "none" },
1225
- allowMode: ut ?? "all",
1226
- allow: b,
1227
- prefix: q,
1228
- suffix: U
1229
- },
1230
- $.selectionStart ?? A.length,
1231
- t.cursor ? u.get(t.cursor) : void 0
1232
- ) : { value: A, cursor: A.length, completed: !0 };
1233
- if (J !== A) {
1234
- $.value = J;
1235
- try {
1236
- $.setSelectionRange(mt, mt);
1237
- } catch {
1238
- }
1239
- }
1240
- const Tt = He(J, Q);
1241
- c?.({
1242
- raw: Tt,
1243
- conformed: J,
1244
- completed: St,
1245
- cursor: mt
1246
- }), M === "input" ? s?.(J) : (n?.(J), St && l?.({ raw: Tt, conformed: J }));
1247
- };
1248
- return O({
1249
- ...t,
1250
- input: K.text(
1251
- j(t),
1252
- a.value(_),
1253
- a.class("bc-input"),
1254
- r != null ? C.blur(r) : T,
1255
- it(
1256
- ($) => $ instanceof HTMLInputElement ? V(
1257
- C.input(() => w($, "input")),
1258
- C.change(() => w($, "change")),
1259
- C.keydown((M) => {
1260
- if (M.key !== "Backspace" || !(t.cursor ? u.get(t.cursor)?.backspaceRubberBand ?? !0 : !0)) return;
1261
- const F = $.selectionStart ?? 0, S = $.selectionEnd ?? F;
1262
- if (F !== S || F <= 0) return;
1263
- const B = $.value ?? "", R = i != null ? u.get(i) : null;
1264
- if (!R) return;
1265
- const st = o != null ? u.get(o) : void 0, rt = p != null ? u.get(p) : !0, tt = f != null ? u.get(f) : void 0, Q = v != null ? u.get(v) : void 0, ut = Yt(
1266
- typeof R == "function" ? R(B, {
1267
- raw: B,
1268
- previousConformed: B,
1269
- cursor: F,
1270
- completed: !1
1271
- }) : R,
1272
- st ?? {},
1273
- rt ?? !0
1274
- ), q = /* @__PURE__ */ new Set();
1275
- for (const U of ut)
1276
- U.type === "literal" && q.add(U.char);
1277
- if (tt) for (const U of tt) q.add(U);
1278
- if (Q) for (const U of Q) q.add(U);
1279
- if (q.has(B[F - 1])) {
1280
- let U = F - 1;
1281
- for (; U >= 0 && q.has(B[U]); ) U--;
1282
- U >= 0 && (M.preventDefault(), M.stopPropagation(), $.value = B.slice(0, U) + B.slice(U + 1), w($, "input"));
1283
- }
1284
- })
1285
- ) : T
1286
- )
1287
- )
1288
- });
1289
- };
1290
- function Y(t, e, r) {
1291
- const n = u.map(t, (c) => c != null), s = yt.clearValue;
1292
- return E(
1293
- n,
1294
- () => I.button(
1295
- a.type("button"),
1296
- a.class("bc-input-container__reset"),
1297
- N.label(s),
1298
- a.title(s),
1299
- a.disabled(e ?? !1),
1300
- z({ icon: "mdi:close", size: "sm" }),
1301
- C.click((c) => {
1302
- c.preventDefault(), c.stopPropagation(), r?.(null);
1303
- })
1304
- )
1305
- );
1306
- }
1307
- const xn = (t) => {
1308
- const { value: e, onBlur: r, onChange: n, after: s, disabled: c } = t, l = Y(e, c, n);
1309
- return O({
1310
- ...t,
1311
- input: K.date(
1312
- j(t),
1313
- a.valueAsDate(e),
1314
- a.class("bc-input"),
1315
- r != null ? C.blur(P(r)) : T,
1316
- n != null ? C.change(te(n)) : T
1317
- ),
1318
- after: s != null ? V(l, s) : l
1319
- });
1320
- }, We = (t) => {
1321
- const e = t.getFullYear(), r = t.getMonth() + 1, n = t.getDate(), s = t.getHours(), c = t.getMinutes(), l = t.getSeconds();
1322
- return `${e}-${r.toString().padStart(2, "0")}-${n.toString().padStart(2, "0")}T${s.toString().padStart(2, "0")}:${c.toString().padStart(2, "0")}:${l.toString().padStart(2, "0")}`;
1323
- }, wn = (t) => {
1324
- const { value: e, onBlur: r, onChange: n, after: s, disabled: c } = t, l = u.map(e, (o) => o != null ? We(o) : null), i = Y(e, c, n);
1325
- return O({
1326
- ...t,
1327
- input: K["datetime-local"](
1328
- j(t),
1329
- a.value(u.map(l, (o) => o ?? null)),
1330
- a.class("bc-input"),
1331
- r != null ? C.blur(P(r)) : T,
1332
- n != null ? C.change(ee(n)) : T
1333
- ),
1334
- after: s != null ? V(i, s) : i
1335
- });
1336
- }, Z = (t) => typeof t == "string" && t.trim() === "" ? null : t, nt = (t) => t ?? "", _n = (t) => {
1337
- const { value: e, onBlur: r, onChange: n, onInput: s, after: c, disabled: l, ...i } = t, o = Y(e, l, n);
1338
- return oe({
1339
- ...i,
1340
- value: u.map(e, nt),
1341
- onChange: n != null ? (p) => n(Z(p)) : void 0,
1342
- onInput: s != null ? (p) => s(Z(p)) : void 0,
1343
- onBlur: r,
1344
- after: c != null ? V(o, c) : o
1345
- });
1346
- }, yn = (t) => {
1347
- const { value: e, onBlur: r, onChange: n, onInput: s, after: c, disabled: l, ...i } = t, o = Y(e, l, n);
1348
- return de({
1349
- ...i,
1350
- value: u.map(e, nt),
1351
- onChange: n != null ? (p) => n(Z(p)) : void 0,
1352
- onInput: s != null ? (p) => s(Z(p)) : void 0,
1353
- onBlur: r,
1354
- after: c != null ? V(o, c) : o
1355
- });
1356
- }, $n = (t) => {
1357
- const { value: e, onBlur: r, onChange: n, onInput: s, after: c, disabled: l, ...i } = t, o = Y(e, l, n);
1358
- return fe({
1359
- ...i,
1360
- value: u.map(e, nt),
1361
- onChange: n != null ? (p) => n(Z(p)) : void 0,
1362
- onInput: s != null ? (p) => s(Z(p)) : void 0,
1363
- onBlur: r,
1364
- after: c != null ? V(o, c) : o
1365
- });
1366
- }, Ze = (t) => {
1367
- const { value: e, onBlur: r, onChange: n, onInput: s, rows: c } = t;
1368
- return O({
1369
- ...t,
1370
- input: I.textarea(
1371
- j(t),
1372
- a.rows(c ?? 3),
1373
- a.value(e),
1374
- a.class("bc-input"),
1375
- r != null ? C.blur(P(r)) : T,
1376
- n != null ? C.change(P(n)) : T,
1377
- s != null ? C.input(P(s)) : T
1378
- )
1379
- });
1380
- }, kn = (t) => {
1381
- const { value: e, onBlur: r, onChange: n, onInput: s, after: c, disabled: l, ...i } = t, o = Y(e, l, n);
1382
- return Ze({
1383
- ...i,
1384
- value: u.map(e, nt),
1385
- onChange: n != null ? (p) => n(Z(p)) : void 0,
1386
- onInput: s != null ? (p) => s(Z(p)) : void 0,
1387
- onBlur: r,
1388
- after: c != null ? V(o, c) : o
1389
- });
1390
- }, In = (t) => {
1391
- const { value: e, step: r, min: n, max: s, onBlur: c, onChange: l, onInput: i, after: o } = t, p = (v) => {
1392
- const d = n != null ? u.get(n) : void 0, x = s != null ? u.get(s) : void 0;
1393
- return d != null && v < d ? d : x != null && v > x ? x : v;
1394
- }, m = r != null ? H(X, (v) => {
1395
- const d = L(
1396
- e,
1397
- n
1398
- )((g, b) => b == null ? !0 : (g ?? 0) > b), x = L(
1399
- e,
1400
- s
1401
- )((g, b) => b == null ? !0 : (g ?? 0) < b), h = (g) => {
1402
- const b = u.get(e) ?? 0, D = u.get(r), k = g?.shiftKey ? 10 : 1, _ = b - D * k, w = n != null ? u.get(n) : void 0;
1403
- if (w != null && _ < w)
1404
- return;
1405
- const $ = p(_);
1406
- $ !== b && l && l($);
1407
- }, y = (g) => {
1408
- const b = u.get(e) ?? 0, D = u.get(r), k = g?.shiftKey ? 10 : 1, _ = b + D * k, w = s != null ? u.get(s) : void 0;
1409
- if (w != null && _ > w)
1410
- return;
1411
- const $ = p(_);
1412
- $ !== b && l && l($);
1413
- };
1414
- return ct(
1415
- a.class("bc-number-input-steppers"),
1416
- // Increment second
1417
- I.button(
1418
- a.type("button"),
1419
- a.class(
1420
- "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
1421
- ),
1422
- a.disabled(
1423
- L(
1424
- x,
1425
- t.disabled ?? !1
1426
- )((g, b) => !g || b)
1427
- ),
1428
- C.click((g) => y(g)),
1429
- N.label(v.$.incrementValue),
1430
- z({ icon: "line-md:plus", size: "xs" })
1431
- ),
1432
- // Decrement first (matches tests expecting first button to be decrement)
1433
- I.button(
1434
- a.type("button"),
1435
- a.class(
1436
- "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
1437
- ),
1438
- a.disabled(
1439
- L(
1440
- d,
1441
- t.disabled ?? !1
1442
- )((g, b) => !g || b)
1443
- ),
1444
- C.click((g) => h(g)),
1445
- N.label(v.$.decrementValue),
1446
- z({ icon: "line-md:minus", size: "xs" })
1447
- )
1448
- );
1449
- }) : null, f = o != null && m != null ? V(m, o) : o ?? m;
1450
- return O({
1451
- ...t,
1452
- input: K.number(
1453
- n != null ? V(
1454
- a.min(n),
1455
- W(
1456
- u.on(n, (v) => {
1457
- v < u.get(e);
1458
- })
1459
- )
1460
- ) : T,
1461
- s != null ? V(
1462
- a.max(s),
1463
- W(
1464
- u.on(s, (v) => {
1465
- v > u.get(e);
1466
- })
1467
- )
1468
- ) : T,
1469
- j(t),
1470
- a.valueAsNumber(e),
1471
- a.step(r),
1472
- a.class("bc-input bc-number-input"),
1473
- c != null ? C.blur(P(c)) : T,
1474
- l != null ? C.change(G(l)) : T,
1475
- i != null ? C.input(G(i)) : T,
1476
- // Add wheel event support when step is defined
1477
- r != null ? C.wheel((v) => {
1478
- v.preventDefault();
1479
- const d = u.get(e) ?? 0, x = u.get(r), h = v.shiftKey ? 10 : 1, y = v.deltaY < 0 ? x * h : -x * h, g = p(d + y);
1480
- g !== d && l && l(g);
1481
- }) : T
1482
- ),
1483
- after: f
1484
- });
1485
- }, Rt = (t) => {
1486
- if (t == null || t === "") return null;
1487
- const e = Number(t);
1488
- return Number.isNaN(e) ? null : e;
1489
- }, Cn = (t) => {
1490
- const { value: e, step: r, min: n, max: s, onBlur: c, onChange: l, onInput: i, after: o } = t, p = (d) => {
1491
- const x = n != null ? u.get(n) : void 0, h = s != null ? u.get(s) : void 0;
1492
- return x != null && d < x ? x : h != null && d > h ? h : d;
1493
- }, m = (() => {
1494
- if (r == null) return null;
1495
- const d = L(
1496
- e,
1497
- n
1498
- )((b, D) => {
1499
- const k = b ?? 0;
1500
- return D == null ? !0 : k > D;
1501
- }), x = L(
1502
- e,
1503
- s
1504
- )((b, D) => {
1505
- const k = b ?? 0;
1506
- return D == null ? !0 : k < D;
1507
- }), h = (b) => {
1508
- const D = u.get(e) ?? 0, k = u.get(r), _ = b?.shiftKey ? 10 : 1, w = D - k * _, $ = n != null ? u.get(n) : void 0;
1509
- if ($ != null && w < $) return;
1510
- const M = p(w);
1511
- M !== D && l && l(M);
1512
- }, y = (b) => {
1513
- const D = u.get(e) ?? 0, k = u.get(r), _ = b?.shiftKey ? 10 : 1, w = D + k * _, $ = s != null ? u.get(s) : void 0;
1514
- if ($ != null && w > $) return;
1515
- const M = p(w);
1516
- M !== D && l && l(M);
1517
- };
1518
- return ((b, D) => ct(
1519
- a.class("bc-number-input-steppers"),
1520
- I.button(
1521
- a.type("button"),
1522
- a.class(
1523
- "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
1524
- ),
1525
- a.disabled(
1526
- L(
1527
- x,
1528
- t.disabled ?? !1
1529
- )((k, _) => !k || _)
1530
- ),
1531
- C.click((k) => y(k)),
1532
- N.label(b),
1533
- z({ icon: "line-md:plus", size: "xs" })
1534
- ),
1535
- I.button(
1536
- a.type("button"),
1537
- a.class(
1538
- "bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
1539
- ),
1540
- a.disabled(
1541
- L(
1542
- d,
1543
- t.disabled ?? !1
1544
- )((k, _) => !k || _)
1545
- ),
1546
- C.click((k) => h(k)),
1547
- N.label(D),
1548
- z({ icon: "line-md:minus", size: "xs" })
1549
- )
1550
- ))(
1551
- yt.incrementValue,
1552
- yt.decrementValue
1553
- );
1554
- })(), f = Y(e, t.disabled, l), v = o != null && m != null ? V(m, f, o) : o != null ? V(f, o) : m != null ? V(m, f) : f;
1555
- return O({
1556
- ...t,
1557
- input: K.number(
1558
- // min/max attributes and reactive watchers (no forced correction)
1559
- n != null ? V(
1560
- a.min(n),
1561
- W(
1562
- u.on(n, (d) => {
1563
- })
1564
- )
1565
- ) : T,
1566
- s != null ? V(
1567
- a.max(s),
1568
- W(
1569
- u.on(s, (d) => {
1570
- })
1571
- )
1572
- ) : T,
1573
- j(t),
1574
- // Represent null as empty string so the field can be cleared
1575
- a.value(u.map(e, (d) => d == null ? "" : String(d))),
1576
- a.step(r),
1577
- a.class("bc-input bc-number-input"),
1578
- c != null ? C.blur(P(c)) : T,
1579
- l != null ? C.change(
1580
- P((d) => {
1581
- const x = Rt(d);
1582
- l(x);
1583
- })
1584
- ) : T,
1585
- i != null ? C.input(
1586
- P((d) => {
1587
- const x = Rt(d);
1588
- i(x);
1589
- })
1590
- ) : T,
1591
- // Wheel support when step is defined
1592
- r != null ? C.wheel((d) => {
1593
- d.preventDefault();
1594
- const x = u.get(e) ?? 0, h = u.get(r), y = d.shiftKey ? 10 : 1, g = d.deltaY < 0 ? h * y : -h * y, b = p(x + g);
1595
- b !== x && l && l(b);
1596
- }) : T
1597
- ),
1598
- after: v
1599
- });
1600
- }, Mn = ({
1601
- value: t,
1602
- onChange: e,
1603
- onInput: r,
1604
- onBlur: n,
1605
- offLabel: s,
1606
- onLabel: c,
1607
- disabled: l = !1,
1608
- size: i = "md",
1609
- id: o,
1610
- color: p = "primary"
1611
- }) => {
1612
- const m = o ?? me("switch");
1613
- function f(h, y) {
1614
- const g = [
1615
- "bc-switch",
1616
- `bc-switch--size-${y}`,
1617
- `bc-switch--${y}`
1618
- ];
1619
- return h && g.push("bc-switch--disabled"), g.join(" ");
1620
- }
1621
- function v(h) {
1622
- const y = h ?? "primary", g = /* @__PURE__ */ new Map(), b = Vt(y, "solid", "light"), D = Vt(y, "solid", "dark");
1623
- return g.set("--switch-track-on-bg", b.backgroundColor), g.set("--switch-track-on-label", b.textColor), g.set("--switch-track-on-bg-dark", D.backgroundColor), g.set("--switch-track-on-label-dark", D.textColor), g.set(
1624
- "--switch-track-on-border-dark",
1625
- ie(y, "dark")
1626
- ), Array.from(g.entries()).map(([k, _]) => `${k}: ${_}`).join("; ");
1627
- }
1628
- const d = () => {
1629
- u.get(l) || (e?.(!u.get(t)), r?.(!u.get(t)));
1630
- }, x = (h) => {
1631
- u.get(l) || (h.key === " " || h.key === "Enter") && (h.preventDefault(), d());
1632
- };
1633
- return I.div(
1634
- a.class(
1635
- L(
1636
- l ?? !1,
1637
- i
1638
- )(
1639
- (h, y) => f(h ?? !1, y ?? "md")
1640
- )
1641
- ),
1642
- a.style(
1643
- L(p)(
1644
- (h) => v(h)
1645
- )
1646
- ),
1647
- a.id(m),
1648
- a.role("switch"),
1649
- a.tabindex(
1650
- u.map(l, (h) => h ? -1 : 0)
1651
- ),
1652
- N.checked(t),
1653
- N.disabled(l),
1654
- C.click(d),
1655
- C.keydown(x),
1656
- n != null ? C.blur(n) : null,
1657
- I.div(
1658
- a.class("bc-switch__track"),
1659
- a.class(
1660
- u.map(
1661
- t,
1662
- (h) => h ? "bc-switch__track--on" : "bc-switch__track--off"
1663
- )
1664
- ),
1665
- s != null ? I.div(
1666
- N.hidden(!0),
1667
- a.class("bc-switch__track-label bc-switch__track-label--off"),
1668
- a.class(
1669
- u.map(
1670
- t,
1671
- (h) => h ? "bc-switch__track-label--hidden" : "bc-switch__track-label--visible"
1672
- )
1673
- ),
1674
- s
1675
- ) : null,
1676
- c != null ? I.div(
1677
- a.class("bc-switch__track-label bc-switch__track-label--on"),
1678
- a.class(
1679
- u.map(
1680
- t,
1681
- (h) => h ? "bc-switch__track-label--visible" : "bc-switch__track-label--hidden"
1682
- )
1683
- ),
1684
- c
1685
- ) : null,
1686
- jt(
1687
- (h) => H(
1688
- ce,
1689
- ({ direction: y }) => I.div(
1690
- a.class("bc-switch__thumb"),
1691
- a.class(
1692
- u.map(
1693
- t,
1694
- (g) => g ? "bc-switch__thumb--on" : "bc-switch__thumb--off"
1695
- )
1696
- ),
1697
- dt.transform(
1698
- L(
1699
- t,
1700
- h,
1701
- i,
1702
- y
1703
- )((g, { width: b }, D, k) => {
1704
- const _ = (() => {
1705
- switch (D) {
1706
- case "xs":
1707
- return 5;
1708
- case "sm":
1709
- return 5.5;
1710
- case "md":
1711
- return 6;
1712
- case "lg":
1713
- return 7;
1714
- case "xl":
1715
- return 8;
1716
- }
1717
- })(), w = k === "rtl" ? `calc((var(--spacing-base) * ${_}) - ${b}px)` : `calc(${b}px - (var(--spacing-base) * ${_}))`;
1718
- return g ? `translateX(${w})` : "translateX(0)";
1719
- })
1720
- )
1721
- )
1722
- )
1723
- )
1724
- )
1725
- );
1726
- }, Ye = (t) => {
1727
- const e = {
1728
- type: "pattern",
1729
- pattern: /[0-9A-Fa-f]/,
1730
- transform: (n) => n.toLowerCase()
1731
- };
1732
- return Xt({
1733
- ...t,
1734
- mask: [
1735
- e,
1736
- e,
1737
- e,
1738
- e,
1739
- e,
1740
- e,
1741
- e,
1742
- e,
1743
- "-",
1744
- e,
1745
- e,
1746
- e,
1747
- e,
1748
- "-",
1749
- e,
1750
- e,
1751
- e,
1752
- e,
1753
- "-",
1754
- e,
1755
- e,
1756
- e,
1757
- e,
1758
- "-",
1759
- e,
1760
- e,
1761
- e,
1762
- e,
1763
- e,
1764
- e,
1765
- e,
1766
- e,
1767
- e,
1768
- e,
1769
- e,
1770
- e
1771
- ],
1772
- // Sensible default placeholder; can be overridden via options.placeholder
1773
- placeholder: t.placeholder ?? "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
1774
- });
1775
- }, Dn = (t) => {
1776
- const { value: e, onBlur: r, onChange: n, onInput: s, after: c, disabled: l, ...i } = t, o = Y(e, l, n);
1777
- return Ye({
1778
- ...i,
1779
- value: u.map(e, nt),
1780
- onChange: n != null ? (p) => n(Z(p)) : void 0,
1781
- onInput: s != null ? (p) => s(Z(p)) : void 0,
1782
- onBlur: r,
1783
- after: c != null ? V(o, c) : o
1784
- });
1785
- }, Xe = "line-md:star-alt-filled", qe = "line-md:star-alt", Ge = (t) => {
1786
- const {
1787
- value: e,
1788
- onChange: r,
1789
- disabled: n,
1790
- max: s = 5,
1791
- fullColor: c = "yellow",
1792
- emptyColor: l = "neutral",
1793
- fullIcon: i = Xe,
1794
- emptyIcon: o = qe,
1795
- size: p = "md",
1796
- onBlur: m,
1797
- rounding: f = 1
1798
- } = t, v = () => {
1799
- const b = u.get(f);
1800
- return b > 0 ? b : 1;
1801
- }, d = (b) => Math.min(Math.max(b, 0), u.get(s)), x = (b, D) => {
1802
- if (u.get(n ?? !1)) return;
1803
- const _ = b.currentTarget.getBoundingClientRect(), w = (b.clientX - _.left) / _.width, $ = D - 1 + w, M = v(), A = Math.ceil($ / M) * M, F = d(A);
1804
- r?.(F);
1805
- }, h = (b) => {
1806
- if (u.get(n ?? !1)) return;
1807
- const D = v(), k = u.get(e) ?? 0;
1808
- let _;
1809
- switch (b.key) {
1810
- case "ArrowRight":
1811
- case "ArrowUp":
1812
- _ = d(k + D);
1813
- break;
1814
- case "ArrowLeft":
1815
- case "ArrowDown":
1816
- _ = d(k - D);
1817
- break;
1818
- case "Home":
1819
- _ = 0;
1820
- break;
1821
- case "End":
1822
- _ = u.get(s);
1823
- break;
1824
- default:
1825
- return;
1826
- }
1827
- b.preventDefault(), r?.(_);
1828
- }, y = u.map(p, (b) => `bc-icon--${b}`), g = ({ index: b, counter: D }) => I.span(
1829
- a.class("bc-rating-input__icon-container"),
1830
- a.class(y),
1831
- z(
1832
- { icon: o, size: p, color: l, tone: "soft" },
1833
- a.class("bc-rating-input__icon-empty")
1834
- ),
1835
- I.span(
1836
- a.class("bc-rating-input__icon-clipper"),
1837
- a.class(y),
1838
- dt.width(
1839
- u.map(e, (k) => {
1840
- const _ = Math.floor(k);
1841
- return _ > b ? "100%" : _ < b ? "0%" : `${(k - b) * 100}%`;
1842
- })
1843
- ),
1844
- z(
1845
- { icon: i, size: p, color: c, tone: "soft" },
1846
- a.class("bc-rating-input__icon-full")
1847
- )
1848
- ),
1849
- C.click(
1850
- ne((k) => x(k, D), {
1851
- preventDefault: !0,
1852
- stopPropagation: !0
1853
- })
1854
- )
1855
- );
1856
- return O({
1857
- baseContainer: !0,
1858
- growInput: !1,
1859
- focusableSelector: '[role="slider"]',
1860
- ...t,
1861
- input: I.div(
1862
- // Common input attributes (id, required, invalid, custom classes, etc.)
1863
- j(t),
1864
- a.class("bc-rating-input"),
1865
- // ARIA slider semantics
1866
- a.role("slider"),
1867
- a.tabindex(u.map(n ?? !1, (b) => b ? -1 : 0)),
1868
- N.disabled(n ?? !1),
1869
- N.valuemin(0),
1870
- N.valuemax(u.map(s, (b) => b ?? 0)),
1871
- N.valuenow(u.map(e, (b) => b ?? 0)),
1872
- N.valuetext(
1873
- L(
1874
- e,
1875
- s
1876
- )((b, D) => {
1877
- const k = b ?? 0, _ = D ?? 0;
1878
- return `${String(k)} / ${String(_)}`;
1879
- })
1880
- ),
1881
- // Keyboard & focus handlers
1882
- C.keydown(h),
1883
- m != null ? C.blur(m) : null,
1884
- Pt(s, g)
1885
- )
1886
- });
1887
- }, Sn = (t) => {
1888
- const { value: e, onChange: r, onBlur: n, after: s, disabled: c, ...l } = t, i = Y(e, c, r);
1889
- return Ge({
1890
- ...l,
1891
- // Map null -> 0 for display so the control shows as empty when null
1892
- value: u.map(e, (o) => o ?? 0),
1893
- // Pass through numeric changes; clear button will call onChange(null)
1894
- onChange: r,
1895
- onBlur: n,
1896
- after: s != null ? V(i, s) : i
1897
- });
1898
- }, Tn = (t) => {
1899
- const { value: e, step: r, min: n, max: s, onBlur: c, onChange: l, onInput: i } = t;
1900
- return O({
1901
- ...t,
1902
- // Make sure clicks anywhere focus the range input
1903
- focusableSelector: 'input[type="range"]',
1904
- input: I.input(
1905
- a.type("range"),
1906
- j(t),
1907
- a.min(n),
1908
- a.max(s),
1909
- a.step(r),
1910
- // Using value as number to keep it in sync
1911
- a.valueAsNumber(e),
1912
- a.class("bc-input bc-slider-input"),
1913
- c != null ? C.blur(G(c)) : T,
1914
- l != null ? C.change(G(l)) : T,
1915
- i != null ? C.input(G(i)) : T
1916
- )
1917
- });
1918
- }, An = (t) => {
1919
- const { value: e, step: r, min: n, max: s, onBlur: c, onChange: l, onInput: i } = t, o = u.map(e, (m) => {
1920
- if (m != null) return m;
1921
- const f = n != null ? u.get(n) : void 0;
1922
- return typeof f == "number" ? f : 0;
1923
- }), p = Y(e, t.disabled, (m) => {
1924
- l?.(m);
1925
- });
1926
- return O(
1927
- {
1928
- ...t,
1929
- focusableSelector: 'input[type="range"]',
1930
- after: p,
1931
- input: I.input(
1932
- a.type("range"),
1933
- j(t),
1934
- a.min(n),
1935
- a.max(s),
1936
- a.step(r),
1937
- a.valueAsNumber(o),
1938
- a.class("bc-input bc-slider-input"),
1939
- c != null ? C.blur(G(c)) : T,
1940
- l != null ? C.change(
1941
- G((m) => {
1942
- l(m);
1943
- })
1944
- ) : T,
1945
- i != null ? C.input(
1946
- G((m) => {
1947
- i(m);
1948
- })
1949
- ) : T
1950
- )
1951
- },
1952
- // Ensure container grows input naturally
1953
- V()
1954
- );
1955
- };
1956
- let wt = null;
1957
- async function Mt() {
1958
- const t = globalThis;
1959
- return t.Temporal ? t.Temporal : (wt || (wt = import("./index.esm-DPNh6inz.js").then((e) => {
1960
- const r = e.Temporal;
1961
- return t.Temporal || (t.Temporal = r), r;
1962
- })), wt);
1963
- }
1964
- const Qe = (t, e) => e ? Bt(Mt, {
1965
- then: t,
1966
- pending: e.pending,
1967
- error: e.error
1968
- }) : Bt(Mt, t), Je = /^P(\d+([YMWD]|$)){0,4}(T(\d+([HMS]|$)){0,3})?$/i, Ke = /^P(?:(\d+Y)?(\d+M)?(\d+W)?(\d+D)?)(T(\d+H)?(\d+M)?(\d+S)?)?$/i;
1969
- function tn(t) {
1970
- return {
1971
- mask: null,
1972
- allowMode: "custom",
1973
- allow: (e) => /[0-9ptwdhms]/i.test(e),
1974
- pipe: (e) => {
1975
- const r = e.toUpperCase();
1976
- return r.length === 0 ? r : !r.startsWith("P") || !Je.test(r) ? !1 : r;
1977
- },
1978
- completion: {
1979
- mode: "custom",
1980
- isComplete: (e) => {
1981
- const r = e.toUpperCase();
1982
- if (!Ke.test(r)) return !1;
1983
- try {
1984
- return t(r), !0;
1985
- } catch {
1986
- return !1;
1987
- }
1988
- }
1989
- }
1990
- };
1991
- }
1992
- const Ot = (t, e) => {
1993
- if (t == null) return null;
1994
- try {
1995
- return t.Duration.from(e);
1996
- } catch {
1997
- return null;
1998
- }
1999
- }, Fn = (t) => {
2000
- const { value: e, onChange: r, after: n, disabled: s, onBlur: c } = t, l = () => {
2001
- const p = Y(e, s, r);
2002
- return n != null ? V(p, n) : p;
2003
- }, i = t.placeholder != null ? T : a.placeholder("P0DT0H0M0S");
2004
- return Qe(
2005
- (p) => Xt({
2006
- ...t,
2007
- value: u.map(e, (m) => m?.toString() ?? ""),
2008
- onChange: r ? (m) => r(m === "" ? null : p.Duration.from(m)) : void 0,
2009
- onInput: void 0,
2010
- ...tn(p.Duration.from),
2011
- placeholder: "P0DT0H0M0S",
2012
- after: l()
2013
- }),
2014
- { pending: () => O({
2015
- ...t,
2016
- input: K.text(
2017
- j(t),
2018
- a.value(u.map(e, (p) => p?.toString() ?? "")),
2019
- a.class("bc-input"),
2020
- i,
2021
- c != null ? C.blur(() => c()) : T,
2022
- r != null ? C.change((p) => {
2023
- const f = p.currentTarget?.value ?? "";
2024
- if (f === "") {
2025
- r(null);
2026
- return;
2027
- }
2028
- const v = globalThis.Temporal, d = Ot(v, f);
2029
- if (d != null) {
2030
- r(d);
2031
- return;
2032
- }
2033
- Mt().then((x) => {
2034
- const h = Ot(x, f);
2035
- h != null && r(h);
2036
- }).catch(() => {
2037
- });
2038
- }) : T
2039
- ),
2040
- after: l()
2041
- }) }
2042
- );
2043
- }, en = (t) => {
2044
- const { value: e, onBlur: r, onChange: n, onInput: s } = t;
2045
- return O({
2046
- ...t,
2047
- input: K.url(
2048
- j(t),
2049
- a.value(e),
2050
- a.class("bc-input"),
2051
- r != null ? C.blur(P(r)) : T,
2052
- n != null ? C.change(P(n)) : T,
2053
- s != null ? C.input(P(s)) : T
2054
- )
2055
- });
2056
- }, Bn = (t) => {
2057
- const { value: e, onBlur: r, onChange: n, onInput: s, after: c, disabled: l, ...i } = t, o = Y(e, l, n);
2058
- return en({
2059
- ...i,
2060
- value: u.map(e, nt),
2061
- onChange: n != null ? (p) => n(Z(p)) : void 0,
2062
- onInput: s != null ? (p) => s(Z(p)) : void 0,
2063
- onBlur: r,
2064
- after: c != null ? V(o, c) : o
2065
- });
2066
- }, nn = (t) => {
2067
- const {
2068
- controller: e,
2069
- element: r,
2070
- separator: n,
2071
- showMove: s = !0,
2072
- showRemove: c = !0,
2073
- showAdd: l = !0,
2074
- createItem: i,
2075
- addLabel: o,
2076
- controlsLayout: p = "aside",
2077
- removeDisabled: m,
2078
- addDisabled: f
2079
- } = t, v = u.toSignal(p).map((h) => h === "aside"), d = (h) => {
2080
- const y = E(
2081
- s ?? !1,
2082
- () => I.div(
2083
- a.class("bc-group--align-center"),
2084
- a.class(
2085
- v.map(
2086
- (b) => b ? "bc-group--direction-column bc-group--gap-1" : "bc-group--direction-row bc-group--gap-1"
2087
- )
2088
- ),
2089
- gt(
2090
- {
2091
- size: "xs",
2092
- roundedness: "full",
2093
- variant: "text",
2094
- onClick: () => h.move("up"),
2095
- disabled: h.cannotMove("up")
2096
- },
2097
- H(
2098
- X,
2099
- (b) => z({
2100
- size: "xs",
2101
- icon: "line-md:arrow-up",
2102
- title: b.$.incrementValue
2103
- })
2104
- )
2105
- ),
2106
- gt(
2107
- {
2108
- size: "xs",
2109
- roundedness: "full",
2110
- variant: "text",
2111
- onClick: () => h.move("down"),
2112
- disabled: h.cannotMove("down")
2113
- },
2114
- H(
2115
- X,
2116
- (b) => z({
2117
- size: "xs",
2118
- icon: "line-md:arrow-down",
2119
- title: b.$.decrementValue
2120
- })
2121
- )
2122
- )
2123
- )
2124
- ), g = E(
2125
- c,
2126
- () => H(
2127
- X,
2128
- (b) => $t({
2129
- size: "xs",
2130
- // Use a lowercase label to satisfy tests that query with [aria-label*="remove"]
2131
- label: u.map(b.$.removeItem, (D) => D.toLowerCase()),
2132
- color: "danger",
2133
- disabled: m,
2134
- onClick: h.remove
2135
- })
2136
- )
2137
- );
2138
- return (b) => E(
2139
- v,
2140
- () => pt(
2141
- a.class("bc-group--gap-1 bc-group--align-center"),
2142
- ct(a.class("bc-stack--grow"), b),
2143
- ct(
2144
- a.class("bc-stack--align-center"),
2145
- E(
2146
- e.signal.map((D) => D.length > 1),
2147
- () => y
2148
- ),
2149
- g
2150
- )
2151
- ),
2152
- () => ct(
2153
- a.class("bc-stack--gap-2"),
2154
- b,
2155
- pt(
2156
- a.class("bc-group--gap-2 bc-group--justify-between"),
2157
- E(
2158
- e.signal.map((D) => D.length > 1),
2159
- () => y,
2160
- () => I.div()
2161
- ),
2162
- g
2163
- )
2164
- )
2165
- );
2166
- }, x = E(
2167
- L(l, i)((h, y) => h && y != null),
2168
- () => pt(
2169
- a.class(
2170
- "bc-group--gap-2 bc-group--align-center bc-group--justify-center"
2171
- ),
2172
- gt(
2173
- {
2174
- size: "sm",
2175
- variant: "filled",
2176
- onClick: () => e.push(i()),
2177
- disabled: L(
2178
- e.disabled,
2179
- f ?? !1
2180
- )(
2181
- (h, y) => h || y
2182
- )
2183
- },
2184
- H(
2185
- X,
2186
- (h) => pt(
2187
- a.class("bc-group--gap-2"),
2188
- z({ icon: "line-md:plus" }),
2189
- o ?? h.$.addLabel
2190
- )
2191
- )
2192
- )
2193
- )
2194
- );
2195
- return V(
2196
- Oe(
2197
- e,
2198
- (h) => d(h)(r(h)),
2199
- n
2200
- ),
2201
- x
2202
- );
2203
- }, Vn = (t, ...e) => {
2204
- const {
2205
- controller: r,
2206
- element: n,
2207
- separator: s,
2208
- showMove: c,
2209
- showRemove: l,
2210
- showAdd: i,
2211
- createItem: o,
2212
- addLabel: p,
2213
- controlsLayout: m,
2214
- removeDisabled: f,
2215
- addDisabled: v,
2216
- ...d
2217
- } = t;
2218
- return Ht(
2219
- {
2220
- ...d,
2221
- content: nn({
2222
- controller: r,
2223
- element: n,
2224
- separator: s,
2225
- showMove: c,
2226
- showRemove: l,
2227
- showAdd: i,
2228
- createItem: o,
2229
- addLabel: p,
2230
- controlsLayout: m,
2231
- removeDisabled: f,
2232
- addDisabled: v
2233
- })
2234
- },
2235
- ...e
2236
- );
2237
- };
2238
- class Ln extends bt {
2239
- branches;
2240
- activeBranch;
2241
- #e;
2242
- #t = /* @__PURE__ */ new Map();
2243
- constructor(e, r, n, s, c, l, i = lt) {
2244
- super(e, r, n, s, c, i), this.branches = l;
2245
- const o = (m) => {
2246
- for (const f of l)
2247
- if (f.detect(m))
2248
- return f.key;
2249
- return l[0]?.key ?? "unknown";
2250
- };
2251
- this.activeBranch = n.map(o, lt);
2252
- const p = (m) => {
2253
- if (this.#t.has(m))
2254
- return this.#t.get(m);
2255
- const f = l.find((d) => d.key === m);
2256
- if (!f)
2257
- throw new Error(`Unknown branch: ${m}`);
2258
- const v = new bt(
2259
- [...e, m],
2260
- (d) => {
2261
- this.change(d);
2262
- },
2263
- this.signal.map(
2264
- (d) => f.detect(d) ? d : f.defaultValue(),
2265
- i
2266
- ),
2267
- s.map(Lt([m])),
2268
- {
2269
- disabled: this.disabled,
2270
- validationMode: this.parent.validationMode
2271
- },
2272
- i
2273
- );
2274
- return this.#t.set(m, v), v;
2275
- };
2276
- this.#e = this.activeBranch.map(
2277
- (m) => p(m),
2278
- lt
2279
- ), this.onDispose(() => {
2280
- for (const m of this.#t.values())
2281
- m.dispose();
2282
- this.#t.clear(), this.activeBranch.dispose(), this.#e.dispose();
2283
- });
2284
- }
2285
- /**
2286
- * Get the controller for the currently active branch
2287
- */
2288
- get activeController() {
2289
- return u.get(this.#e);
2290
- }
2291
- /**
2292
- * Get a controller for a specific branch
2293
- */
2294
- getBranchController(e) {
2295
- const r = this.branches.find((s) => s.key === e);
2296
- if (!r)
2297
- throw new Error(`Unknown branch: ${e}`);
2298
- if (this.#t.has(e))
2299
- return this.#t.get(e);
2300
- const n = new bt(
2301
- [...this.path, e],
2302
- (s) => {
2303
- this.change(s);
2304
- },
2305
- this.signal.map(
2306
- (s) => r.detect(s) ? s : r.defaultValue(),
2307
- lt
2308
- ),
2309
- this.status.map(Lt([e])),
2310
- {
2311
- disabled: this.disabled,
2312
- validationMode: this.parent.validationMode
2313
- },
2314
- lt
2315
- );
2316
- return this.#t.set(e, n), n;
2317
- }
2318
- /**
2319
- * Switch to a different branch
2320
- */
2321
- switchToBranch(e, r = !1) {
2322
- const n = this.branches.find((l) => l.key === e);
2323
- if (!n)
2324
- throw new Error(`Unknown branch: ${e}`);
2325
- const s = u.get(this.signal);
2326
- if (n.detect(s))
2327
- return !0;
2328
- if (n.convert) {
2329
- const l = n.convert(s);
2330
- if (l.ok)
2331
- return this.change(l.value), !0;
2332
- }
2333
- if (r && typeof window == "object" && typeof window.confirm == "function" && !window.confirm(
2334
- "Changing type will clear the current value. Continue?"
2335
- ))
2336
- return !1;
2337
- const c = n.defaultValue();
2338
- return this.change(c), !0;
2339
- }
2340
- /**
2341
- * Get the current active branch definition
2342
- */
2343
- get activeBranchDefinition() {
2344
- const e = u.get(this.activeBranch);
2345
- return this.branches.find((r) => r.key === e);
2346
- }
2347
- }
2348
- function En(t) {
2349
- return t.transform(
2350
- (e) => e ?? null,
2351
- (e) => e ?? void 0
2352
- );
2353
- }
2354
- function Un(t) {
2355
- return t.transform(
2356
- (e) => e ?? "",
2357
- (e) => e === "" ? void 0 : e
2358
- );
2359
- }
2360
- function Nn(t) {
2361
- return t.transform(
2362
- (e) => e ?? void 0,
2363
- (e) => e ?? null
2364
- );
2365
- }
2366
- export {
2367
- Sn as A,
2368
- nn as B,
2369
- mn as C,
2370
- Tn as D,
2371
- Ee as E,
2372
- ye as F,
2373
- pt as G,
2374
- An as H,
2375
- Fn as I,
2376
- en as J,
2377
- Bn as K,
2378
- Vn as L,
2379
- Xt as M,
2380
- ze as N,
2381
- gn as O,
2382
- hn as P,
2383
- Ue as Q,
2384
- Ge as R,
2385
- dn as S,
2386
- Ze as T,
2387
- Et as U,
2388
- Mt as V,
2389
- Qe as W,
2390
- un as X,
2391
- pn as _,
2392
- Y as a,
2393
- Ln as b,
2394
- Un as c,
2395
- tn as d,
2396
- Z as e,
2397
- Nn as f,
2398
- fn as g,
2399
- $e as h,
2400
- Me as i,
2401
- bn as j,
2402
- Oe as k,
2403
- Re as l,
2404
- vn as m,
2405
- nt as n,
2406
- xn as o,
2407
- wn as p,
2408
- yn as q,
2409
- $n as r,
2410
- kn as s,
2411
- En as t,
2412
- _n as u,
2413
- In as v,
2414
- Cn as w,
2415
- Mn as x,
2416
- Ye as y,
2417
- Dn as z
2418
- };