@tempots/beatui 0.51.0 → 0.51.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.
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +991 -983
- package/dist/types/components/data/page-drop-zone.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { prop as G, html as
|
|
1
|
+
import { prop as G, html as d, attr as s, computedOf as S, Fragment as E, OnDispose as Y, When as J, Value as m, Use as ne, Empty as R, input as se, on as $, emitValue as W, WithElement as ae, style as C, aria as B, OneOfValue as sn, Unless as ln, coalesce as Te, ForEach as _e, Ensure as Ye, OneOfType as Dt, dataAttr as nt, NotEmpty as on, emitValueAsDate as cn, Portal as at, makeProviderMark as Pt, WithBrowserCtx as un, renderWithContext as dn, WithProvider as fn, Task as pn, Provide as Lt, MapSignal as At, svg as ut, svgAttr as dt } from "@tempots/dom";
|
|
2
2
|
import { Use as ss } from "@tempots/dom";
|
|
3
3
|
import { PopOver as bn, ElementRect as Ee, WindowSize as gn, Query as mn, Location as Ve, NavigationService as hn, Anchor as rt } from "@tempots/ui";
|
|
4
4
|
import { i as ce, t as we, h as ft, e as de, a as fe, I as ee, b as te, C as le, B as pt, c as ze, L as st, j as bt, k as gt } from "./translations-DoBmuZ5v.js";
|
|
@@ -115,7 +115,7 @@ function qa({
|
|
|
115
115
|
circle: r = !1,
|
|
116
116
|
fullWidth: l = !1
|
|
117
117
|
}, ...i) {
|
|
118
|
-
return
|
|
118
|
+
return d.span(
|
|
119
119
|
s.class(
|
|
120
120
|
S(
|
|
121
121
|
t,
|
|
@@ -123,11 +123,11 @@ function qa({
|
|
|
123
123
|
r,
|
|
124
124
|
l
|
|
125
125
|
)(
|
|
126
|
-
(u, c, o,
|
|
126
|
+
(u, c, o, f) => Pn(
|
|
127
127
|
u ?? "md",
|
|
128
128
|
c ?? "sm",
|
|
129
129
|
o ?? !1,
|
|
130
|
-
|
|
130
|
+
f ?? !1
|
|
131
131
|
)
|
|
132
132
|
)
|
|
133
133
|
),
|
|
@@ -142,7 +142,7 @@ function qa({
|
|
|
142
142
|
)
|
|
143
143
|
)
|
|
144
144
|
),
|
|
145
|
-
|
|
145
|
+
d.span(s.class("bc-badge__content"), ...i)
|
|
146
146
|
);
|
|
147
147
|
}
|
|
148
148
|
function Za({
|
|
@@ -154,37 +154,45 @@ function Za({
|
|
|
154
154
|
}) {
|
|
155
155
|
const l = G(!1), i = G([]);
|
|
156
156
|
let u = 0;
|
|
157
|
-
const c = (
|
|
158
|
-
if (
|
|
159
|
-
if (
|
|
160
|
-
const
|
|
161
|
-
return
|
|
157
|
+
const c = (b) => b.dataTransfer?.types.includes("Files") ?? !1, o = (b, w) => w === "*/*" ? !0 : w.split(",").map((k) => k.trim()).some((k) => {
|
|
158
|
+
if (k === "*/*") return !0;
|
|
159
|
+
if (k.endsWith("/*")) {
|
|
160
|
+
const T = k.slice(0, -2);
|
|
161
|
+
return b.type.startsWith(T + "/");
|
|
162
162
|
}
|
|
163
|
-
return
|
|
164
|
-
}),
|
|
165
|
-
m.get(r) || c(
|
|
166
|
-
},
|
|
167
|
-
m.get(r) || c(
|
|
168
|
-
}, x = (
|
|
169
|
-
m.get(r) || c(
|
|
170
|
-
},
|
|
171
|
-
if (m.get(r) || !c(
|
|
172
|
-
|
|
173
|
-
const
|
|
174
|
-
if (
|
|
175
|
-
const
|
|
176
|
-
(
|
|
163
|
+
return b.type === k || b.name.endsWith(k);
|
|
164
|
+
}), f = (b) => {
|
|
165
|
+
m.get(r) || c(b) && (b.preventDefault(), b.stopPropagation(), u++, u === 1 && (l.value = !0));
|
|
166
|
+
}, p = (b) => {
|
|
167
|
+
m.get(r) || c(b) && (b.preventDefault(), b.stopPropagation(), b.dataTransfer != null && (b.dataTransfer.dropEffect = "copy"));
|
|
168
|
+
}, x = (b) => {
|
|
169
|
+
m.get(r) || c(b) && (b.preventDefault(), b.stopPropagation(), u--, u === 0 && (l.value = !1));
|
|
170
|
+
}, v = (b) => {
|
|
171
|
+
if (m.get(r) || !c(b)) return;
|
|
172
|
+
b.preventDefault(), b.stopPropagation(), u = 0, l.value = !1;
|
|
173
|
+
const w = Array.from(b.dataTransfer?.files ?? []);
|
|
174
|
+
if (w.length > 0) {
|
|
175
|
+
const g = m.get(t), k = w.filter(
|
|
176
|
+
(T) => o(T, g)
|
|
177
177
|
);
|
|
178
|
-
|
|
178
|
+
k.length > 0 && (i.value = k, e(k));
|
|
179
179
|
}
|
|
180
180
|
};
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
181
|
+
typeof document < "u" && (document.addEventListener("dragenter", f), document.addEventListener("dragover", p), document.addEventListener("dragleave", x), document.addEventListener("drop", v));
|
|
182
|
+
const y = () => {
|
|
183
|
+
typeof document < "u" && (document.removeEventListener("dragenter", f), document.removeEventListener("dragover", p), document.removeEventListener("dragleave", x), document.removeEventListener("drop", v)), u = 0;
|
|
184
|
+
}, h = () => {
|
|
185
|
+
const b = document.createElement("input");
|
|
186
|
+
b.type = "file", b.multiple = !0, b.accept = m.get(t), b.style.display = "none", document.body.appendChild(b), b.addEventListener("change", () => {
|
|
187
|
+
const w = Array.from(b.files ?? []);
|
|
188
|
+
w.length > 0 && (i.value = w, e(w)), document.body.removeChild(b);
|
|
189
|
+
}), b.click();
|
|
190
|
+
};
|
|
191
|
+
return E(
|
|
192
|
+
Y(y, l, i),
|
|
185
193
|
// Render overlay content to body when dragging (if content is provided)
|
|
186
194
|
n != null ? J(l, () => n({ files: i })) : null,
|
|
187
|
-
a != null ? a({ isDragging: l, files: i }) : null
|
|
195
|
+
a != null ? a({ isDragging: l, files: i, selectFiles: h }) : null
|
|
188
196
|
);
|
|
189
197
|
}
|
|
190
198
|
function An(e, t, n, a, r, l) {
|
|
@@ -206,7 +214,7 @@ function Ga({
|
|
|
206
214
|
withRowBorders: u = !0,
|
|
207
215
|
borderRadius: c
|
|
208
216
|
} = {}, ...o) {
|
|
209
|
-
const
|
|
217
|
+
const f = S(
|
|
210
218
|
e,
|
|
211
219
|
t,
|
|
212
220
|
n,
|
|
@@ -214,29 +222,29 @@ function Ga({
|
|
|
214
222
|
i,
|
|
215
223
|
u
|
|
216
224
|
)(
|
|
217
|
-
(
|
|
218
|
-
|
|
219
|
-
v ?? !1,
|
|
220
|
-
d ?? !1,
|
|
225
|
+
(v, y, h, b, w, g) => An(
|
|
226
|
+
v ?? "md",
|
|
221
227
|
y ?? !1,
|
|
228
|
+
h ?? !1,
|
|
229
|
+
b ?? !1,
|
|
222
230
|
w ?? !1,
|
|
223
|
-
|
|
231
|
+
g ?? !0
|
|
224
232
|
)
|
|
225
|
-
),
|
|
233
|
+
), p = S(
|
|
226
234
|
n,
|
|
227
235
|
a,
|
|
228
236
|
l
|
|
229
|
-
)((
|
|
230
|
-
const
|
|
231
|
-
return
|
|
237
|
+
)((v, y, h) => {
|
|
238
|
+
const b = ["bc-table-container"];
|
|
239
|
+
return v && b.push("bc-table-container--sticky"), y && b.push("bc-table-container--full-width"), h && b.push("bc-table-container--with-table-border"), b.join(" ");
|
|
232
240
|
}), x = S(c)(
|
|
233
|
-
(
|
|
241
|
+
(v) => Bn(v)
|
|
234
242
|
);
|
|
235
|
-
return
|
|
236
|
-
Y(
|
|
237
|
-
s.class(
|
|
243
|
+
return d.div(
|
|
244
|
+
Y(f, p, x),
|
|
245
|
+
s.class(p),
|
|
238
246
|
s.style(x),
|
|
239
|
-
|
|
247
|
+
d.table(s.class(f), ...o)
|
|
240
248
|
);
|
|
241
249
|
}
|
|
242
250
|
function Vn(e, t) {
|
|
@@ -263,7 +271,7 @@ const jt = ({
|
|
|
263
271
|
size: a = "md",
|
|
264
272
|
class: r,
|
|
265
273
|
disabled: l
|
|
266
|
-
}) =>
|
|
274
|
+
}) => d.span(
|
|
267
275
|
s.class(
|
|
268
276
|
S(
|
|
269
277
|
a ?? "md",
|
|
@@ -277,7 +285,7 @@ const jt = ({
|
|
|
277
285
|
),
|
|
278
286
|
// Allow external classes like bc-tag--disabled to be applied
|
|
279
287
|
s.class(r),
|
|
280
|
-
|
|
288
|
+
d.span(e),
|
|
281
289
|
n != null ? ne(
|
|
282
290
|
fe,
|
|
283
291
|
(i) => qe(
|
|
@@ -302,15 +310,15 @@ function En({
|
|
|
302
310
|
value: e,
|
|
303
311
|
disabled: n,
|
|
304
312
|
options: {
|
|
305
|
-
system:
|
|
313
|
+
system: d.span(
|
|
306
314
|
s.title("System"),
|
|
307
315
|
ee({ icon: "line-md:laptop", color: "gray" })
|
|
308
316
|
),
|
|
309
|
-
light:
|
|
317
|
+
light: d.span(
|
|
310
318
|
s.title("Light"),
|
|
311
319
|
ee({ icon: "line-md:sunny-twotone-loop", color: "yellow" })
|
|
312
320
|
),
|
|
313
|
-
dark:
|
|
321
|
+
dark: d.span(
|
|
314
322
|
s.title("Dark"),
|
|
315
323
|
ee({
|
|
316
324
|
icon: "line-md:sunny-outline-to-moon-alt-loop-transition",
|
|
@@ -336,16 +344,16 @@ function Nn({
|
|
|
336
344
|
onInput: n
|
|
337
345
|
}) {
|
|
338
346
|
let a = null;
|
|
339
|
-
return
|
|
347
|
+
return d.div(
|
|
340
348
|
s.class("bc-color-input__swatch-container"),
|
|
341
|
-
|
|
349
|
+
d.span(
|
|
342
350
|
s.class("bc-color-input__swatch"),
|
|
343
351
|
$.click(() => a?.showPicker()),
|
|
344
352
|
se.color(
|
|
345
353
|
ae((r) => (a = r, R)),
|
|
346
354
|
s.value(e),
|
|
347
|
-
|
|
348
|
-
|
|
355
|
+
C.width("4px"),
|
|
356
|
+
C.height("4px"),
|
|
349
357
|
t != null ? $.change(W(t)) : R,
|
|
350
358
|
n != null ? $.input(W(n)) : R
|
|
351
359
|
),
|
|
@@ -385,21 +393,21 @@ function Ze(e) {
|
|
|
385
393
|
showOn: u = "hover-focus",
|
|
386
394
|
closable: c = !0,
|
|
387
395
|
arrow: o,
|
|
388
|
-
role:
|
|
389
|
-
hasPopup:
|
|
396
|
+
role: f,
|
|
397
|
+
hasPopup: p = "dialog"
|
|
390
398
|
} = e;
|
|
391
|
-
return bn((x,
|
|
392
|
-
const
|
|
399
|
+
return bn((x, v) => {
|
|
400
|
+
const y = Me({
|
|
393
401
|
initialStatus: "closed"
|
|
394
|
-
}),
|
|
395
|
-
let w = null,
|
|
396
|
-
function
|
|
397
|
-
V != null && (clearTimeout(V), V = null), I != null && (clearTimeout(I), I = null),
|
|
402
|
+
}), h = he("flyout"), b = G(!1);
|
|
403
|
+
let w = null, g = null, k = !1;
|
|
404
|
+
function T() {
|
|
405
|
+
V != null && (clearTimeout(V), V = null), I != null && (clearTimeout(I), I = null), g && (g(), g = null), w && (document.removeEventListener("keydown", w), w = null), b.set(!1), k = !1;
|
|
398
406
|
}
|
|
399
407
|
function L() {
|
|
400
408
|
m.get(c) && (w = (F) => {
|
|
401
409
|
F.key === "Escape" && M();
|
|
402
|
-
}, document.addEventListener("keydown", w)),
|
|
410
|
+
}, document.addEventListener("keydown", w)), k = !0, b.set(!0), x({
|
|
403
411
|
placement: n ?? "top",
|
|
404
412
|
mainAxisOffset: l,
|
|
405
413
|
crossAxisOffset: i,
|
|
@@ -408,27 +416,27 @@ function Ze(e) {
|
|
|
408
416
|
},
|
|
409
417
|
arrow: o,
|
|
410
418
|
content: ae((F) => {
|
|
411
|
-
|
|
412
|
-
|
|
419
|
+
y.setElement(F), g = We(() => {
|
|
420
|
+
y.open(), g = null;
|
|
413
421
|
});
|
|
414
422
|
const O = (H) => {
|
|
415
|
-
m.get(c) && H.key === "Escape" && (H.preventDefault(), H.stopPropagation(), M(),
|
|
423
|
+
m.get(c) && H.key === "Escape" && (H.preventDefault(), H.stopPropagation(), M(), b.set(!1));
|
|
416
424
|
};
|
|
417
425
|
return document.addEventListener("keydown", O, !0), E(
|
|
418
426
|
Y(() => {
|
|
419
|
-
|
|
427
|
+
T(), document.removeEventListener("keydown", O, !0);
|
|
420
428
|
}),
|
|
421
429
|
s.class("bc-flyout-container"),
|
|
422
|
-
s.id(
|
|
430
|
+
s.id(h),
|
|
423
431
|
s.tabindex(-1),
|
|
424
432
|
// Make focusable for screen readers
|
|
425
|
-
|
|
433
|
+
d.div(
|
|
426
434
|
s.class("bc-flyout"),
|
|
427
435
|
tt({
|
|
428
436
|
animation: m.map(n, On),
|
|
429
|
-
status:
|
|
437
|
+
status: y.status
|
|
430
438
|
}),
|
|
431
|
-
|
|
439
|
+
f ? s.role(f) : s.role("dialog"),
|
|
432
440
|
// Default to dialog role
|
|
433
441
|
t()
|
|
434
442
|
)
|
|
@@ -438,10 +446,10 @@ function Ze(e) {
|
|
|
438
446
|
}
|
|
439
447
|
let V = null;
|
|
440
448
|
function P() {
|
|
441
|
-
if (V != null && (clearTimeout(V), V = null), I != null && (clearTimeout(I), I = null),
|
|
449
|
+
if (V != null && (clearTimeout(V), V = null), I != null && (clearTimeout(I), I = null), y.isOpened.value || y.isOpening.value || y.isStartOpening.value)
|
|
442
450
|
return;
|
|
443
|
-
if (
|
|
444
|
-
|
|
451
|
+
if (y.isClosing.value || y.isStartClosing.value) {
|
|
452
|
+
y.open();
|
|
445
453
|
return;
|
|
446
454
|
}
|
|
447
455
|
const F = m.get(a);
|
|
@@ -451,27 +459,27 @@ function Ze(e) {
|
|
|
451
459
|
}
|
|
452
460
|
let I = null;
|
|
453
461
|
function M() {
|
|
454
|
-
if (V != null && (clearTimeout(V), V = null), I != null && (clearTimeout(I), I = null),
|
|
455
|
-
|
|
462
|
+
if (V != null && (clearTimeout(V), V = null), I != null && (clearTimeout(I), I = null), b.set(!1), g && (g(), g = null, k)) {
|
|
463
|
+
v(), T();
|
|
456
464
|
return;
|
|
457
465
|
}
|
|
458
466
|
const F = m.get(r);
|
|
459
467
|
I = setTimeout(() => {
|
|
460
|
-
I = null,
|
|
461
|
-
|
|
468
|
+
I = null, y.close(), y.listenOnClosed(() => {
|
|
469
|
+
v(), T();
|
|
462
470
|
});
|
|
463
471
|
}, F);
|
|
464
472
|
}
|
|
465
473
|
return ae((F) => {
|
|
466
474
|
const O = () => {
|
|
467
|
-
P(),
|
|
475
|
+
P(), b.set(!0);
|
|
468
476
|
}, H = () => {
|
|
469
|
-
M(),
|
|
477
|
+
M(), b.set(!1);
|
|
470
478
|
}, oe = E(
|
|
471
|
-
B.expanded(
|
|
472
|
-
B.controls(
|
|
479
|
+
B.expanded(b),
|
|
480
|
+
B.controls(h),
|
|
473
481
|
B.haspopup(
|
|
474
|
-
|
|
482
|
+
p
|
|
475
483
|
)
|
|
476
484
|
);
|
|
477
485
|
if (typeof u == "function")
|
|
@@ -482,7 +490,7 @@ function Ze(e) {
|
|
|
482
490
|
const Q = u;
|
|
483
491
|
return E(
|
|
484
492
|
oe,
|
|
485
|
-
Y(
|
|
493
|
+
Y(b, y),
|
|
486
494
|
sn(Q, {
|
|
487
495
|
"hover-focus": () => E(
|
|
488
496
|
$.mouseenter(() => O()),
|
|
@@ -542,38 +550,38 @@ function Xa({
|
|
|
542
550
|
iconColor: u = "primary",
|
|
543
551
|
iconSize: c = "md",
|
|
544
552
|
backgroundColor: o,
|
|
545
|
-
borderColor:
|
|
546
|
-
titleColor:
|
|
553
|
+
borderColor: f,
|
|
554
|
+
titleColor: p,
|
|
547
555
|
descriptionColor: x
|
|
548
556
|
}) {
|
|
549
|
-
const
|
|
550
|
-
return
|
|
557
|
+
const v = l != null;
|
|
558
|
+
return d.div(
|
|
551
559
|
s.class(
|
|
552
560
|
S(
|
|
553
561
|
a,
|
|
554
562
|
r,
|
|
555
563
|
i
|
|
556
564
|
)(
|
|
557
|
-
(
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
565
|
+
(y, h, b) => Rn(
|
|
566
|
+
y ?? !1,
|
|
567
|
+
h ?? !1,
|
|
568
|
+
b ?? "md",
|
|
569
|
+
v
|
|
562
570
|
)
|
|
563
571
|
)
|
|
564
572
|
),
|
|
565
573
|
s.style(
|
|
566
574
|
S(
|
|
567
575
|
o,
|
|
576
|
+
f,
|
|
568
577
|
p,
|
|
569
|
-
g,
|
|
570
578
|
x
|
|
571
579
|
)(
|
|
572
|
-
(
|
|
580
|
+
(y, h, b, w) => Fn(y, h, b, w)
|
|
573
581
|
)
|
|
574
582
|
),
|
|
575
583
|
J(
|
|
576
|
-
|
|
584
|
+
v,
|
|
577
585
|
() => E(
|
|
578
586
|
ln(
|
|
579
587
|
r,
|
|
@@ -587,15 +595,15 @@ function Xa({
|
|
|
587
595
|
),
|
|
588
596
|
B.disabled(r),
|
|
589
597
|
// Icon container
|
|
590
|
-
|
|
598
|
+
d.div(
|
|
591
599
|
s.class("bc-action-card__icon"),
|
|
592
600
|
ee({ icon: e, size: c, color: u })
|
|
593
601
|
),
|
|
594
602
|
// Content container
|
|
595
|
-
|
|
603
|
+
d.div(
|
|
596
604
|
s.class("bc-action-card__content"),
|
|
597
|
-
|
|
598
|
-
|
|
605
|
+
d.div(s.class("bc-action-card__title"), t),
|
|
606
|
+
d.div(s.class("bc-action-card__description"), n)
|
|
599
607
|
)
|
|
600
608
|
);
|
|
601
609
|
}
|
|
@@ -637,14 +645,14 @@ function Ht(e, { breakpoints: t, mode: n = "viewport" }) {
|
|
|
637
645
|
([i, u]) => [u, i]
|
|
638
646
|
)].sort((i, u) => i[0] - u[0]), l = (i) => {
|
|
639
647
|
const u = i.map(({ width: o }) => {
|
|
640
|
-
const
|
|
641
|
-
return
|
|
648
|
+
const f = r.findIndex((p) => p[0] > o) - 1;
|
|
649
|
+
return f >= 0 ? { width: o, breakpoint: r[f][1] } : r.length > 0 && o >= r[0][0] ? { width: o, breakpoint: r[0][1] } : { width: o, breakpoint: r[0][1] };
|
|
642
650
|
});
|
|
643
651
|
return e({
|
|
644
652
|
value: u,
|
|
645
653
|
breakpoints: t,
|
|
646
654
|
asList: r,
|
|
647
|
-
is: (o,
|
|
655
|
+
is: (o, f) => Hn(r, o, f)
|
|
648
656
|
});
|
|
649
657
|
};
|
|
650
658
|
return n === "element" ? Ee(l) : gn(l);
|
|
@@ -702,10 +710,10 @@ function ye(e) {
|
|
|
702
710
|
(a) => de(a, "lighter", "dark")
|
|
703
711
|
);
|
|
704
712
|
return E(
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
713
|
+
C.variable("--panel-bg", t.$.backgroundColor),
|
|
714
|
+
C.variable("--panel-text", t.$.textColor),
|
|
715
|
+
C.variable("--panel-bg-dark", n.$.backgroundColor),
|
|
716
|
+
C.variable("--panel-text-dark", n.$.textColor)
|
|
709
717
|
);
|
|
710
718
|
}
|
|
711
719
|
const me = {
|
|
@@ -808,15 +816,15 @@ function Yn({
|
|
|
808
816
|
[null],
|
|
809
817
|
[null]
|
|
810
818
|
];
|
|
819
|
+
const f = [];
|
|
820
|
+
f.push("1fr");
|
|
811
821
|
const p = [];
|
|
812
|
-
p.push("
|
|
813
|
-
const g = [];
|
|
814
|
-
return a.banner && (g.push(a.banner[c] + "px"), o[0][1] = "banner"), (a.header || n.menu || n.aside) && (g.push(
|
|
822
|
+
return a.banner && (p.push(a.banner[c] + "px"), o[0][1] = "banner"), (a.header || n.menu || n.aside) && (p.push(
|
|
815
823
|
(a.header?.[c] ?? me.header[c]) + "px"
|
|
816
|
-
), o[1][1] = "header"), a.mainHeader && (
|
|
817
|
-
columns:
|
|
818
|
-
rows:
|
|
819
|
-
areas: o.map((
|
|
824
|
+
), o[1][1] = "header"), a.mainHeader && (p.push(a.mainHeader[c] + "px"), o[2][1] = "mainHeader"), p.push("1fr"), o[3][1] = "main", a.mainFooter && (p.push(a.mainFooter[c] + "px"), o[4][1] = "mainFooter"), a.footer && (p.push(a.footer[c] + "px"), o[5][1] = "footer"), o = Je(o), {
|
|
825
|
+
columns: f.join(" "),
|
|
826
|
+
rows: p.join(" "),
|
|
827
|
+
areas: o.map((v) => `"${v.join(" ")}"`).join(`
|
|
820
828
|
`),
|
|
821
829
|
displayMenu: !1,
|
|
822
830
|
displayAside: !1,
|
|
@@ -833,15 +841,15 @@ function Yn({
|
|
|
833
841
|
[null, null],
|
|
834
842
|
[null, null]
|
|
835
843
|
];
|
|
844
|
+
const f = [];
|
|
845
|
+
n.menu && (f.push(n.menu[c] + "px"), o[2][0] = "?menu", o[3][0] = "menu", o[4][0] = "?menu"), f.push("1fr");
|
|
836
846
|
const p = [];
|
|
837
|
-
|
|
838
|
-
const g = [];
|
|
839
|
-
return a.banner && (g.push(a.banner[c] + "px"), o[0][0] = "?banner", o[0][1] = "banner"), (a.header || n.aside) && (g.push(
|
|
847
|
+
return a.banner && (p.push(a.banner[c] + "px"), o[0][0] = "?banner", o[0][1] = "banner"), (a.header || n.aside) && (p.push(
|
|
840
848
|
(a.header?.[c] ?? me.header[c]) + "px"
|
|
841
|
-
), o[1][0] = "?header", o[1][1] = "header"), a.mainHeader && (
|
|
842
|
-
columns:
|
|
843
|
-
rows:
|
|
844
|
-
areas: o.map((
|
|
849
|
+
), o[1][0] = "?header", o[1][1] = "header"), a.mainHeader && (p.push(a.mainHeader[c] + "px"), o[2][1] = "mainHeader"), p.push("1fr"), o[3][1] = "main", a.mainFooter && (p.push(a.mainFooter[c] + "px"), o[4][1] = "mainFooter"), a.footer && (p.push(a.footer[c] + "px"), o[5][0] = "?footer", o[5][1] = "footer"), o = Je(o), {
|
|
850
|
+
columns: f.join(" "),
|
|
851
|
+
rows: p.join(" "),
|
|
852
|
+
areas: o.map((v) => `"${v.join(" ")}"`).join(`
|
|
845
853
|
`),
|
|
846
854
|
displayMenu: !0,
|
|
847
855
|
displayAside: !1,
|
|
@@ -858,13 +866,13 @@ function Yn({
|
|
|
858
866
|
[null, null, null],
|
|
859
867
|
[null, null, null]
|
|
860
868
|
];
|
|
869
|
+
const f = [];
|
|
870
|
+
n.menu && (f.push(n.menu[c] + "px"), o[2][0] = "?menu", o[3][0] = "menu", o[4][0] = "?menu"), f.push("1fr"), n.aside && (f.push(n.aside[c] + "px"), o[2][2] = "?aside", o[3][2] = "aside", o[4][2] = "?aside");
|
|
861
871
|
const p = [];
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
rows: g.join(" "),
|
|
867
|
-
areas: o.map((h) => `"${h.join(" ")}"`).join(`
|
|
872
|
+
return a.banner && (p.push(a.banner[c] + "px"), o[0][0] = "?banner", o[0][1] = "banner", o[0][2] = "?banner"), a.header && (p.push(a.header[c] + "px"), o[1][0] = "?header", o[1][1] = "header", o[1][2] = "?header"), a.mainHeader && (p.push(a.mainHeader[c] + "px"), o[2][1] = "mainHeader"), p.push("1fr"), o[3][1] = "main", a.mainFooter && (p.push(a.mainFooter[c] + "px"), o[4][1] = "mainFooter"), a.footer && (p.push(a.footer[c] + "px"), o[5][0] = "?footer", o[5][1] = "footer", o[5][2] = "?footer"), o = Je(o), {
|
|
873
|
+
columns: f.join(" "),
|
|
874
|
+
rows: p.join(" "),
|
|
875
|
+
areas: o.map((v) => `"${v.join(" ")}"`).join(`
|
|
868
876
|
`),
|
|
869
877
|
displayMenu: !0,
|
|
870
878
|
displayAside: !0,
|
|
@@ -919,90 +927,90 @@ function tr({
|
|
|
919
927
|
vertical: a,
|
|
920
928
|
horizontal: r,
|
|
921
929
|
is: u
|
|
922
|
-
}), o = i.map(c),
|
|
930
|
+
}), o = i.map(c), f = r.header != null || a.menu != null || a.aside != null, p = S(
|
|
923
931
|
a.aside != null,
|
|
924
932
|
o
|
|
925
|
-
)((
|
|
933
|
+
)((g, { displayAside: k }) => g && !k), x = S(
|
|
926
934
|
a.menu != null,
|
|
927
935
|
o
|
|
928
|
-
)((
|
|
936
|
+
)((g, { displayMenu: k }) => g && !k), v = Me(), y = Me(), h = G(0), b = S(
|
|
929
937
|
a.menu != null,
|
|
930
938
|
o,
|
|
931
|
-
|
|
939
|
+
v.display
|
|
932
940
|
)(Gn), w = S(
|
|
933
941
|
a.aside != null,
|
|
934
942
|
o,
|
|
935
|
-
|
|
943
|
+
y.display
|
|
936
944
|
)(Kn);
|
|
937
|
-
return
|
|
938
|
-
Y(
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
n.banner ?
|
|
945
|
+
return d.div(
|
|
946
|
+
Y(h, v, y, o),
|
|
947
|
+
C.display("grid"),
|
|
948
|
+
C.height("100%"),
|
|
949
|
+
C.width("100%"),
|
|
950
|
+
C.gridTemplateColumns(o.$.columns),
|
|
951
|
+
C.gridTemplateRows(o.$.rows),
|
|
952
|
+
C.gridTemplateAreas(o.$.areas),
|
|
953
|
+
C.gridColumnGap("0"),
|
|
954
|
+
C.gridRowGap("0"),
|
|
955
|
+
n.banner ? d.header(
|
|
948
956
|
s.class(
|
|
949
957
|
be("none", n.banner.shadow ?? "none")
|
|
950
958
|
),
|
|
951
959
|
ye(n.banner.color ?? "white"),
|
|
952
|
-
|
|
953
|
-
|
|
960
|
+
C.height("100%"),
|
|
961
|
+
C.gridArea("banner"),
|
|
954
962
|
n.banner.content
|
|
955
963
|
) : null,
|
|
956
|
-
|
|
964
|
+
d.header(
|
|
957
965
|
s.class(
|
|
958
966
|
be("bottom", n.header?.shadow ?? "none")
|
|
959
967
|
),
|
|
960
968
|
ye(n.header?.color ?? "white"),
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
Ee((
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
x.map((
|
|
969
|
+
C.zIndex("20"),
|
|
970
|
+
C.display(f ? "block" : "none"),
|
|
971
|
+
C.gridArea("header"),
|
|
972
|
+
Ee((g) => (g.$.bottom.feedProp(h), null)),
|
|
973
|
+
d.div(
|
|
974
|
+
C.display("flex"),
|
|
975
|
+
C.height("100%"),
|
|
976
|
+
d.div(
|
|
977
|
+
C.display(
|
|
978
|
+
x.map((g) => g ? "flex" : "none")
|
|
971
979
|
),
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
980
|
+
C.alignItems("center"),
|
|
981
|
+
C.justifyContent("center"),
|
|
982
|
+
C.height("100%"),
|
|
983
|
+
C.width("60px"),
|
|
976
984
|
pt(
|
|
977
985
|
{
|
|
978
|
-
onClick: () =>
|
|
986
|
+
onClick: () => v.toggle(),
|
|
979
987
|
variant: "light",
|
|
980
988
|
color: "base"
|
|
981
989
|
},
|
|
982
990
|
B.label(l.$.toggleMenu),
|
|
983
991
|
ee({
|
|
984
|
-
icon:
|
|
985
|
-
(
|
|
992
|
+
icon: v.display.map(
|
|
993
|
+
(g) => g ? "line-md/menu-to-close-alt-transition" : "line-md/close-to-menu-alt-transition"
|
|
986
994
|
)
|
|
987
995
|
})
|
|
988
996
|
)
|
|
989
997
|
),
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
998
|
+
d.div(
|
|
999
|
+
C.height("100%"),
|
|
1000
|
+
C.flexGrow("1"),
|
|
993
1001
|
n.header?.content
|
|
994
1002
|
),
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1003
|
+
d.div(
|
|
1004
|
+
C.alignItems("center"),
|
|
1005
|
+
C.justifyContent("center"),
|
|
1006
|
+
C.height("100%"),
|
|
1007
|
+
C.width("60px"),
|
|
1008
|
+
C.display(
|
|
1009
|
+
p.map((g) => g ? "flex" : "none")
|
|
1002
1010
|
),
|
|
1003
1011
|
pt(
|
|
1004
1012
|
{
|
|
1005
|
-
onClick: () =>
|
|
1013
|
+
onClick: () => y.toggle(),
|
|
1006
1014
|
roundedness: "full",
|
|
1007
1015
|
variant: "light",
|
|
1008
1016
|
color: "base"
|
|
@@ -1012,8 +1020,8 @@ function tr({
|
|
|
1012
1020
|
{ icon: "line-md/chevron-left" },
|
|
1013
1021
|
s.style("transition: transform 0.2s ease-in-out"),
|
|
1014
1022
|
s.style(
|
|
1015
|
-
|
|
1016
|
-
(
|
|
1023
|
+
y.display.map(
|
|
1024
|
+
(g) => `transform: rotate(${g ? 180 : 0}deg)`
|
|
1017
1025
|
)
|
|
1018
1026
|
)
|
|
1019
1027
|
)
|
|
@@ -1021,16 +1029,16 @@ function tr({
|
|
|
1021
1029
|
)
|
|
1022
1030
|
)
|
|
1023
1031
|
),
|
|
1024
|
-
n.menu ?
|
|
1025
|
-
ae((
|
|
1026
|
-
|
|
1032
|
+
n.menu ? d.nav(
|
|
1033
|
+
ae((g) => v.setElement(g)),
|
|
1034
|
+
C.zIndex("10"),
|
|
1027
1035
|
// Add ARIA attributes for navigation landmark
|
|
1028
1036
|
B.label(l.$.mainNavigation),
|
|
1029
1037
|
s.role("navigation"),
|
|
1030
|
-
|
|
1038
|
+
C.overflow("hidden"),
|
|
1031
1039
|
s.class(
|
|
1032
|
-
|
|
1033
|
-
(
|
|
1040
|
+
b.map(
|
|
1041
|
+
(g) => g === "float" ? be(
|
|
1034
1042
|
"right",
|
|
1035
1043
|
n.menu?.shadow ?? "md"
|
|
1036
1044
|
) : be(
|
|
@@ -1040,40 +1048,40 @@ function tr({
|
|
|
1040
1048
|
)
|
|
1041
1049
|
),
|
|
1042
1050
|
ye(n.menu?.color ?? "white"),
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
(
|
|
1051
|
+
C.height(
|
|
1052
|
+
b.map(
|
|
1053
|
+
(g) => g === "float" ? "auto" : "100%"
|
|
1046
1054
|
)
|
|
1047
1055
|
),
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1056
|
+
C.overflow("hidden"),
|
|
1057
|
+
C.gridArea("menu"),
|
|
1058
|
+
C.display(
|
|
1051
1059
|
S(
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
)((
|
|
1060
|
+
b,
|
|
1061
|
+
v.status
|
|
1062
|
+
)((g, k) => g === "none" && k === "closed" ? "none" : "block")
|
|
1055
1063
|
),
|
|
1056
|
-
|
|
1064
|
+
C.position(
|
|
1057
1065
|
S(
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
)((
|
|
1066
|
+
b,
|
|
1067
|
+
v.status
|
|
1068
|
+
)((g, k) => g === "float" || g === "none" && k !== "closed" ? "fixed" : "initial")
|
|
1061
1069
|
),
|
|
1062
|
-
|
|
1070
|
+
C.top(h.map((g) => `${g}px`)),
|
|
1063
1071
|
tt({
|
|
1064
1072
|
animation: { slide: "right" },
|
|
1065
1073
|
status: S(
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
)((
|
|
1074
|
+
b,
|
|
1075
|
+
v.status
|
|
1076
|
+
)((g, k) => g === "block" ? "opened" : k)
|
|
1069
1077
|
}),
|
|
1070
|
-
|
|
1071
|
-
|
|
1078
|
+
C.width(Te(n.menu?.width, o.$.menuWidth)),
|
|
1079
|
+
C.bottom("0"),
|
|
1072
1080
|
n.menu?.content
|
|
1073
1081
|
) : null,
|
|
1074
|
-
n.mainHeader ?
|
|
1075
|
-
|
|
1076
|
-
|
|
1082
|
+
n.mainHeader ? d.header(
|
|
1083
|
+
C.height("100%"),
|
|
1084
|
+
C.gridArea("mainHeader"),
|
|
1077
1085
|
s.class(
|
|
1078
1086
|
be(
|
|
1079
1087
|
"none",
|
|
@@ -1083,19 +1091,19 @@ function tr({
|
|
|
1083
1091
|
ye(n.mainHeader?.color ?? "white"),
|
|
1084
1092
|
n.mainHeader.content
|
|
1085
1093
|
) : null,
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1094
|
+
d.main(
|
|
1095
|
+
C.height("100%"),
|
|
1096
|
+
C.overflow("hidden"),
|
|
1097
|
+
C.gridArea("main"),
|
|
1090
1098
|
s.class(
|
|
1091
1099
|
be("none", n.main?.shadow ?? "none")
|
|
1092
1100
|
),
|
|
1093
1101
|
ye(n.main?.color ?? "white"),
|
|
1094
1102
|
n.main.content
|
|
1095
1103
|
),
|
|
1096
|
-
n.mainFooter ?
|
|
1097
|
-
|
|
1098
|
-
|
|
1104
|
+
n.mainFooter ? d.footer(
|
|
1105
|
+
C.height("100%"),
|
|
1106
|
+
C.gridArea("mainFooter"),
|
|
1099
1107
|
s.class(
|
|
1100
1108
|
be(
|
|
1101
1109
|
"none",
|
|
@@ -1105,53 +1113,53 @@ function tr({
|
|
|
1105
1113
|
ye(n.mainFooter?.color ?? "white"),
|
|
1106
1114
|
n.mainFooter.content
|
|
1107
1115
|
) : null,
|
|
1108
|
-
n.aside ?
|
|
1109
|
-
ae((
|
|
1110
|
-
|
|
1116
|
+
n.aside ? d.aside(
|
|
1117
|
+
ae((g) => {
|
|
1118
|
+
y.setElement(g);
|
|
1111
1119
|
}),
|
|
1112
|
-
|
|
1120
|
+
C.zIndex("10"),
|
|
1113
1121
|
// Add ARIA attributes for aside landmark
|
|
1114
1122
|
B.label(l.$.sidebar),
|
|
1115
1123
|
s.role("complementary"),
|
|
1116
1124
|
s.class(
|
|
1117
1125
|
w.map(
|
|
1118
|
-
(
|
|
1126
|
+
(g) => g === "float" ? be("left", "md") : be("left", "none")
|
|
1119
1127
|
)
|
|
1120
1128
|
),
|
|
1121
1129
|
ye("white"),
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1130
|
+
C.height("100%"),
|
|
1131
|
+
C.gridArea("aside"),
|
|
1132
|
+
C.display(
|
|
1125
1133
|
S(
|
|
1126
1134
|
w,
|
|
1127
|
-
|
|
1128
|
-
)((
|
|
1135
|
+
y.status
|
|
1136
|
+
)((g, k) => g === "none" && k === "closed" ? "none" : "block")
|
|
1129
1137
|
),
|
|
1130
|
-
|
|
1138
|
+
C.position(
|
|
1131
1139
|
S(
|
|
1132
1140
|
w,
|
|
1133
|
-
|
|
1134
|
-
)((
|
|
1141
|
+
y.status
|
|
1142
|
+
)((g, k) => g === "float" || g === "none" && k !== "closed" ? "fixed" : "initial")
|
|
1135
1143
|
),
|
|
1136
|
-
|
|
1144
|
+
C.top(h.map((g) => `${g}px`)),
|
|
1137
1145
|
tt({
|
|
1138
1146
|
animation: { slide: "left" },
|
|
1139
1147
|
status: S(
|
|
1140
1148
|
w,
|
|
1141
|
-
|
|
1142
|
-
)((
|
|
1149
|
+
y.status
|
|
1150
|
+
)((g, k) => g === "block" ? "opened" : k)
|
|
1143
1151
|
}),
|
|
1144
|
-
|
|
1152
|
+
C.width(
|
|
1145
1153
|
Te(n.aside?.width, o.$.asideWidth)
|
|
1146
1154
|
),
|
|
1147
|
-
|
|
1155
|
+
C.bottom(h.map((g) => `${g}px`)),
|
|
1148
1156
|
n.aside.content
|
|
1149
1157
|
) : null,
|
|
1150
|
-
n.footer ?
|
|
1158
|
+
n.footer ? d.footer(
|
|
1151
1159
|
s.class(be("top", "none")),
|
|
1152
1160
|
ye("white"),
|
|
1153
|
-
|
|
1154
|
-
|
|
1161
|
+
C.height("100%"),
|
|
1162
|
+
C.gridArea("footer"),
|
|
1155
1163
|
n.footer.content
|
|
1156
1164
|
) : null
|
|
1157
1165
|
);
|
|
@@ -1159,9 +1167,9 @@ function tr({
|
|
|
1159
1167
|
);
|
|
1160
1168
|
}
|
|
1161
1169
|
function nr(...e) {
|
|
1162
|
-
return
|
|
1170
|
+
return d.div(
|
|
1163
1171
|
s.class("bc-center-h"),
|
|
1164
|
-
|
|
1172
|
+
d.div(s.class("bc-center__content"), ...e)
|
|
1165
1173
|
);
|
|
1166
1174
|
}
|
|
1167
1175
|
function Qn(e) {
|
|
@@ -1169,7 +1177,7 @@ function Qn(e) {
|
|
|
1169
1177
|
return e !== "lg" && t.push(`bc-center--gap-${e}`), t.join(" ");
|
|
1170
1178
|
}
|
|
1171
1179
|
function ar({ gap: e = "lg" } = {}, ...t) {
|
|
1172
|
-
return
|
|
1180
|
+
return d.div(
|
|
1173
1181
|
s.class(S(e)((n) => Qn(n ?? "lg"))),
|
|
1174
1182
|
...t
|
|
1175
1183
|
);
|
|
@@ -1184,15 +1192,15 @@ function Xn({ open: e }, ...t) {
|
|
|
1184
1192
|
const u = G(null), c = S(
|
|
1185
1193
|
a,
|
|
1186
1194
|
i.$.height
|
|
1187
|
-
)((o,
|
|
1195
|
+
)((o, f) => o === "opened" && f > 0 ? f : null);
|
|
1188
1196
|
return c.on((o) => {
|
|
1189
1197
|
o != null && u.set(o);
|
|
1190
1198
|
}), a.on((o) => {
|
|
1191
1199
|
if (n && o === "start-opening") {
|
|
1192
|
-
const
|
|
1200
|
+
const f = n.style.height, p = n.style.transition;
|
|
1193
1201
|
n.style.transition = "none", n.style.height = "auto", n.offsetHeight;
|
|
1194
1202
|
const x = n.scrollHeight;
|
|
1195
|
-
x > 0 && u.set(x), n.style.height =
|
|
1203
|
+
x > 0 && u.set(x), n.style.height = f, n.style.transition = p, n.offsetHeight;
|
|
1196
1204
|
}
|
|
1197
1205
|
}), E(
|
|
1198
1206
|
Y(l, u, c),
|
|
@@ -1222,26 +1230,26 @@ function rr({
|
|
|
1222
1230
|
footer: u,
|
|
1223
1231
|
footerHeight: c = 0,
|
|
1224
1232
|
bottomStart: o,
|
|
1225
|
-
bottomEnd:
|
|
1226
|
-
sidebarStart:
|
|
1233
|
+
bottomEnd: f,
|
|
1234
|
+
sidebarStart: p,
|
|
1227
1235
|
sidebarStartWidth: x = 0,
|
|
1228
|
-
sidebarEnd:
|
|
1229
|
-
sidebarEndWidth:
|
|
1230
|
-
anchorMode:
|
|
1236
|
+
sidebarEnd: v,
|
|
1237
|
+
sidebarEndWidth: y = 0,
|
|
1238
|
+
anchorMode: h = "container-edge"
|
|
1231
1239
|
}) {
|
|
1232
|
-
const
|
|
1233
|
-
return
|
|
1240
|
+
const b = G(0n), w = G(0n), g = xt(r), k = xt(x), T = G(16);
|
|
1241
|
+
return d.div(
|
|
1234
1242
|
Y(
|
|
1235
|
-
|
|
1243
|
+
b.dispose,
|
|
1236
1244
|
w.dispose,
|
|
1237
|
-
|
|
1245
|
+
T.dispose
|
|
1238
1246
|
),
|
|
1239
1247
|
s.class("bc-nine-slice-container"),
|
|
1240
1248
|
Ee((L) => {
|
|
1241
1249
|
const V = S(
|
|
1242
1250
|
L.$.width,
|
|
1243
1251
|
x,
|
|
1244
|
-
|
|
1252
|
+
y
|
|
1245
1253
|
)((D, N, K) => D - N - K), P = S(
|
|
1246
1254
|
L.$.height,
|
|
1247
1255
|
r,
|
|
@@ -1255,11 +1263,11 @@ function rr({
|
|
|
1255
1263
|
)((D, N) => D > BigInt(N)), F = S(
|
|
1256
1264
|
V,
|
|
1257
1265
|
M,
|
|
1258
|
-
|
|
1266
|
+
T
|
|
1259
1267
|
)((D, N, K) => N ? D - K : D), O = S(
|
|
1260
1268
|
P,
|
|
1261
1269
|
I,
|
|
1262
|
-
|
|
1270
|
+
T
|
|
1263
1271
|
)((D, N, K) => N ? D - K : D), H = S(
|
|
1264
1272
|
t,
|
|
1265
1273
|
F
|
|
@@ -1267,59 +1275,59 @@ function rr({
|
|
|
1267
1275
|
n,
|
|
1268
1276
|
O
|
|
1269
1277
|
)((D, N) => Number(D / BigInt(Math.max(1, N)))), Q = m.map(
|
|
1270
|
-
|
|
1278
|
+
h,
|
|
1271
1279
|
(D) => D === "body-end" || D === "body-end-bottom"
|
|
1272
1280
|
), U = J(
|
|
1273
1281
|
Q,
|
|
1274
|
-
() =>
|
|
1282
|
+
() => C.left(
|
|
1275
1283
|
S(
|
|
1276
1284
|
x,
|
|
1277
1285
|
t,
|
|
1278
1286
|
F,
|
|
1279
|
-
|
|
1280
|
-
)((D, N, K,
|
|
1287
|
+
y
|
|
1288
|
+
)((D, N, K, _) => {
|
|
1281
1289
|
const A = D + Number(N), j = D + K, Z = Math.min(A, j);
|
|
1282
|
-
return `${Math.max(D +
|
|
1290
|
+
return `${Math.max(D + _, Z)}px`;
|
|
1283
1291
|
})
|
|
1284
1292
|
),
|
|
1285
|
-
() =>
|
|
1293
|
+
() => C.right("0")
|
|
1286
1294
|
), X = m.map(
|
|
1287
|
-
|
|
1295
|
+
h,
|
|
1288
1296
|
(D) => D === "body-bottom" || D === "body-end-bottom"
|
|
1289
1297
|
), pe = J(
|
|
1290
1298
|
X,
|
|
1291
|
-
() =>
|
|
1299
|
+
() => C.top(
|
|
1292
1300
|
S(
|
|
1293
1301
|
r,
|
|
1294
1302
|
n,
|
|
1295
1303
|
O,
|
|
1296
1304
|
c
|
|
1297
|
-
)((D, N, K,
|
|
1305
|
+
)((D, N, K, _) => {
|
|
1298
1306
|
const A = D + Number(N), j = D + K, Z = Math.min(A, j);
|
|
1299
|
-
return `${Math.max(D +
|
|
1307
|
+
return `${Math.max(D + _, Z)}px`;
|
|
1300
1308
|
})
|
|
1301
1309
|
),
|
|
1302
|
-
() =>
|
|
1310
|
+
() => C.bottom("0")
|
|
1303
1311
|
), Ne = S(
|
|
1304
1312
|
M,
|
|
1305
|
-
|
|
1313
|
+
T
|
|
1306
1314
|
)((D, N) => D ? `${N}px` : "0"), ue = S(
|
|
1307
1315
|
I,
|
|
1308
|
-
|
|
1309
|
-
)((D, N) => D ? `${N}px` : "0"), Oe =
|
|
1316
|
+
T
|
|
1317
|
+
)((D, N) => D ? `${N}px` : "0"), Oe = C.transform(
|
|
1310
1318
|
S(
|
|
1311
1319
|
w,
|
|
1312
|
-
|
|
1320
|
+
b,
|
|
1313
1321
|
I,
|
|
1314
1322
|
M
|
|
1315
|
-
)((D, N, K,
|
|
1316
|
-
const A = K ? `translateX(-${D}px)` : "", j =
|
|
1323
|
+
)((D, N, K, _) => {
|
|
1324
|
+
const A = K ? `translateX(-${D}px)` : "", j = _ ? `translateY(-${N}px)` : "";
|
|
1317
1325
|
return `${A} ${j}`.trim() || "none";
|
|
1318
1326
|
})
|
|
1319
|
-
), Re =
|
|
1327
|
+
), Re = C.transform(
|
|
1320
1328
|
w.map((D) => `translateX(-${D}px)`)
|
|
1321
|
-
), ke =
|
|
1322
|
-
|
|
1329
|
+
), ke = C.transform(
|
|
1330
|
+
b.map((D) => `translateY(-${D}px)`)
|
|
1323
1331
|
), Ae = S(
|
|
1324
1332
|
n,
|
|
1325
1333
|
O
|
|
@@ -1329,18 +1337,18 @@ function rr({
|
|
|
1329
1337
|
)((D, N) => D - BigInt(Math.max(1, N)));
|
|
1330
1338
|
let z = null, Se = 0, Ie = 0;
|
|
1331
1339
|
const Ge = () => {
|
|
1332
|
-
const D = Ae.value, N = Ce.value, K = M.value,
|
|
1340
|
+
const D = Ae.value, N = Ce.value, K = M.value, _ = I.value;
|
|
1333
1341
|
if (K && Ie !== 0) {
|
|
1334
1342
|
const A = yt(
|
|
1335
1343
|
Fe(0n, D),
|
|
1336
1344
|
Fe(
|
|
1337
1345
|
0n,
|
|
1338
|
-
|
|
1346
|
+
b.value + BigInt(Math.round(Ie))
|
|
1339
1347
|
)
|
|
1340
1348
|
);
|
|
1341
|
-
|
|
1349
|
+
b.set(A);
|
|
1342
1350
|
}
|
|
1343
|
-
if (
|
|
1351
|
+
if (_ && Se !== 0) {
|
|
1344
1352
|
const A = yt(
|
|
1345
1353
|
Fe(0n, N),
|
|
1346
1354
|
Fe(
|
|
@@ -1369,7 +1377,7 @@ function rr({
|
|
|
1369
1377
|
D || w.set(0n);
|
|
1370
1378
|
}),
|
|
1371
1379
|
M.on((D) => {
|
|
1372
|
-
D ||
|
|
1380
|
+
D || b.set(0n);
|
|
1373
1381
|
}),
|
|
1374
1382
|
Ae.dispose,
|
|
1375
1383
|
Ce.dispose,
|
|
@@ -1382,143 +1390,143 @@ function rr({
|
|
|
1382
1390
|
const { deltaX: N, deltaY: K } = D;
|
|
1383
1391
|
Se += N, Ie += K, z || (z = setTimeout(Ge, 16));
|
|
1384
1392
|
}),
|
|
1385
|
-
|
|
1393
|
+
d.div(
|
|
1386
1394
|
s.class("bc-nine-slice-pane-container"),
|
|
1387
|
-
|
|
1388
|
-
|
|
1395
|
+
C.right(Ne),
|
|
1396
|
+
C.bottom(ue),
|
|
1389
1397
|
// top-start corner
|
|
1390
|
-
l != null ?
|
|
1398
|
+
l != null ? d.div(
|
|
1391
1399
|
s.class("bc-nine-slice-pane bc-nine-slice-top-start"),
|
|
1392
|
-
|
|
1393
|
-
|
|
1400
|
+
C.top("0"),
|
|
1401
|
+
C.left("0"),
|
|
1394
1402
|
// style.height(headerHeightPx),
|
|
1395
1403
|
// style.width(sidebarStartWidthPx),
|
|
1396
1404
|
l
|
|
1397
1405
|
) : null,
|
|
1398
1406
|
// top-center
|
|
1399
|
-
a != null ?
|
|
1407
|
+
a != null ? d.div(
|
|
1400
1408
|
s.class("bc-nine-slice-pane bc-nine-slice-header"),
|
|
1401
|
-
|
|
1402
|
-
|
|
1409
|
+
C.top("0"),
|
|
1410
|
+
C.left(k),
|
|
1403
1411
|
// style.height(headerHeightPx),
|
|
1404
1412
|
// style.width(visibleAreaWidthPx),
|
|
1405
|
-
|
|
1413
|
+
d.div(
|
|
1406
1414
|
s.class("bc-nine-slice-pane-content"),
|
|
1407
1415
|
Re,
|
|
1408
1416
|
a
|
|
1409
1417
|
)
|
|
1410
1418
|
) : null,
|
|
1411
1419
|
// top-end corner
|
|
1412
|
-
i != null ?
|
|
1420
|
+
i != null ? d.div(
|
|
1413
1421
|
s.class("bc-nine-slice-pane bc-nine-slice-top-end"),
|
|
1414
|
-
|
|
1422
|
+
C.top("0"),
|
|
1415
1423
|
U,
|
|
1416
1424
|
// style.height(headerHeightPx),
|
|
1417
1425
|
// style.width(sidebarEndWidthPx),
|
|
1418
1426
|
i
|
|
1419
1427
|
) : null,
|
|
1420
1428
|
// middle-start sidebar
|
|
1421
|
-
|
|
1429
|
+
p != null ? d.div(
|
|
1422
1430
|
s.class("bc-nine-slice-pane bc-nine-slice-sidebar-start"),
|
|
1423
|
-
|
|
1424
|
-
|
|
1431
|
+
C.left("0"),
|
|
1432
|
+
C.top(g),
|
|
1425
1433
|
// style.height(visibleAreaHeightPx),
|
|
1426
1434
|
// style.width(sidebarStartWidthPx),
|
|
1427
|
-
|
|
1435
|
+
d.div(
|
|
1428
1436
|
s.class("bc-nine-slice-pane-content"),
|
|
1429
1437
|
ke,
|
|
1430
|
-
|
|
1438
|
+
p
|
|
1431
1439
|
)
|
|
1432
1440
|
) : null,
|
|
1433
1441
|
// middle-center (main body)
|
|
1434
|
-
|
|
1442
|
+
d.div(
|
|
1435
1443
|
s.class("bc-nine-slice-pane bc-nine-slice-body"),
|
|
1436
|
-
|
|
1437
|
-
|
|
1444
|
+
C.left(k),
|
|
1445
|
+
C.top(g),
|
|
1438
1446
|
// style.width(visibleAreaWidth.map(toPx)),
|
|
1439
1447
|
// style.height(visibleAreaHeight.map(toPx)),
|
|
1440
|
-
|
|
1448
|
+
d.div(
|
|
1441
1449
|
s.class("bc-nine-slice-pane-content"),
|
|
1442
1450
|
Oe,
|
|
1443
1451
|
e
|
|
1444
1452
|
)
|
|
1445
1453
|
),
|
|
1446
1454
|
// middle-end sidebar
|
|
1447
|
-
|
|
1455
|
+
v != null ? d.div(
|
|
1448
1456
|
s.class("bc-nine-slice-pane bc-nine-slice-sidebar-end"),
|
|
1449
1457
|
U,
|
|
1450
|
-
|
|
1458
|
+
C.top(g),
|
|
1451
1459
|
// style.height(visibleAreaHeightPx),
|
|
1452
1460
|
// style.width(sidebarEndWidthPx),
|
|
1453
|
-
|
|
1461
|
+
d.div(
|
|
1454
1462
|
s.class("bc-nine-slice-pane-content"),
|
|
1455
1463
|
ke,
|
|
1456
|
-
|
|
1464
|
+
v
|
|
1457
1465
|
)
|
|
1458
1466
|
) : null,
|
|
1459
1467
|
// bottom-start corner
|
|
1460
|
-
o != null ?
|
|
1468
|
+
o != null ? d.div(
|
|
1461
1469
|
s.class("bc-nine-slice-pane bc-nine-slice-bottom-start"),
|
|
1462
|
-
|
|
1470
|
+
C.left("0"),
|
|
1463
1471
|
pe,
|
|
1464
1472
|
// style.height(footerHeightPx),
|
|
1465
1473
|
// style.width(sidebarStartWidthPx),
|
|
1466
1474
|
o
|
|
1467
1475
|
) : null,
|
|
1468
1476
|
// bottom-center
|
|
1469
|
-
u != null ?
|
|
1477
|
+
u != null ? d.div(
|
|
1470
1478
|
s.class("bc-nine-slice-pane bc-nine-slice-footer"),
|
|
1471
|
-
|
|
1479
|
+
C.left(k),
|
|
1472
1480
|
pe,
|
|
1473
1481
|
// style.height(footerHeightPx),
|
|
1474
1482
|
// style.width(visibleAreaWidthPx),
|
|
1475
|
-
|
|
1483
|
+
d.div(
|
|
1476
1484
|
s.class("bc-nine-slice-pane-content"),
|
|
1477
1485
|
Re,
|
|
1478
1486
|
u
|
|
1479
1487
|
)
|
|
1480
1488
|
) : null,
|
|
1481
1489
|
// bottom-end corner
|
|
1482
|
-
|
|
1490
|
+
f != null ? d.div(
|
|
1483
1491
|
s.class("bc-nine-slice-pane bc-nine-slice-bottom-end"),
|
|
1484
1492
|
U,
|
|
1485
1493
|
pe,
|
|
1486
1494
|
// style.height(footerHeightPx),
|
|
1487
1495
|
// style.width(sidebarEndWidthPx),
|
|
1488
|
-
|
|
1496
|
+
f
|
|
1489
1497
|
) : null
|
|
1490
1498
|
),
|
|
1491
1499
|
// horizontal scrollbar
|
|
1492
|
-
|
|
1500
|
+
d.div(
|
|
1493
1501
|
s.class("bc-nine-slice-pane bc-nine-slice-horizontal-scrollbar"),
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1502
|
+
C.overflowX("scroll"),
|
|
1503
|
+
C.left("0"),
|
|
1504
|
+
C.right(
|
|
1497
1505
|
S(
|
|
1498
1506
|
M,
|
|
1499
|
-
|
|
1507
|
+
T
|
|
1500
1508
|
)((D, N) => D ? `${N}px` : "0")
|
|
1501
1509
|
),
|
|
1502
|
-
|
|
1503
|
-
|
|
1510
|
+
C.bottom("0"),
|
|
1511
|
+
C.height(
|
|
1504
1512
|
I.map(
|
|
1505
1513
|
(D) => D ? "16px" : "0"
|
|
1506
1514
|
)
|
|
1507
1515
|
),
|
|
1508
|
-
|
|
1516
|
+
d.div(
|
|
1509
1517
|
s.class(
|
|
1510
1518
|
"bc-nine-slice-pane bc-nine-slice-horizontal-scrollbar-thumb"
|
|
1511
1519
|
),
|
|
1512
|
-
|
|
1520
|
+
C.width(
|
|
1513
1521
|
H.map((D) => `${100 / Math.max(1, D)}%`)
|
|
1514
1522
|
),
|
|
1515
|
-
|
|
1516
|
-
|
|
1523
|
+
C.height("100%"),
|
|
1524
|
+
C.backgroundColor("#ff000066")
|
|
1517
1525
|
),
|
|
1518
1526
|
$.scroll((D) => {
|
|
1519
|
-
const N = D.target, K = N.scrollLeft,
|
|
1520
|
-
if (
|
|
1521
|
-
const A = K /
|
|
1527
|
+
const N = D.target, K = N.scrollLeft, _ = N.scrollWidth - N.clientWidth;
|
|
1528
|
+
if (_ > 0) {
|
|
1529
|
+
const A = K / _, j = Ce.value;
|
|
1522
1530
|
w.set(
|
|
1523
1531
|
BigInt(Math.round(Number(j) * A))
|
|
1524
1532
|
);
|
|
@@ -1526,42 +1534,42 @@ function rr({
|
|
|
1526
1534
|
})
|
|
1527
1535
|
),
|
|
1528
1536
|
// vertical scrollbar
|
|
1529
|
-
|
|
1537
|
+
d.div(
|
|
1530
1538
|
s.class("bc-nine-slice-pane bc-nine-slice-vertical-scrollbar"),
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1539
|
+
C.overflowY("scroll"),
|
|
1540
|
+
C.top("0"),
|
|
1541
|
+
C.bottom(
|
|
1534
1542
|
S(
|
|
1535
1543
|
I,
|
|
1536
|
-
|
|
1544
|
+
T
|
|
1537
1545
|
)((D, N) => D ? `${N}px` : "0")
|
|
1538
1546
|
),
|
|
1539
|
-
|
|
1540
|
-
|
|
1547
|
+
C.right("0"),
|
|
1548
|
+
C.width(
|
|
1541
1549
|
M.map(
|
|
1542
1550
|
(D) => D ? "16px" : "0"
|
|
1543
1551
|
)
|
|
1544
1552
|
),
|
|
1545
|
-
|
|
1553
|
+
d.div(
|
|
1546
1554
|
s.class(
|
|
1547
1555
|
"bc-nine-slice-pane bc-nine-slice-vertical-scrollbar-thumb"
|
|
1548
1556
|
),
|
|
1549
|
-
|
|
1550
|
-
|
|
1557
|
+
C.width("100%"),
|
|
1558
|
+
C.height(
|
|
1551
1559
|
S(
|
|
1552
1560
|
r,
|
|
1553
1561
|
c,
|
|
1554
1562
|
n,
|
|
1555
1563
|
oe
|
|
1556
|
-
)((D, N, K,
|
|
1564
|
+
)((D, N, K, _) => `${100 / Math.max(1, _)}%`)
|
|
1557
1565
|
),
|
|
1558
|
-
|
|
1566
|
+
C.backgroundColor("#ff000066")
|
|
1559
1567
|
),
|
|
1560
1568
|
$.scroll((D) => {
|
|
1561
|
-
const N = D.target, K = N.scrollTop,
|
|
1562
|
-
if (
|
|
1563
|
-
const A = K /
|
|
1564
|
-
|
|
1569
|
+
const N = D.target, K = N.scrollTop, _ = N.scrollHeight - N.clientHeight;
|
|
1570
|
+
if (_ > 0) {
|
|
1571
|
+
const A = K / _, j = Ae.value;
|
|
1572
|
+
b.set(
|
|
1565
1573
|
BigInt(Math.round(Number(j) * A))
|
|
1566
1574
|
);
|
|
1567
1575
|
}
|
|
@@ -1574,10 +1582,10 @@ function rr({
|
|
|
1574
1582
|
function kt({ header: e, footer: t, body: n, shadowOnScroll: a = !0 }, ...r) {
|
|
1575
1583
|
const l = G("none");
|
|
1576
1584
|
function i(c) {
|
|
1577
|
-
const o = c.scrollTop === 0,
|
|
1578
|
-
o &&
|
|
1585
|
+
const o = c.scrollTop === 0, f = c.scrollTop + c.clientHeight >= c.scrollHeight - 1;
|
|
1586
|
+
o && f ? l.set("none") : o ? l.set("bottom") : f ? l.set("top") : l.set("both");
|
|
1579
1587
|
}
|
|
1580
|
-
return
|
|
1588
|
+
return d.div(
|
|
1581
1589
|
s.class("bc-scrollable-panel"),
|
|
1582
1590
|
s.class(
|
|
1583
1591
|
S(
|
|
@@ -1597,9 +1605,9 @@ function kt({ header: e, footer: t, body: n, shadowOnScroll: a = !0 }, ...r) {
|
|
|
1597
1605
|
}
|
|
1598
1606
|
})
|
|
1599
1607
|
),
|
|
1600
|
-
e &&
|
|
1601
|
-
|
|
1602
|
-
|
|
1608
|
+
e && d.div(s.class("bc-scrollable-panel__header"), e),
|
|
1609
|
+
d.div(s.class("bc-scrollable-panel--header-shadow"), d.div()),
|
|
1610
|
+
d.div(
|
|
1603
1611
|
s.class("bc-scrollable-panel__body"),
|
|
1604
1612
|
ae(
|
|
1605
1613
|
(c) => Y(We(() => i(c)))
|
|
@@ -1610,8 +1618,8 @@ function kt({ header: e, footer: t, body: n, shadowOnScroll: a = !0 }, ...r) {
|
|
|
1610
1618
|
}),
|
|
1611
1619
|
n
|
|
1612
1620
|
),
|
|
1613
|
-
|
|
1614
|
-
t &&
|
|
1621
|
+
d.div(s.class("bc-scrollable-panel--footer-shadow"), d.div()),
|
|
1622
|
+
t && d.div(s.class("bc-scrollable-panel__footer"), t),
|
|
1615
1623
|
...r
|
|
1616
1624
|
);
|
|
1617
1625
|
}
|
|
@@ -1620,7 +1628,7 @@ function ea(e, t, n) {
|
|
|
1620
1628
|
return e !== "default" && a.push(`bc-sink--${e}`), t !== "md" && a.push(`bc-sink--padding-${t}`), n !== "lg" && a.push(`bc-sink--rounded-${n}`), a.join(" ");
|
|
1621
1629
|
}
|
|
1622
1630
|
function sr({ variant: e = "default", size: t = "md", roundedness: n = "lg" } = {}, ...a) {
|
|
1623
|
-
return
|
|
1631
|
+
return d.div(
|
|
1624
1632
|
s.class(
|
|
1625
1633
|
S(
|
|
1626
1634
|
e,
|
|
@@ -1678,52 +1686,52 @@ const xe = {
|
|
|
1678
1686
|
onBeforeOpen: u,
|
|
1679
1687
|
onAfterOpen: c,
|
|
1680
1688
|
buildListboxContent: o
|
|
1681
|
-
} = e,
|
|
1682
|
-
let
|
|
1683
|
-
const w = (
|
|
1684
|
-
t?.(
|
|
1685
|
-
},
|
|
1686
|
-
const
|
|
1687
|
-
switch (
|
|
1689
|
+
} = e, f = G(!1), p = G(-1), x = G(null), v = he("dropdown"), y = he("listbox");
|
|
1690
|
+
let h, b;
|
|
1691
|
+
const w = (k) => {
|
|
1692
|
+
t?.(k), f.set(!1), p.set(-1), x.set(null), h?.focus();
|
|
1693
|
+
}, g = (k) => {
|
|
1694
|
+
const T = xe.getValues(m.get(l));
|
|
1695
|
+
switch (k.key) {
|
|
1688
1696
|
case "ArrowDown": {
|
|
1689
|
-
if (
|
|
1690
|
-
|
|
1697
|
+
if (k.preventDefault(), !f.value)
|
|
1698
|
+
f.set(!0), T.length > 0 && (p.set(0), x.set(T[0]));
|
|
1691
1699
|
else {
|
|
1692
1700
|
const L = Math.min(
|
|
1693
|
-
|
|
1694
|
-
|
|
1701
|
+
p.value + 1,
|
|
1702
|
+
T.length - 1
|
|
1695
1703
|
);
|
|
1696
|
-
|
|
1704
|
+
p.set(L), x.set(T[L] ?? null);
|
|
1697
1705
|
}
|
|
1698
1706
|
break;
|
|
1699
1707
|
}
|
|
1700
1708
|
case "ArrowUp": {
|
|
1701
|
-
if (
|
|
1702
|
-
const L = Math.max(
|
|
1703
|
-
|
|
1709
|
+
if (k.preventDefault(), f.value) {
|
|
1710
|
+
const L = Math.max(p.value - 1, 0);
|
|
1711
|
+
p.set(L), x.set(T[L] ?? null);
|
|
1704
1712
|
}
|
|
1705
1713
|
break;
|
|
1706
1714
|
}
|
|
1707
1715
|
case "Enter": {
|
|
1708
|
-
if (
|
|
1709
|
-
const L =
|
|
1716
|
+
if (k.preventDefault(), f.value && p.value >= 0) {
|
|
1717
|
+
const L = T[p.value];
|
|
1710
1718
|
L != null && w(L);
|
|
1711
1719
|
} else {
|
|
1712
1720
|
u?.();
|
|
1713
1721
|
const L = xe.getValues(m.get(l));
|
|
1714
|
-
|
|
1722
|
+
f.set(!0), L.length > 0 && (p.set(0), x.set(L[0])), setTimeout(() => c?.(), 0);
|
|
1715
1723
|
}
|
|
1716
1724
|
break;
|
|
1717
1725
|
}
|
|
1718
1726
|
case "Escape": {
|
|
1719
|
-
|
|
1727
|
+
f.value && (k.preventDefault(), f.set(!1), p.set(-1), x.set(null), h?.focus());
|
|
1720
1728
|
break;
|
|
1721
1729
|
}
|
|
1722
1730
|
case " ": {
|
|
1723
1731
|
if (m.get(i)) {
|
|
1724
|
-
|
|
1732
|
+
k.preventDefault();
|
|
1725
1733
|
const L = xe.getValues(m.get(l));
|
|
1726
|
-
|
|
1734
|
+
f.set(!f.value), f.value && L.length > 0 && (p.set(0), x.set(L[0]));
|
|
1727
1735
|
}
|
|
1728
1736
|
break;
|
|
1729
1737
|
}
|
|
@@ -1734,70 +1742,70 @@ const xe = {
|
|
|
1734
1742
|
...e,
|
|
1735
1743
|
input: Ft(
|
|
1736
1744
|
s.class("bc-dropdown__trigger"),
|
|
1737
|
-
|
|
1745
|
+
d.span(s.class("bc-dropdown__display"), r),
|
|
1738
1746
|
ee(
|
|
1739
1747
|
{ icon: "ph:caret-up-down-bold", color: "neutral" },
|
|
1740
1748
|
s.class("bc-dropdown__arrow")
|
|
1741
1749
|
)
|
|
1742
1750
|
)
|
|
1743
1751
|
},
|
|
1744
|
-
Ee((
|
|
1745
|
-
ae((
|
|
1746
|
-
() =>
|
|
1752
|
+
Ee((k) => E(
|
|
1753
|
+
ae((T) => (h = T, T.addEventListener("keydown", g), Y(
|
|
1754
|
+
() => T.removeEventListener("keydown", g)
|
|
1747
1755
|
))),
|
|
1748
1756
|
le(e),
|
|
1749
|
-
s.id(
|
|
1757
|
+
s.id(v),
|
|
1750
1758
|
s.tabindex(0),
|
|
1751
|
-
B.controls(
|
|
1752
|
-
B.expanded(
|
|
1759
|
+
B.controls(y),
|
|
1760
|
+
B.expanded(f),
|
|
1753
1761
|
s.class("bc-dropdown"),
|
|
1754
1762
|
s.role(a),
|
|
1755
1763
|
B.activedescendant(
|
|
1756
1764
|
S(
|
|
1757
|
-
|
|
1765
|
+
f,
|
|
1758
1766
|
x
|
|
1759
1767
|
)(
|
|
1760
|
-
(
|
|
1768
|
+
(T, L) => T && L != null ? `dropdown-option-${String(L)}` : ""
|
|
1761
1769
|
)
|
|
1762
1770
|
),
|
|
1763
1771
|
n != null ? $.blur(() => {
|
|
1764
1772
|
setTimeout(() => {
|
|
1765
|
-
|
|
1773
|
+
b?.contains(document.activeElement) || (f.set(!1), p.set(-1), n());
|
|
1766
1774
|
}, 100);
|
|
1767
1775
|
}) : R,
|
|
1768
1776
|
Ze({
|
|
1769
|
-
content: () =>
|
|
1770
|
-
ae((
|
|
1771
|
-
|
|
1777
|
+
content: () => d.div(
|
|
1778
|
+
ae((T) => {
|
|
1779
|
+
b = T;
|
|
1772
1780
|
}),
|
|
1773
|
-
|
|
1781
|
+
C.minWidth(k.$.width.map((T) => `${T - 10}px`)),
|
|
1774
1782
|
s.class("bc-dropdown__listbox"),
|
|
1775
1783
|
s.role("listbox"),
|
|
1776
|
-
s.id(
|
|
1777
|
-
B.labelledby(
|
|
1784
|
+
s.id(y),
|
|
1785
|
+
B.labelledby(v),
|
|
1778
1786
|
o({
|
|
1779
|
-
dropdownId:
|
|
1780
|
-
listboxId:
|
|
1787
|
+
dropdownId: v,
|
|
1788
|
+
listboxId: y,
|
|
1781
1789
|
focusedValue: x,
|
|
1782
|
-
handleKeyDown:
|
|
1790
|
+
handleKeyDown: g,
|
|
1783
1791
|
onSelect: w
|
|
1784
1792
|
})
|
|
1785
1793
|
),
|
|
1786
1794
|
mainAxisOffset: 0,
|
|
1787
1795
|
placement: "bottom-start",
|
|
1788
1796
|
hasPopup: "listbox",
|
|
1789
|
-
showOn: (
|
|
1797
|
+
showOn: (T, L) => {
|
|
1790
1798
|
const V = L;
|
|
1791
1799
|
L = () => {
|
|
1792
|
-
|
|
1800
|
+
f.set(!1), p.set(-1), x.set(null), V();
|
|
1793
1801
|
};
|
|
1794
1802
|
const P = () => {
|
|
1795
|
-
if (
|
|
1803
|
+
if (f.value)
|
|
1796
1804
|
L();
|
|
1797
1805
|
else {
|
|
1798
1806
|
u?.();
|
|
1799
1807
|
const I = xe.getValues(m.get(l));
|
|
1800
|
-
|
|
1808
|
+
f.set(!0), I.length > 0 && (p.set(0), x.set(I[0])), T(), setTimeout(() => c?.(), 0);
|
|
1801
1809
|
}
|
|
1802
1810
|
};
|
|
1803
1811
|
return $.click(P);
|
|
@@ -1815,11 +1823,11 @@ const xe = {
|
|
|
1815
1823
|
const u = S(
|
|
1816
1824
|
i,
|
|
1817
1825
|
n
|
|
1818
|
-
)((o,
|
|
1826
|
+
)((o, f) => t(o.value, f)), c = S(
|
|
1819
1827
|
i,
|
|
1820
1828
|
r
|
|
1821
|
-
)((o,
|
|
1822
|
-
return
|
|
1829
|
+
)((o, f) => f != null && t(o.value, f));
|
|
1830
|
+
return d.div(
|
|
1823
1831
|
Y(u.dispose),
|
|
1824
1832
|
Y(c.dispose),
|
|
1825
1833
|
s.class("bc-dropdown__option"),
|
|
@@ -1828,9 +1836,9 @@ const xe = {
|
|
|
1828
1836
|
u,
|
|
1829
1837
|
c,
|
|
1830
1838
|
i
|
|
1831
|
-
)((o,
|
|
1839
|
+
)((o, f, p) => {
|
|
1832
1840
|
const x = [];
|
|
1833
|
-
return o && x.push("bc-dropdown__option--selected"),
|
|
1841
|
+
return o && x.push("bc-dropdown__option--selected"), f && x.push("bc-dropdown__option--focused"), p.disabled && x.push("bc-dropdown__option--disabled"), x.join(" ");
|
|
1834
1842
|
})
|
|
1835
1843
|
),
|
|
1836
1844
|
s.role("option"),
|
|
@@ -1842,25 +1850,25 @@ const xe = {
|
|
|
1842
1850
|
() => $.click(() => a(i.value.value)),
|
|
1843
1851
|
() => R
|
|
1844
1852
|
),
|
|
1845
|
-
|
|
1853
|
+
d.div(
|
|
1846
1854
|
s.class("bc-dropdown__option-content"),
|
|
1847
1855
|
// Before content - simple conditional rendering
|
|
1848
|
-
i.value.before &&
|
|
1856
|
+
i.value.before && d.span(
|
|
1849
1857
|
s.class("bc-dropdown__option-before"),
|
|
1850
1858
|
i.value.before
|
|
1851
1859
|
),
|
|
1852
1860
|
// Label
|
|
1853
|
-
|
|
1861
|
+
d.span(s.class("bc-dropdown__option-label"), i.$.label),
|
|
1854
1862
|
// After content - simple conditional rendering
|
|
1855
|
-
i.value.after &&
|
|
1863
|
+
i.value.after && d.span(s.class("bc-dropdown__option-after"), i.value.after)
|
|
1856
1864
|
)
|
|
1857
1865
|
);
|
|
1858
1866
|
},
|
|
1859
|
-
group: (i) =>
|
|
1867
|
+
group: (i) => d.div(
|
|
1860
1868
|
s.class("bc-dropdown__group"),
|
|
1861
1869
|
s.role("group"),
|
|
1862
1870
|
B.label(i.$.group),
|
|
1863
|
-
|
|
1871
|
+
d.div(s.class("bc-dropdown__group-label"), i.$.group),
|
|
1864
1872
|
_e(
|
|
1865
1873
|
i.$.options,
|
|
1866
1874
|
(u) => Wt(
|
|
@@ -1872,32 +1880,32 @@ const xe = {
|
|
|
1872
1880
|
)
|
|
1873
1881
|
)
|
|
1874
1882
|
),
|
|
1875
|
-
break: () =>
|
|
1883
|
+
break: () => d.hr(s.class("bc-dropdown__separator"))
|
|
1876
1884
|
})
|
|
1877
1885
|
), ta = (e) => {
|
|
1878
1886
|
const {
|
|
1879
1887
|
value: t,
|
|
1880
1888
|
options: n,
|
|
1881
1889
|
unselectedLabel: a,
|
|
1882
|
-
equality: r = (o,
|
|
1890
|
+
equality: r = (o, f) => o === f,
|
|
1883
1891
|
placeholder: l,
|
|
1884
1892
|
searchable: i = !1
|
|
1885
1893
|
} = e, u = S(
|
|
1886
1894
|
t,
|
|
1887
1895
|
n
|
|
1888
|
-
)((o,
|
|
1896
|
+
)((o, f) => {
|
|
1889
1897
|
if (o == null) return "";
|
|
1890
|
-
const
|
|
1891
|
-
for (const
|
|
1892
|
-
if (
|
|
1893
|
-
return
|
|
1894
|
-
if (
|
|
1895
|
-
const
|
|
1896
|
-
if (
|
|
1898
|
+
const p = (x) => {
|
|
1899
|
+
for (const v of x) {
|
|
1900
|
+
if (v.type === "value" && r(v.value, o))
|
|
1901
|
+
return v.label;
|
|
1902
|
+
if (v.type === "group") {
|
|
1903
|
+
const y = p(v.options);
|
|
1904
|
+
if (y) return y;
|
|
1897
1905
|
}
|
|
1898
1906
|
}
|
|
1899
1907
|
};
|
|
1900
|
-
return
|
|
1908
|
+
return p(f) || String(o);
|
|
1901
1909
|
}), c = S(i)((o) => !o);
|
|
1902
1910
|
return zt({
|
|
1903
1911
|
...e,
|
|
@@ -1912,9 +1920,9 @@ const xe = {
|
|
|
1912
1920
|
),
|
|
1913
1921
|
optionsSource: n,
|
|
1914
1922
|
allowSpaceToggle: c,
|
|
1915
|
-
buildListboxContent: ({ focusedValue: o, onSelect:
|
|
1923
|
+
buildListboxContent: ({ focusedValue: o, onSelect: f }) => _e(
|
|
1916
1924
|
n,
|
|
1917
|
-
(
|
|
1925
|
+
(p) => Wt(p, r, t, f, o)
|
|
1918
1926
|
)
|
|
1919
1927
|
});
|
|
1920
1928
|
}, na = (e) => {
|
|
@@ -1935,13 +1943,13 @@ const xe = {
|
|
|
1935
1943
|
const c = S(
|
|
1936
1944
|
u,
|
|
1937
1945
|
n
|
|
1938
|
-
)((
|
|
1946
|
+
)((f, p) => t(f.value, p)), o = S(
|
|
1939
1947
|
u,
|
|
1940
1948
|
r
|
|
1941
1949
|
)(
|
|
1942
|
-
(
|
|
1950
|
+
(f, p) => p != null && t(f.value, p)
|
|
1943
1951
|
);
|
|
1944
|
-
return
|
|
1952
|
+
return d.div(
|
|
1945
1953
|
Y(c.dispose),
|
|
1946
1954
|
Y(o.dispose),
|
|
1947
1955
|
s.class("bc-dropdown__option"),
|
|
@@ -1950,41 +1958,41 @@ const xe = {
|
|
|
1950
1958
|
c,
|
|
1951
1959
|
o,
|
|
1952
1960
|
u
|
|
1953
|
-
)((
|
|
1954
|
-
const
|
|
1955
|
-
return
|
|
1961
|
+
)((f, p, x) => {
|
|
1962
|
+
const v = [];
|
|
1963
|
+
return f && v.push("bc-dropdown__option--selected"), p && v.push("bc-dropdown__option--focused"), x.disabled && v.push("bc-dropdown__option--disabled"), v.join(" ");
|
|
1956
1964
|
})
|
|
1957
1965
|
),
|
|
1958
1966
|
s.role("option"),
|
|
1959
|
-
s.id(u.map((
|
|
1967
|
+
s.id(u.map((f) => `dropdown-option-${String(f.value)}`)),
|
|
1960
1968
|
B.selected(c),
|
|
1961
1969
|
J(
|
|
1962
|
-
u.map((
|
|
1970
|
+
u.map((f) => !f.disabled),
|
|
1963
1971
|
() => $.click(() => a(u.value.value)),
|
|
1964
1972
|
() => R
|
|
1965
1973
|
),
|
|
1966
|
-
|
|
1974
|
+
d.div(
|
|
1967
1975
|
s.class("bc-dropdown__option-content"),
|
|
1968
1976
|
// Before slot
|
|
1969
|
-
u.value.before &&
|
|
1977
|
+
u.value.before && d.span(
|
|
1970
1978
|
s.class("bc-dropdown__option-before"),
|
|
1971
1979
|
u.value.before
|
|
1972
1980
|
),
|
|
1973
1981
|
// Custom renderer for the main content
|
|
1974
|
-
|
|
1982
|
+
d.span(
|
|
1975
1983
|
s.class("bc-dropdown__option-label"),
|
|
1976
1984
|
l(u.$.value)
|
|
1977
1985
|
),
|
|
1978
1986
|
// After slot
|
|
1979
|
-
u.value.after &&
|
|
1987
|
+
u.value.after && d.span(s.class("bc-dropdown__option-after"), u.value.after)
|
|
1980
1988
|
)
|
|
1981
1989
|
);
|
|
1982
1990
|
},
|
|
1983
|
-
group: (u) =>
|
|
1991
|
+
group: (u) => d.div(
|
|
1984
1992
|
s.class("bc-dropdown__group"),
|
|
1985
1993
|
s.role("group"),
|
|
1986
1994
|
B.label(u.$.group),
|
|
1987
|
-
|
|
1995
|
+
d.div(s.class("bc-dropdown__group-label"), u.$.group),
|
|
1988
1996
|
_e(
|
|
1989
1997
|
u.$.options,
|
|
1990
1998
|
(c) => Yt(
|
|
@@ -1997,7 +2005,7 @@ const xe = {
|
|
|
1997
2005
|
)
|
|
1998
2006
|
)
|
|
1999
2007
|
),
|
|
2000
|
-
break: () =>
|
|
2008
|
+
break: () => d.hr(s.class("bc-dropdown__separator"))
|
|
2001
2009
|
})
|
|
2002
2010
|
), aa = (e) => {
|
|
2003
2011
|
const {
|
|
@@ -2005,24 +2013,24 @@ const xe = {
|
|
|
2005
2013
|
loadOptions: n,
|
|
2006
2014
|
renderOption: a,
|
|
2007
2015
|
renderValue: r,
|
|
2008
|
-
equality: l = (
|
|
2016
|
+
equality: l = (g, k) => g === k,
|
|
2009
2017
|
placeholder: i,
|
|
2010
2018
|
searchPlaceholder: u,
|
|
2011
2019
|
debounceMs: c = 150
|
|
2012
|
-
} = e, o = G(""),
|
|
2020
|
+
} = e, o = G(""), f = G(!1), p = G([]);
|
|
2013
2021
|
let x;
|
|
2014
|
-
const
|
|
2015
|
-
let
|
|
2016
|
-
const
|
|
2017
|
-
|
|
2018
|
-
|
|
2022
|
+
const v = m.toSignal(t), y = () => (r ?? a)(v);
|
|
2023
|
+
let h = null;
|
|
2024
|
+
const b = (g) => {
|
|
2025
|
+
f.set(!0), Promise.resolve(n(g)).then((k) => {
|
|
2026
|
+
p.set(k ?? []);
|
|
2019
2027
|
}).catch(() => {
|
|
2020
|
-
|
|
2021
|
-
}).finally(() =>
|
|
2022
|
-
}, w = (
|
|
2023
|
-
|
|
2028
|
+
p.set([]);
|
|
2029
|
+
}).finally(() => f.set(!1));
|
|
2030
|
+
}, w = (g) => {
|
|
2031
|
+
h != null && (clearTimeout(h), h = null), h = setTimeout(
|
|
2024
2032
|
() => {
|
|
2025
|
-
|
|
2033
|
+
b(g);
|
|
2026
2034
|
},
|
|
2027
2035
|
Math.max(0, c)
|
|
2028
2036
|
);
|
|
@@ -2031,23 +2039,23 @@ const xe = {
|
|
|
2031
2039
|
...e,
|
|
2032
2040
|
role: "combobox",
|
|
2033
2041
|
display: J(
|
|
2034
|
-
S(t)((
|
|
2035
|
-
|
|
2036
|
-
() => ne(fe, (
|
|
2042
|
+
S(t)((g) => g != null),
|
|
2043
|
+
y,
|
|
2044
|
+
() => ne(fe, (g) => g.$.selectOne)
|
|
2037
2045
|
),
|
|
2038
|
-
optionsSource:
|
|
2046
|
+
optionsSource: p,
|
|
2039
2047
|
onBeforeOpen: () => {
|
|
2040
|
-
const
|
|
2041
|
-
w(
|
|
2048
|
+
const g = m.get(o);
|
|
2049
|
+
w(g);
|
|
2042
2050
|
},
|
|
2043
2051
|
onAfterOpen: () => {
|
|
2044
2052
|
x?.focus();
|
|
2045
2053
|
},
|
|
2046
|
-
buildListboxContent: ({ focusedValue:
|
|
2054
|
+
buildListboxContent: ({ focusedValue: g, handleKeyDown: k, onSelect: T }) => E(
|
|
2047
2055
|
// Search input at the top
|
|
2048
|
-
|
|
2056
|
+
d.div(
|
|
2049
2057
|
s.class("bc-dropdown__search"),
|
|
2050
|
-
|
|
2058
|
+
d.input(
|
|
2051
2059
|
s.type("text"),
|
|
2052
2060
|
s.class("bc-dropdown__search-input"),
|
|
2053
2061
|
s.placeholder(
|
|
@@ -2062,23 +2070,23 @@ const xe = {
|
|
|
2062
2070
|
const V = L.target;
|
|
2063
2071
|
o.set(V.value), w(V.value);
|
|
2064
2072
|
}),
|
|
2065
|
-
$.keydown(
|
|
2073
|
+
$.keydown(k)
|
|
2066
2074
|
)
|
|
2067
2075
|
),
|
|
2068
2076
|
J(
|
|
2069
|
-
|
|
2070
|
-
() =>
|
|
2077
|
+
f,
|
|
2078
|
+
() => d.div(
|
|
2071
2079
|
s.class("bc-dropdown__loading"),
|
|
2072
2080
|
ee({ icon: "ph:spinner-bold", color: "neutral" })
|
|
2073
2081
|
),
|
|
2074
2082
|
() => _e(
|
|
2075
|
-
|
|
2083
|
+
p,
|
|
2076
2084
|
(L) => Yt(
|
|
2077
2085
|
L,
|
|
2078
2086
|
l,
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2087
|
+
v,
|
|
2088
|
+
T,
|
|
2089
|
+
g,
|
|
2082
2090
|
a
|
|
2083
2091
|
)
|
|
2084
2092
|
)
|
|
@@ -2108,17 +2116,17 @@ function qt(e) {
|
|
|
2108
2116
|
showOn: u = "click",
|
|
2109
2117
|
closable: c = !0,
|
|
2110
2118
|
onClose: o,
|
|
2111
|
-
onAction:
|
|
2112
|
-
ariaLabel:
|
|
2119
|
+
onAction: f,
|
|
2120
|
+
ariaLabel: p,
|
|
2113
2121
|
ariaLabelledBy: x
|
|
2114
|
-
} = e,
|
|
2115
|
-
let
|
|
2122
|
+
} = e, v = he("menu"), y = G(-1), h = G([]);
|
|
2123
|
+
let b = null;
|
|
2116
2124
|
return E(
|
|
2117
|
-
Y(
|
|
2125
|
+
Y(y, h),
|
|
2118
2126
|
Ze({
|
|
2119
2127
|
content: () => ae((w) => {
|
|
2120
|
-
|
|
2121
|
-
const
|
|
2128
|
+
b = document.activeElement;
|
|
2129
|
+
const g = (P, I, M) => {
|
|
2122
2130
|
if (I.length === 0) return -1;
|
|
2123
2131
|
let F = P + M, O = 0;
|
|
2124
2132
|
for (; O < I.length; ) {
|
|
@@ -2129,18 +2137,18 @@ function qt(e) {
|
|
|
2129
2137
|
F += M, O++;
|
|
2130
2138
|
}
|
|
2131
2139
|
return P;
|
|
2132
|
-
},
|
|
2133
|
-
const I =
|
|
2140
|
+
}, k = (P) => {
|
|
2141
|
+
const I = h.value, M = y.value;
|
|
2134
2142
|
switch (P.key) {
|
|
2135
2143
|
case "ArrowDown":
|
|
2136
2144
|
P.preventDefault(), P.stopPropagation();
|
|
2137
|
-
const F =
|
|
2138
|
-
|
|
2145
|
+
const F = g(M, I, 1);
|
|
2146
|
+
T(F, I);
|
|
2139
2147
|
break;
|
|
2140
2148
|
case "ArrowUp":
|
|
2141
2149
|
P.preventDefault(), P.stopPropagation();
|
|
2142
|
-
const O =
|
|
2143
|
-
|
|
2150
|
+
const O = g(M, I, -1);
|
|
2151
|
+
T(O, I);
|
|
2144
2152
|
break;
|
|
2145
2153
|
case "Enter":
|
|
2146
2154
|
case " ":
|
|
@@ -2149,17 +2157,17 @@ function qt(e) {
|
|
|
2149
2157
|
if (H.getAttribute("aria-disabled") === "true")
|
|
2150
2158
|
return;
|
|
2151
2159
|
const oe = H.getAttribute("data-key");
|
|
2152
|
-
oe &&
|
|
2160
|
+
oe && f && f(oe), H.click(), o?.();
|
|
2153
2161
|
}
|
|
2154
2162
|
break;
|
|
2155
2163
|
case "Escape":
|
|
2156
2164
|
o?.();
|
|
2157
2165
|
break;
|
|
2158
2166
|
case "Home":
|
|
2159
|
-
P.preventDefault(), P.stopPropagation(), I.length > 0 &&
|
|
2167
|
+
P.preventDefault(), P.stopPropagation(), I.length > 0 && T(0, I);
|
|
2160
2168
|
break;
|
|
2161
2169
|
case "End":
|
|
2162
|
-
P.preventDefault(), P.stopPropagation(), I.length > 0 &&
|
|
2170
|
+
P.preventDefault(), P.stopPropagation(), I.length > 0 && T(I.length - 1, I);
|
|
2163
2171
|
break;
|
|
2164
2172
|
case "ArrowRight":
|
|
2165
2173
|
if (P.preventDefault(), P.stopPropagation(), M >= 0 && I[M]) {
|
|
@@ -2173,38 +2181,38 @@ function qt(e) {
|
|
|
2173
2181
|
P.preventDefault(), P.stopPropagation(), o?.();
|
|
2174
2182
|
break;
|
|
2175
2183
|
}
|
|
2176
|
-
},
|
|
2177
|
-
|
|
2184
|
+
}, T = (P, I) => {
|
|
2185
|
+
y.value >= 0 && I[y.value] && (I[y.value].classList.remove(
|
|
2178
2186
|
"bc-menu-item--focused"
|
|
2179
|
-
), I[
|
|
2187
|
+
), I[y.value].removeAttribute("aria-selected")), P >= 0 && I[P] && (I[P].classList.add("bc-menu-item--focused"), I[P].setAttribute("aria-selected", "true"), y.set(P), typeof I[P].scrollIntoView == "function" && I[P].scrollIntoView({ block: "nearest" }));
|
|
2180
2188
|
}, L = () => {
|
|
2181
2189
|
const P = Array.from(
|
|
2182
2190
|
w.querySelectorAll('[role="menuitem"]')
|
|
2183
2191
|
);
|
|
2184
|
-
if (
|
|
2192
|
+
if (h.set(P), P.length > 0) {
|
|
2185
2193
|
const I = P.findIndex(
|
|
2186
2194
|
(M) => M.getAttribute("aria-disabled") !== "true"
|
|
2187
2195
|
);
|
|
2188
|
-
I >= 0 &&
|
|
2196
|
+
I >= 0 && T(I, P);
|
|
2189
2197
|
}
|
|
2190
2198
|
}, V = new MutationObserver(L);
|
|
2191
2199
|
return V.observe(w, { childList: !0, subtree: !0 }), setTimeout(() => {
|
|
2192
2200
|
L(), w.focus();
|
|
2193
|
-
}, 0), document.addEventListener("keydown",
|
|
2201
|
+
}, 0), document.addEventListener("keydown", k, !0), E(
|
|
2194
2202
|
Y(() => {
|
|
2195
|
-
V.disconnect(), document.removeEventListener("keydown",
|
|
2203
|
+
V.disconnect(), document.removeEventListener("keydown", k, !0), b && b.focus();
|
|
2196
2204
|
}),
|
|
2197
2205
|
s.class("bc-menu"),
|
|
2198
|
-
s.id(
|
|
2206
|
+
s.id(v),
|
|
2199
2207
|
s.role("menu"),
|
|
2200
2208
|
s.tabindex(-1),
|
|
2201
2209
|
B.orientation("vertical"),
|
|
2202
|
-
|
|
2210
|
+
p ? B.label(p) : E(),
|
|
2203
2211
|
x ? B.labelledby(x) : E(),
|
|
2204
2212
|
B.activedescendant(
|
|
2205
|
-
|
|
2206
|
-
const I =
|
|
2207
|
-
return P >= 0 && I[P] ? I[P].id || `${
|
|
2213
|
+
y.map((P) => {
|
|
2214
|
+
const I = h.value;
|
|
2215
|
+
return P >= 0 && I[P] ? I[P].id || `${v}-item-${P}` : "";
|
|
2208
2216
|
})
|
|
2209
2217
|
),
|
|
2210
2218
|
$.click((P) => {
|
|
@@ -2213,16 +2221,16 @@ function qt(e) {
|
|
|
2213
2221
|
);
|
|
2214
2222
|
if (M && M.getAttribute("aria-disabled") !== "true") {
|
|
2215
2223
|
const F = M.getAttribute("data-key");
|
|
2216
|
-
F &&
|
|
2224
|
+
F && f && f(F);
|
|
2217
2225
|
}
|
|
2218
2226
|
}),
|
|
2219
2227
|
// Live region for screen reader announcements
|
|
2220
|
-
|
|
2228
|
+
d.div(
|
|
2221
2229
|
s.class("sr-only"),
|
|
2222
2230
|
B.live("polite"),
|
|
2223
2231
|
B.atomic(!0),
|
|
2224
|
-
|
|
2225
|
-
const I =
|
|
2232
|
+
y.map((P) => {
|
|
2233
|
+
const I = h.value;
|
|
2226
2234
|
if (P >= 0 && I[P]) {
|
|
2227
2235
|
const M = I[P].textContent || "";
|
|
2228
2236
|
return I[P].getAttribute("aria-disabled") === "true" ? `${M}, disabled` : `${M}, ${P + 1} of ${I.length}`;
|
|
@@ -2255,35 +2263,35 @@ function ir(e) {
|
|
|
2255
2263
|
ariaLabel: u,
|
|
2256
2264
|
submenu: c,
|
|
2257
2265
|
submenuPlacement: o = "right-start"
|
|
2258
|
-
} = e,
|
|
2259
|
-
return
|
|
2266
|
+
} = e, f = t ?? he("menu-item"), p = `menu-item-${f}`, x = c != null;
|
|
2267
|
+
return d.div(
|
|
2260
2268
|
s.class(
|
|
2261
2269
|
S(l)(
|
|
2262
|
-
(
|
|
2270
|
+
(v) => `bc-menu-item ${v ? "bc-menu-item--disabled" : ""} ${x ? "bc-menu-item--has-submenu" : ""}`
|
|
2263
2271
|
)
|
|
2264
2272
|
),
|
|
2265
|
-
s.id(
|
|
2273
|
+
s.id(p),
|
|
2266
2274
|
s.role("menuitem"),
|
|
2267
2275
|
s.tabindex(-1),
|
|
2268
|
-
nt.key(
|
|
2276
|
+
nt.key(f),
|
|
2269
2277
|
B.disabled(l),
|
|
2270
2278
|
B.selected(!1),
|
|
2271
2279
|
// Will be updated by focus management
|
|
2272
2280
|
x ? B.expanded(!1) : E(),
|
|
2273
2281
|
u ? B.label(u) : E(),
|
|
2274
|
-
$.click((
|
|
2282
|
+
$.click((v) => {
|
|
2275
2283
|
if (m.get(l)) {
|
|
2276
|
-
|
|
2284
|
+
v.preventDefault(), v.stopPropagation();
|
|
2277
2285
|
return;
|
|
2278
2286
|
}
|
|
2279
2287
|
i?.();
|
|
2280
2288
|
}),
|
|
2281
2289
|
// Start content
|
|
2282
|
-
a &&
|
|
2290
|
+
a && d.span(s.class("bc-menu-item__start"), a),
|
|
2283
2291
|
// Main content
|
|
2284
|
-
|
|
2292
|
+
d.span(s.class("bc-menu-item__content"), n),
|
|
2285
2293
|
// End content
|
|
2286
|
-
r &&
|
|
2294
|
+
r && d.span(s.class("bc-menu-item__end"), r),
|
|
2287
2295
|
// Submenu (if present)
|
|
2288
2296
|
x && c ? Ze({
|
|
2289
2297
|
content: () => E(
|
|
@@ -2304,11 +2312,11 @@ function ir(e) {
|
|
|
2304
2312
|
}
|
|
2305
2313
|
function Zt(e = {}) {
|
|
2306
2314
|
const { label: t } = e;
|
|
2307
|
-
return
|
|
2315
|
+
return d.div(
|
|
2308
2316
|
s.class("bc-menu-separator"),
|
|
2309
2317
|
s.role("separator"),
|
|
2310
2318
|
B.orientation("horizontal"),
|
|
2311
|
-
t &&
|
|
2319
|
+
t && d.span(s.class("bc-menu-separator__label"), t)
|
|
2312
2320
|
);
|
|
2313
2321
|
}
|
|
2314
2322
|
function Gt(e, t, n) {
|
|
@@ -2368,60 +2376,60 @@ function en(e) {
|
|
|
2368
2376
|
disabled: r
|
|
2369
2377
|
})
|
|
2370
2378
|
),
|
|
2371
|
-
() =>
|
|
2379
|
+
() => d.span(s.class("bc-input-container__placeholder"), e.placeholder)
|
|
2372
2380
|
);
|
|
2373
2381
|
}
|
|
2374
2382
|
function tn(e) {
|
|
2375
2383
|
const {
|
|
2376
2384
|
value: t,
|
|
2377
2385
|
options: n,
|
|
2378
|
-
equality: a = (o,
|
|
2386
|
+
equality: a = (o, f) => o === f,
|
|
2379
2387
|
placeholder: r
|
|
2380
2388
|
} = e, l = (o) => {
|
|
2381
|
-
const
|
|
2382
|
-
e.onChange?.(Kt(
|
|
2389
|
+
const f = m.get(t);
|
|
2390
|
+
e.onChange?.(Kt(f, o, a));
|
|
2383
2391
|
}, i = (o) => {
|
|
2384
|
-
const
|
|
2385
|
-
e.onChange?.(Gt(
|
|
2386
|
-
}, u = (o) => S(t)((
|
|
2392
|
+
const f = m.get(t);
|
|
2393
|
+
e.onChange?.(Gt(f, o, a));
|
|
2394
|
+
}, u = (o) => S(t)((f) => Qt(f, o, a)), c = qt({
|
|
2387
2395
|
items: () => {
|
|
2388
|
-
const o = m.get(n),
|
|
2389
|
-
for (const
|
|
2390
|
-
if (
|
|
2391
|
-
const x = u(
|
|
2392
|
-
|
|
2393
|
-
|
|
2396
|
+
const o = m.get(n), f = [];
|
|
2397
|
+
for (const p of o)
|
|
2398
|
+
if (p.type === "value") {
|
|
2399
|
+
const x = u(p.value);
|
|
2400
|
+
f.push(
|
|
2401
|
+
d.div(
|
|
2394
2402
|
s.role("menuitem"),
|
|
2395
2403
|
s.tabindex(-1),
|
|
2396
|
-
B.disabled(
|
|
2404
|
+
B.disabled(p.disabled === !0),
|
|
2397
2405
|
B.checked(x),
|
|
2398
2406
|
s.class("bc-menu-item"),
|
|
2399
|
-
|
|
2400
|
-
$.click(() => i(
|
|
2407
|
+
d.span(s.class("bc-menu-item__content"), p.label),
|
|
2408
|
+
$.click(() => i(p.value))
|
|
2401
2409
|
)
|
|
2402
2410
|
);
|
|
2403
|
-
} else
|
|
2404
|
-
|
|
2411
|
+
} else p.type === "group" ? f.push(
|
|
2412
|
+
d.div(
|
|
2405
2413
|
s.class("bc-menu-group"),
|
|
2406
|
-
|
|
2407
|
-
...
|
|
2414
|
+
d.div(s.class("bc-menu-group__label"), p.group),
|
|
2415
|
+
...p.options.map((x) => {
|
|
2408
2416
|
if (x.type === "value") {
|
|
2409
|
-
const
|
|
2410
|
-
return
|
|
2417
|
+
const v = u(x.value);
|
|
2418
|
+
return d.div(
|
|
2411
2419
|
s.role("menuitem"),
|
|
2412
2420
|
s.tabindex(-1),
|
|
2413
2421
|
B.disabled(x.disabled === !0),
|
|
2414
|
-
B.checked(
|
|
2422
|
+
B.checked(v),
|
|
2415
2423
|
s.class("bc-menu-item"),
|
|
2416
|
-
|
|
2424
|
+
d.span(s.class("bc-menu-item__content"), x.label),
|
|
2417
2425
|
$.click(() => i(x.value))
|
|
2418
2426
|
);
|
|
2419
2427
|
}
|
|
2420
2428
|
return E();
|
|
2421
2429
|
})
|
|
2422
2430
|
)
|
|
2423
|
-
) :
|
|
2424
|
-
return
|
|
2431
|
+
) : f.push(Zt());
|
|
2432
|
+
return f;
|
|
2425
2433
|
},
|
|
2426
2434
|
placement: "bottom-start",
|
|
2427
2435
|
showDelay: 0,
|
|
@@ -2470,65 +2478,65 @@ function nn(e) {
|
|
|
2470
2478
|
const {
|
|
2471
2479
|
value: t,
|
|
2472
2480
|
options: n,
|
|
2473
|
-
equality: a = (
|
|
2481
|
+
equality: a = (v, y) => v === y,
|
|
2474
2482
|
placeholder: r,
|
|
2475
2483
|
searchPlaceholder: l,
|
|
2476
2484
|
filter: i
|
|
2477
|
-
} = e, u = G(""), c = (
|
|
2478
|
-
const
|
|
2479
|
-
e.onChange?.(Kt(
|
|
2480
|
-
}, o = (
|
|
2481
|
-
const
|
|
2482
|
-
e.onChange?.(Gt(
|
|
2483
|
-
},
|
|
2485
|
+
} = e, u = G(""), c = (v) => {
|
|
2486
|
+
const y = m.get(t);
|
|
2487
|
+
e.onChange?.(Kt(y, v, a));
|
|
2488
|
+
}, o = (v) => {
|
|
2489
|
+
const y = m.get(t);
|
|
2490
|
+
e.onChange?.(Gt(y, v, a));
|
|
2491
|
+
}, f = (v) => S(t)((y) => Qt(y, v, a)), p = S(
|
|
2484
2492
|
n,
|
|
2485
2493
|
u
|
|
2486
|
-
)((
|
|
2494
|
+
)((v, y) => Jt(v, y, i)), x = qt({
|
|
2487
2495
|
items: () => {
|
|
2488
|
-
const
|
|
2489
|
-
if (
|
|
2490
|
-
return
|
|
2491
|
-
|
|
2496
|
+
const v = [], y = m.get(p);
|
|
2497
|
+
if (y.length === 0)
|
|
2498
|
+
return v.push(
|
|
2499
|
+
d.div(
|
|
2492
2500
|
s.class("bc-dropdown__empty"),
|
|
2493
|
-
ne(fe, (
|
|
2501
|
+
ne(fe, (h) => h.$.noResults)
|
|
2494
2502
|
)
|
|
2495
|
-
),
|
|
2496
|
-
for (const
|
|
2497
|
-
if (
|
|
2498
|
-
const
|
|
2499
|
-
|
|
2500
|
-
|
|
2503
|
+
), v;
|
|
2504
|
+
for (const h of y)
|
|
2505
|
+
if (h.type === "value") {
|
|
2506
|
+
const b = f(h.value);
|
|
2507
|
+
v.push(
|
|
2508
|
+
d.div(
|
|
2501
2509
|
s.role("menuitem"),
|
|
2502
2510
|
s.tabindex(-1),
|
|
2503
|
-
B.disabled(
|
|
2504
|
-
B.checked(
|
|
2511
|
+
B.disabled(h.disabled === !0),
|
|
2512
|
+
B.checked(b),
|
|
2505
2513
|
s.class("bc-menu-item"),
|
|
2506
|
-
|
|
2507
|
-
$.click(() => o(
|
|
2514
|
+
d.span(s.class("bc-menu-item__content"), h.label),
|
|
2515
|
+
$.click(() => o(h.value))
|
|
2508
2516
|
)
|
|
2509
2517
|
);
|
|
2510
|
-
} else
|
|
2511
|
-
|
|
2518
|
+
} else h.type === "group" ? v.push(
|
|
2519
|
+
d.div(
|
|
2512
2520
|
s.class("bc-menu-group"),
|
|
2513
|
-
|
|
2514
|
-
...
|
|
2515
|
-
if (
|
|
2516
|
-
const w =
|
|
2517
|
-
return
|
|
2521
|
+
d.div(s.class("bc-menu-group__label"), h.group),
|
|
2522
|
+
...h.options.map((b) => {
|
|
2523
|
+
if (b.type === "value") {
|
|
2524
|
+
const w = f(b.value);
|
|
2525
|
+
return d.div(
|
|
2518
2526
|
s.role("menuitem"),
|
|
2519
2527
|
s.tabindex(-1),
|
|
2520
|
-
B.disabled(
|
|
2528
|
+
B.disabled(b.disabled === !0),
|
|
2521
2529
|
B.checked(w),
|
|
2522
2530
|
s.class("bc-menu-item"),
|
|
2523
|
-
|
|
2524
|
-
$.click(() => o(
|
|
2531
|
+
d.span(s.class("bc-menu-item__content"), b.label),
|
|
2532
|
+
$.click(() => o(b.value))
|
|
2525
2533
|
);
|
|
2526
2534
|
}
|
|
2527
2535
|
return E();
|
|
2528
2536
|
})
|
|
2529
2537
|
)
|
|
2530
|
-
) :
|
|
2531
|
-
return
|
|
2538
|
+
) : v.push(Zt());
|
|
2539
|
+
return v;
|
|
2532
2540
|
},
|
|
2533
2541
|
placement: "bottom-start",
|
|
2534
2542
|
showDelay: 0,
|
|
@@ -2536,14 +2544,14 @@ function nn(e) {
|
|
|
2536
2544
|
// Open the menu when the search input gains focus
|
|
2537
2545
|
// We intentionally do not auto-hide on blur here because the Menu
|
|
2538
2546
|
// manages its own close behavior (outside click, Escape, etc.)
|
|
2539
|
-
showOn: (
|
|
2540
|
-
const
|
|
2547
|
+
showOn: (v, y) => ae((h) => {
|
|
2548
|
+
const b = h.querySelector(
|
|
2541
2549
|
".bc-dropdown__search-input"
|
|
2542
2550
|
);
|
|
2543
|
-
if (
|
|
2544
|
-
const w = () =>
|
|
2545
|
-
return
|
|
2546
|
-
|
|
2551
|
+
if (b) {
|
|
2552
|
+
const w = () => v();
|
|
2553
|
+
return b.addEventListener("focus", w), Y(() => {
|
|
2554
|
+
b.removeEventListener("focus", w);
|
|
2547
2555
|
});
|
|
2548
2556
|
}
|
|
2549
2557
|
return E();
|
|
@@ -2564,24 +2572,24 @@ function nn(e) {
|
|
|
2564
2572
|
onRemove: c
|
|
2565
2573
|
}),
|
|
2566
2574
|
// Always-visible search box replacing the selector button
|
|
2567
|
-
|
|
2575
|
+
d.div(
|
|
2568
2576
|
s.class("bc-input-container__tags-selector"),
|
|
2569
|
-
|
|
2577
|
+
d.input(
|
|
2570
2578
|
s.type("text"),
|
|
2571
2579
|
s.class("bc-dropdown__search-input"),
|
|
2572
2580
|
s.placeholder(
|
|
2573
2581
|
S(
|
|
2574
2582
|
l,
|
|
2575
2583
|
r
|
|
2576
|
-
)((
|
|
2584
|
+
)((v, y) => v ?? y ?? "")
|
|
2577
2585
|
),
|
|
2578
2586
|
s.value(u),
|
|
2579
|
-
$.input((
|
|
2580
|
-
const
|
|
2581
|
-
u.set(
|
|
2587
|
+
$.input((v) => {
|
|
2588
|
+
const y = v.target;
|
|
2589
|
+
u.set(y.value);
|
|
2582
2590
|
}),
|
|
2583
|
-
$.keydown((
|
|
2584
|
-
(
|
|
2591
|
+
$.keydown((v) => {
|
|
2592
|
+
(v.key === "ArrowUp" || v.key === "ArrowDown" || v.key === "Enter" || v.key === " ") && v.stopPropagation();
|
|
2585
2593
|
})
|
|
2586
2594
|
),
|
|
2587
2595
|
x
|
|
@@ -2657,7 +2665,7 @@ const pr = (e) => {
|
|
|
2657
2665
|
},
|
|
2658
2666
|
pending: () => ne(
|
|
2659
2667
|
fe,
|
|
2660
|
-
(t) =>
|
|
2668
|
+
(t) => d.span(
|
|
2661
2669
|
ee({
|
|
2662
2670
|
icon: "line-md:loading-twotone-loop",
|
|
2663
2671
|
title: t.$.loadingShort
|
|
@@ -2681,68 +2689,68 @@ const pr = (e) => {
|
|
|
2681
2689
|
return null;
|
|
2682
2690
|
}
|
|
2683
2691
|
}, vr = (e) => {
|
|
2684
|
-
const { value: t, step: n, min: a, max: r, onChange: l, onInput: i, after: u } = e, c = (
|
|
2685
|
-
const
|
|
2686
|
-
return
|
|
2687
|
-
}, o = n != null ? ne(fe, (
|
|
2688
|
-
const
|
|
2692
|
+
const { value: t, step: n, min: a, max: r, onChange: l, onInput: i, after: u } = e, c = (v) => {
|
|
2693
|
+
const y = a != null ? m.get(a) : void 0, h = r != null ? m.get(r) : void 0;
|
|
2694
|
+
return y != null && v < y ? y : h != null && v > h ? h : v;
|
|
2695
|
+
}, o = n != null ? ne(fe, (v) => {
|
|
2696
|
+
const y = S(
|
|
2689
2697
|
t,
|
|
2690
2698
|
a
|
|
2691
|
-
)((w,
|
|
2699
|
+
)((w, g) => g == null ? !0 : (w ?? 0n) > g), h = S(
|
|
2692
2700
|
t,
|
|
2693
2701
|
r
|
|
2694
|
-
)((w,
|
|
2695
|
-
const
|
|
2702
|
+
)((w, g) => g == null ? !0 : (w ?? 0n) < g), b = (w, g) => {
|
|
2703
|
+
const k = m.get(t) ?? 0n, T = m.get(n), L = g?.shiftKey ? 10n : 1n, V = k + T * L * w, P = a != null ? m.get(a) : void 0, I = r != null ? m.get(r) : void 0;
|
|
2696
2704
|
if (w < 0n && P != null && V < P || w > 0n && I != null && V > I) return;
|
|
2697
2705
|
const M = c(V);
|
|
2698
|
-
M !==
|
|
2706
|
+
M !== k && l && l(M);
|
|
2699
2707
|
};
|
|
2700
2708
|
return ot(
|
|
2701
2709
|
s.class("bc-number-input-steppers"),
|
|
2702
|
-
|
|
2710
|
+
d.button(
|
|
2703
2711
|
s.type("button"),
|
|
2704
2712
|
s.class(
|
|
2705
2713
|
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
|
|
2706
2714
|
),
|
|
2707
2715
|
s.disabled(
|
|
2708
2716
|
S(
|
|
2709
|
-
|
|
2717
|
+
h,
|
|
2710
2718
|
e.disabled ?? !1
|
|
2711
|
-
)((w,
|
|
2719
|
+
)((w, g) => !w || g)
|
|
2712
2720
|
),
|
|
2713
|
-
$.click((w) =>
|
|
2714
|
-
B.label(
|
|
2721
|
+
$.click((w) => b(1n, w)),
|
|
2722
|
+
B.label(v.$.incrementValue),
|
|
2715
2723
|
ee({ icon: "line-md:plus", size: "xs" })
|
|
2716
2724
|
),
|
|
2717
|
-
|
|
2725
|
+
d.button(
|
|
2718
2726
|
s.type("button"),
|
|
2719
2727
|
s.class(
|
|
2720
2728
|
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
|
|
2721
2729
|
),
|
|
2722
2730
|
s.disabled(
|
|
2723
2731
|
S(
|
|
2724
|
-
|
|
2732
|
+
y,
|
|
2725
2733
|
e.disabled ?? !1
|
|
2726
|
-
)((w,
|
|
2734
|
+
)((w, g) => !w || g)
|
|
2727
2735
|
),
|
|
2728
|
-
$.click((w) =>
|
|
2729
|
-
B.label(
|
|
2736
|
+
$.click((w) => b(-1n, w)),
|
|
2737
|
+
B.label(v.$.decrementValue),
|
|
2730
2738
|
ee({ icon: "line-md:minus", size: "xs" })
|
|
2731
2739
|
)
|
|
2732
2740
|
);
|
|
2733
|
-
}) : null,
|
|
2734
|
-
const
|
|
2735
|
-
|
|
2736
|
-
} : void 0, x = i ? (
|
|
2737
|
-
const
|
|
2738
|
-
|
|
2741
|
+
}) : null, f = u != null && o != null ? E(o, u) : u ?? o, p = l ? (v) => {
|
|
2742
|
+
const y = Ct(v);
|
|
2743
|
+
y != null && l(c(y));
|
|
2744
|
+
} : void 0, x = i ? (v) => {
|
|
2745
|
+
const y = Ct(v);
|
|
2746
|
+
y != null && i(c(y));
|
|
2739
2747
|
} : void 0;
|
|
2740
2748
|
return Le({
|
|
2741
2749
|
...e,
|
|
2742
|
-
value: m.map(t, (
|
|
2743
|
-
onChange:
|
|
2750
|
+
value: m.map(t, (v) => v.toString()),
|
|
2751
|
+
onChange: p,
|
|
2744
2752
|
onInput: x,
|
|
2745
|
-
after:
|
|
2753
|
+
after: f,
|
|
2746
2754
|
mask: null,
|
|
2747
2755
|
allowMode: "digits",
|
|
2748
2756
|
class: "bc-number-input"
|
|
@@ -2755,74 +2763,74 @@ const pr = (e) => {
|
|
|
2755
2763
|
return null;
|
|
2756
2764
|
}
|
|
2757
2765
|
}, yr = (e) => {
|
|
2758
|
-
const { value: t, step: n, min: a, max: r, onChange: l, onInput: i, after: u } = e, c = (
|
|
2759
|
-
const
|
|
2760
|
-
return
|
|
2761
|
-
}, o = n != null ? ne(fe, (
|
|
2762
|
-
const
|
|
2766
|
+
const { value: t, step: n, min: a, max: r, onChange: l, onInput: i, after: u } = e, c = (y) => {
|
|
2767
|
+
const h = a != null ? m.get(a) : void 0, b = r != null ? m.get(r) : void 0;
|
|
2768
|
+
return h != null && y < h ? h : b != null && y > b ? b : y;
|
|
2769
|
+
}, o = n != null ? ne(fe, (y) => {
|
|
2770
|
+
const h = S(
|
|
2763
2771
|
t,
|
|
2764
2772
|
a
|
|
2765
|
-
)((
|
|
2766
|
-
const
|
|
2767
|
-
return
|
|
2768
|
-
}),
|
|
2773
|
+
)((g, k) => {
|
|
2774
|
+
const T = g ?? 0n;
|
|
2775
|
+
return k == null ? !0 : T > k;
|
|
2776
|
+
}), b = S(
|
|
2769
2777
|
t,
|
|
2770
2778
|
r
|
|
2771
|
-
)((
|
|
2772
|
-
const
|
|
2773
|
-
return
|
|
2774
|
-
}), w = (
|
|
2775
|
-
const
|
|
2776
|
-
if (
|
|
2779
|
+
)((g, k) => {
|
|
2780
|
+
const T = g ?? 0n;
|
|
2781
|
+
return k == null ? !0 : T < k;
|
|
2782
|
+
}), w = (g, k) => {
|
|
2783
|
+
const T = m.get(t) ?? 0n, L = m.get(n), V = k?.shiftKey ? 10n : 1n, P = T + L * V * g, I = a != null ? m.get(a) : void 0, M = r != null ? m.get(r) : void 0;
|
|
2784
|
+
if (g < 0n && I != null && P < I || g > 0n && M != null && P > M) return;
|
|
2777
2785
|
const F = c(P);
|
|
2778
|
-
F !==
|
|
2786
|
+
F !== T && l && l(F);
|
|
2779
2787
|
};
|
|
2780
2788
|
return ot(
|
|
2781
2789
|
s.class("bc-number-input-steppers"),
|
|
2782
2790
|
s.type("button"),
|
|
2783
|
-
|
|
2791
|
+
d.button(
|
|
2784
2792
|
s.class(
|
|
2785
2793
|
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
|
|
2786
2794
|
),
|
|
2787
2795
|
s.disabled(
|
|
2788
2796
|
S(
|
|
2789
|
-
|
|
2797
|
+
b,
|
|
2790
2798
|
e.disabled ?? !1
|
|
2791
|
-
)((
|
|
2799
|
+
)((g, k) => !g || k)
|
|
2792
2800
|
),
|
|
2793
|
-
$.click((
|
|
2794
|
-
B.label(
|
|
2801
|
+
$.click((g) => w(1n, g)),
|
|
2802
|
+
B.label(y.$.incrementValue),
|
|
2795
2803
|
ee({ icon: "line-md:plus", size: "xs" })
|
|
2796
2804
|
),
|
|
2797
|
-
|
|
2805
|
+
d.button(
|
|
2798
2806
|
s.type("button"),
|
|
2799
2807
|
s.class(
|
|
2800
2808
|
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
|
|
2801
2809
|
),
|
|
2802
2810
|
s.disabled(
|
|
2803
2811
|
S(
|
|
2804
|
-
|
|
2812
|
+
h,
|
|
2805
2813
|
e.disabled ?? !1
|
|
2806
|
-
)((
|
|
2814
|
+
)((g, k) => !g || k)
|
|
2807
2815
|
),
|
|
2808
|
-
$.click((
|
|
2809
|
-
B.label(
|
|
2816
|
+
$.click((g) => w(-1n, g)),
|
|
2817
|
+
B.label(y.$.decrementValue),
|
|
2810
2818
|
ee({ icon: "line-md:minus", size: "xs" })
|
|
2811
2819
|
)
|
|
2812
2820
|
);
|
|
2813
|
-
}) : null,
|
|
2814
|
-
const
|
|
2815
|
-
l(
|
|
2816
|
-
} : void 0,
|
|
2817
|
-
const
|
|
2818
|
-
i(
|
|
2821
|
+
}) : null, f = ve(t, e.disabled, l), p = u != null && o != null ? E(o, f, u) : u != null ? E(f, u) : o != null ? E(o, f) : f, x = l ? (y) => {
|
|
2822
|
+
const h = St(y);
|
|
2823
|
+
l(h === null ? null : c(h));
|
|
2824
|
+
} : void 0, v = i ? (y) => {
|
|
2825
|
+
const h = St(y);
|
|
2826
|
+
i(h === null ? null : c(h));
|
|
2819
2827
|
} : void 0;
|
|
2820
2828
|
return Le({
|
|
2821
2829
|
...e,
|
|
2822
|
-
value: m.map(t, (
|
|
2830
|
+
value: m.map(t, (y) => y == null ? "" : y.toString()),
|
|
2823
2831
|
onChange: x,
|
|
2824
|
-
onInput:
|
|
2825
|
-
after:
|
|
2832
|
+
onInput: v,
|
|
2833
|
+
after: p,
|
|
2826
2834
|
mask: null,
|
|
2827
2835
|
allowMode: "digits",
|
|
2828
2836
|
class: "bc-number-input"
|
|
@@ -3042,8 +3050,8 @@ const pr = (e) => {
|
|
|
3042
3050
|
a != null ? $.change(
|
|
3043
3051
|
W((c) => {
|
|
3044
3052
|
if (c === "") return a(null);
|
|
3045
|
-
const o = u.PlainDateTime.from(c),
|
|
3046
|
-
return a(u.ZonedDateTime.from({ ...o, timeZone:
|
|
3053
|
+
const o = u.PlainDateTime.from(c), f = m.get(e.placeholder) ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
3054
|
+
return a(u.ZonedDateTime.from({ ...o, timeZone: f }));
|
|
3047
3055
|
})
|
|
3048
3056
|
) : R
|
|
3049
3057
|
),
|
|
@@ -3311,24 +3319,24 @@ function pa({
|
|
|
3311
3319
|
onClose: u,
|
|
3312
3320
|
class: c
|
|
3313
3321
|
} = {}, ...o) {
|
|
3314
|
-
const
|
|
3315
|
-
return
|
|
3316
|
-
Y(() => m.dispose(
|
|
3322
|
+
const f = m.map(i, (p) => p != null);
|
|
3323
|
+
return d.section(
|
|
3324
|
+
Y(() => m.dispose(f)),
|
|
3317
3325
|
s.class(
|
|
3318
3326
|
S(
|
|
3319
3327
|
n,
|
|
3320
|
-
|
|
3328
|
+
f,
|
|
3321
3329
|
t,
|
|
3322
3330
|
e,
|
|
3323
3331
|
c
|
|
3324
3332
|
)(
|
|
3325
|
-
(
|
|
3333
|
+
(p, x, v, y, h) => [
|
|
3326
3334
|
da(
|
|
3327
|
-
|
|
3335
|
+
p,
|
|
3328
3336
|
x,
|
|
3329
|
-
h,
|
|
3330
3337
|
v,
|
|
3331
|
-
|
|
3338
|
+
y,
|
|
3339
|
+
h
|
|
3332
3340
|
)
|
|
3333
3341
|
].join(" ")
|
|
3334
3342
|
)
|
|
@@ -3338,14 +3346,14 @@ function pa({
|
|
|
3338
3346
|
a,
|
|
3339
3347
|
r
|
|
3340
3348
|
)(
|
|
3341
|
-
(
|
|
3349
|
+
(p, x) => fa(p, x)
|
|
3342
3350
|
)
|
|
3343
3351
|
),
|
|
3344
3352
|
B.live("polite"),
|
|
3345
3353
|
B.busy(e),
|
|
3346
3354
|
J(
|
|
3347
3355
|
e,
|
|
3348
|
-
() =>
|
|
3356
|
+
() => d.div(
|
|
3349
3357
|
s.class("bc-notification__visual bc-notification__loader"),
|
|
3350
3358
|
ee({
|
|
3351
3359
|
icon: "line-md:loading-twotone-loop",
|
|
@@ -3355,25 +3363,25 @@ function pa({
|
|
|
3355
3363
|
})
|
|
3356
3364
|
),
|
|
3357
3365
|
() => J(
|
|
3358
|
-
|
|
3359
|
-
() =>
|
|
3366
|
+
f,
|
|
3367
|
+
() => d.div(
|
|
3360
3368
|
s.class("bc-notification__visual bc-notification__icon"),
|
|
3361
3369
|
ee({ icon: i, size: "lg", color: a })
|
|
3362
3370
|
),
|
|
3363
|
-
() =>
|
|
3371
|
+
() => d.div(
|
|
3364
3372
|
s.class("bc-notification__visual bc-notification__accent"),
|
|
3365
3373
|
B.hidden(!0)
|
|
3366
3374
|
)
|
|
3367
3375
|
)
|
|
3368
3376
|
),
|
|
3369
|
-
|
|
3377
|
+
d.div(
|
|
3370
3378
|
s.class("bc-notification__body"),
|
|
3371
|
-
l != null ?
|
|
3372
|
-
|
|
3379
|
+
l != null ? d.div(s.class("bc-notification__title"), l) : null,
|
|
3380
|
+
d.div(s.class("bc-notification__content"), ...o)
|
|
3373
3381
|
),
|
|
3374
3382
|
J(
|
|
3375
3383
|
t,
|
|
3376
|
-
() =>
|
|
3384
|
+
() => d.div(
|
|
3377
3385
|
s.class("bc-notification__meta"),
|
|
3378
3386
|
qe({
|
|
3379
3387
|
size: "sm",
|
|
@@ -3418,26 +3426,26 @@ const ga = new ba(), an = {
|
|
|
3418
3426
|
o >= 0 && n.splice(o, 1);
|
|
3419
3427
|
};
|
|
3420
3428
|
}
|
|
3421
|
-
const r = [], l = ({ dismissAfter: c, onClose: o, animation:
|
|
3422
|
-
t.update((
|
|
3423
|
-
const
|
|
3424
|
-
animation:
|
|
3425
|
-
class: m.toSignal(
|
|
3426
|
-
loading: m.toSignal(
|
|
3429
|
+
const r = [], l = ({ dismissAfter: c, onClose: o, animation: f = { fade: !0 }, ...p }, ...x) => {
|
|
3430
|
+
t.update((h) => h + 1);
|
|
3431
|
+
const v = c != null ? typeof c == "number" ? Dn(c * 1e3) : c : void 0, y = {
|
|
3432
|
+
animation: f,
|
|
3433
|
+
class: m.toSignal(p.class),
|
|
3434
|
+
loading: m.toSignal(p.loading ?? !1),
|
|
3427
3435
|
withCloseButton: m.toSignal(
|
|
3428
|
-
|
|
3436
|
+
p.withCloseButton == null && c == null ? !0 : p.withCloseButton ?? !0
|
|
3429
3437
|
),
|
|
3430
|
-
withBorder: m.toSignal(
|
|
3431
|
-
color: m.toSignal(
|
|
3432
|
-
radius: m.toSignal(
|
|
3433
|
-
title:
|
|
3434
|
-
icon: m.toSignal(
|
|
3438
|
+
withBorder: m.toSignal(p.withBorder ?? !1),
|
|
3439
|
+
color: m.toSignal(p.color ?? "primary"),
|
|
3440
|
+
radius: m.toSignal(p.radius ?? "md"),
|
|
3441
|
+
title: p.title ?? R,
|
|
3442
|
+
icon: m.toSignal(p.icon),
|
|
3435
3443
|
children: x,
|
|
3436
|
-
listenRequestClose: (
|
|
3444
|
+
listenRequestClose: (h) => (r.push(h), o?.(), () => {
|
|
3437
3445
|
}),
|
|
3438
|
-
delayedClose:
|
|
3446
|
+
delayedClose: v
|
|
3439
3447
|
};
|
|
3440
|
-
n.forEach((
|
|
3448
|
+
n.forEach((h) => h(y));
|
|
3441
3449
|
}, i = () => {
|
|
3442
3450
|
r.forEach((c) => c()), r.length = 0;
|
|
3443
3451
|
}, u = ga.attach({ show: l, clear: i });
|
|
@@ -3456,13 +3464,13 @@ const ga = new ba(), an = {
|
|
|
3456
3464
|
}
|
|
3457
3465
|
};
|
|
3458
3466
|
function ma() {
|
|
3459
|
-
return ne(an, ({ listenOnShow: e, position: t }) =>
|
|
3467
|
+
return ne(an, ({ listenOnShow: e, position: t }) => d.div(
|
|
3460
3468
|
s.class("bc-notification-viewport"),
|
|
3461
3469
|
s.class(`bc-notification-viewport--${t}`),
|
|
3462
3470
|
un(
|
|
3463
3471
|
(n) => Y(
|
|
3464
3472
|
e((a) => {
|
|
3465
|
-
const r = [], l =
|
|
3473
|
+
const r = [], l = d.div(
|
|
3466
3474
|
wn(
|
|
3467
3475
|
{
|
|
3468
3476
|
animation: a.animation,
|
|
@@ -3513,7 +3521,7 @@ function Ur({
|
|
|
3513
3521
|
);
|
|
3514
3522
|
return e ? pn(
|
|
3515
3523
|
() => import("./translations-BaKCl3Vc.js"),
|
|
3516
|
-
({ AuthI18n:
|
|
3524
|
+
({ AuthI18n: f }) => Lt(f, {}, () => o)
|
|
3517
3525
|
) : o;
|
|
3518
3526
|
});
|
|
3519
3527
|
}
|
|
@@ -3528,32 +3536,32 @@ function jr({
|
|
|
3528
3536
|
navpanes: u = !0,
|
|
3529
3537
|
search: c,
|
|
3530
3538
|
nameddest: o,
|
|
3531
|
-
viewrect:
|
|
3532
|
-
highlight:
|
|
3539
|
+
viewrect: f,
|
|
3540
|
+
highlight: p,
|
|
3533
3541
|
allowfullscreen: x = !1
|
|
3534
3542
|
}) {
|
|
3535
|
-
const
|
|
3543
|
+
const v = m.toSignal(
|
|
3536
3544
|
e
|
|
3537
|
-
).mapAsync(async (
|
|
3538
|
-
if (
|
|
3539
|
-
const
|
|
3545
|
+
).mapAsync(async (h) => {
|
|
3546
|
+
if (h instanceof Blob) {
|
|
3547
|
+
const b = await h.arrayBuffer(), w = new Blob([b], { type: "application/pdf" });
|
|
3540
3548
|
return URL.createObjectURL(w);
|
|
3541
3549
|
} else {
|
|
3542
|
-
if (
|
|
3550
|
+
if (h instanceof ArrayBuffer)
|
|
3543
3551
|
return URL.createObjectURL(
|
|
3544
|
-
new Blob([
|
|
3552
|
+
new Blob([h], { type: "application/pdf" })
|
|
3545
3553
|
);
|
|
3546
|
-
if (
|
|
3554
|
+
if (h instanceof Uint8Array)
|
|
3547
3555
|
return URL.createObjectURL(
|
|
3548
|
-
new Blob([new Uint8Array(
|
|
3556
|
+
new Blob([new Uint8Array(h)], { type: "application/pdf" })
|
|
3549
3557
|
);
|
|
3550
|
-
if (typeof
|
|
3551
|
-
const w = await (await fetch(
|
|
3552
|
-
return URL.createObjectURL(
|
|
3558
|
+
if (typeof h == "string") {
|
|
3559
|
+
const w = await (await fetch(h)).arrayBuffer(), g = new Blob([w], { type: "application/pdf" });
|
|
3560
|
+
return URL.createObjectURL(g);
|
|
3553
3561
|
}
|
|
3554
3562
|
}
|
|
3555
|
-
}, null),
|
|
3556
|
-
|
|
3563
|
+
}, null), y = S(
|
|
3564
|
+
v,
|
|
3557
3565
|
t,
|
|
3558
3566
|
n,
|
|
3559
3567
|
a,
|
|
@@ -3563,42 +3571,42 @@ function jr({
|
|
|
3563
3571
|
u,
|
|
3564
3572
|
c,
|
|
3565
3573
|
o,
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
)((
|
|
3569
|
-
if (
|
|
3574
|
+
f,
|
|
3575
|
+
p
|
|
3576
|
+
)((h, b, w, g, k, T, L, V, P, I, M, F) => {
|
|
3577
|
+
if (h == null) return null;
|
|
3570
3578
|
const O = [];
|
|
3571
|
-
|
|
3579
|
+
b === !1 && O.push("toolbar=0"), w != null && w > 0 && O.push(`page=${w}`), g != null && g > 0 && O.push(`zoom=${g}`), k != null && O.push(`view=${k}`), T != null && O.push(`pagemode=${T}`), L === !1 && O.push("scrollbar=0"), V === !1 && O.push("navpanes=0"), P != null && O.push(`search=${encodeURIComponent(P)}`), I != null && O.push(`nameddest=${encodeURIComponent(I)}`), M != null && O.push(`viewrect=${encodeURIComponent(M)}`), F != null && O.push(`highlight=${encodeURIComponent(F)}`);
|
|
3572
3580
|
const H = O.join("&");
|
|
3573
|
-
return H ? `${
|
|
3581
|
+
return H ? `${h}#${H}` : h;
|
|
3574
3582
|
});
|
|
3575
|
-
return
|
|
3583
|
+
return d.div(
|
|
3576
3584
|
Y(
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3585
|
+
y,
|
|
3586
|
+
v.on((h, b) => {
|
|
3587
|
+
b != null && URL.revokeObjectURL(b);
|
|
3580
3588
|
}),
|
|
3581
3589
|
() => {
|
|
3582
|
-
const
|
|
3583
|
-
|
|
3590
|
+
const h = v.value;
|
|
3591
|
+
h != null && URL.revokeObjectURL(h);
|
|
3584
3592
|
}
|
|
3585
3593
|
),
|
|
3586
3594
|
s.class("h-full w-full"),
|
|
3587
3595
|
// could also use embed or object. IFrame seems to work on Safari.
|
|
3588
|
-
|
|
3596
|
+
d.iframe(
|
|
3589
3597
|
s.class("h-full w-full"),
|
|
3590
3598
|
s.allowfullscreen(x),
|
|
3591
3599
|
s.title("PDF Preview"),
|
|
3592
3600
|
s.loading("lazy"),
|
|
3593
3601
|
// Force iframe reload when URL changes (including fragment changes)
|
|
3594
3602
|
// by manually updating src instead of using attr.src
|
|
3595
|
-
ae((
|
|
3596
|
-
const
|
|
3603
|
+
ae((h) => {
|
|
3604
|
+
const b = h;
|
|
3597
3605
|
let w = !0;
|
|
3598
3606
|
return Y(
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3607
|
+
y.on((g) => {
|
|
3608
|
+
g != null && (w ? (b.src = g, w = !1) : (b.src = "about:blank", setTimeout(() => {
|
|
3609
|
+
b.src = g;
|
|
3602
3610
|
}, 50)));
|
|
3603
3611
|
})
|
|
3604
3612
|
);
|
|
@@ -3617,13 +3625,13 @@ function Hr({
|
|
|
3617
3625
|
sidebarViewOnLoad: u,
|
|
3618
3626
|
scrollModeOnLoad: c,
|
|
3619
3627
|
spreadModeOnLoad: o,
|
|
3620
|
-
enableScripting:
|
|
3621
|
-
enablePrinting:
|
|
3628
|
+
enableScripting: f,
|
|
3629
|
+
enablePrinting: p,
|
|
3622
3630
|
viewerUrl: x = null,
|
|
3623
|
-
allowfullscreen:
|
|
3624
|
-
class:
|
|
3631
|
+
allowfullscreen: v = !0,
|
|
3632
|
+
class: y = null
|
|
3625
3633
|
}) {
|
|
3626
|
-
const
|
|
3634
|
+
const h = m.toSignal(
|
|
3627
3635
|
e
|
|
3628
3636
|
).mapAsync(async (w) => {
|
|
3629
3637
|
if (w instanceof Blob)
|
|
@@ -3638,8 +3646,8 @@ function Hr({
|
|
|
3638
3646
|
);
|
|
3639
3647
|
if (typeof w == "string")
|
|
3640
3648
|
return w;
|
|
3641
|
-
}, null),
|
|
3642
|
-
|
|
3649
|
+
}, null), b = S(
|
|
3650
|
+
h,
|
|
3643
3651
|
x,
|
|
3644
3652
|
t,
|
|
3645
3653
|
n,
|
|
@@ -3650,48 +3658,48 @@ function Hr({
|
|
|
3650
3658
|
u,
|
|
3651
3659
|
c,
|
|
3652
3660
|
o,
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
)((w,
|
|
3661
|
+
f,
|
|
3662
|
+
p
|
|
3663
|
+
)((w, g, k, T, L, V, P, I, M, F, O, H, oe) => {
|
|
3656
3664
|
if (w == null) return null;
|
|
3657
|
-
const Q =
|
|
3665
|
+
const Q = g ?? "https://mozilla.github.io/pdf.js/web/viewer.html", U = new URLSearchParams();
|
|
3658
3666
|
U.set("file", encodeURIComponent(w));
|
|
3659
3667
|
const X = [];
|
|
3660
|
-
|
|
3668
|
+
k != null && k > 0 && X.push(`page=${k}`), T != null && (typeof T == "string" ? X.push(`zoom=${T}`) : X.push(`zoom=${T}`)), L != null && X.push(`pagemode=${L}`), V != null && X.push(`nameddest=${encodeURIComponent(V)}`), P != null && X.push(`search=${encodeURIComponent(P)}`), I != null && X.push(`textLayer=${I}`), M != null && X.push(`sidebar=${M}`), F != null && X.push(`scrollMode=${F}`), O != null && X.push(`spreadMode=${O}`), H != null && X.push(`enableScripting=${H ? "1" : "0"}`), oe != null && X.push(`enablePrinting=${oe ? "1" : "0"}`);
|
|
3661
3669
|
const pe = X.length > 0 ? `#${X.join("&")}` : "";
|
|
3662
3670
|
return `${Q}?${U.toString()}${pe}`;
|
|
3663
3671
|
});
|
|
3664
|
-
return
|
|
3672
|
+
return d.div(
|
|
3665
3673
|
Y(
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3674
|
+
b,
|
|
3675
|
+
h.on((w, g) => {
|
|
3676
|
+
g != null && g.startsWith("blob:") && URL.revokeObjectURL(g);
|
|
3669
3677
|
}),
|
|
3670
3678
|
() => {
|
|
3671
|
-
const w =
|
|
3679
|
+
const w = h.value;
|
|
3672
3680
|
w != null && w.startsWith("blob:") && URL.revokeObjectURL(w);
|
|
3673
3681
|
}
|
|
3674
3682
|
),
|
|
3675
3683
|
s.class("bc-pdfjs-preview h-full w-full"),
|
|
3676
|
-
s.class(
|
|
3677
|
-
|
|
3684
|
+
s.class(y),
|
|
3685
|
+
d.iframe(
|
|
3678
3686
|
s.class("h-full w-full"),
|
|
3679
|
-
s.allowfullscreen(
|
|
3687
|
+
s.allowfullscreen(v),
|
|
3680
3688
|
s.title("PDF Preview"),
|
|
3681
3689
|
s.loading("lazy"),
|
|
3682
|
-
s.src(
|
|
3690
|
+
s.src(b)
|
|
3683
3691
|
)
|
|
3684
3692
|
);
|
|
3685
3693
|
}
|
|
3686
|
-
const zr = ({ id: e, css: t }) => at("head",
|
|
3694
|
+
const zr = ({ id: e, css: t }) => at("head", d.style(s.id(e), s.innerHTML(t)));
|
|
3687
3695
|
function ge(e, t) {
|
|
3688
|
-
return t == null ? null :
|
|
3696
|
+
return t == null ? null : d.meta(
|
|
3689
3697
|
s.name(e),
|
|
3690
3698
|
s.content(m.map(t, (n) => String(n)))
|
|
3691
3699
|
);
|
|
3692
3700
|
}
|
|
3693
3701
|
function q(e, t) {
|
|
3694
|
-
return t == null ? null :
|
|
3702
|
+
return t == null ? null : d.meta(
|
|
3695
3703
|
s.property(e),
|
|
3696
3704
|
s.content(m.map(t, (n) => String(n)))
|
|
3697
3705
|
);
|
|
@@ -3734,7 +3742,7 @@ const Wr = (e) => {
|
|
|
3734
3742
|
"twitter:image:alt",
|
|
3735
3743
|
Te(e.twitterImageAlt, e.imageAlt)
|
|
3736
3744
|
)
|
|
3737
|
-
), e.canonical != null && m.get(e.canonical) != null && t.push(
|
|
3745
|
+
), e.canonical != null && m.get(e.canonical) != null && t.push(d.link(s.rel("canonical"), s.href(e.canonical))), t.push(ge("robots", e.robots)), t.push(ge("keywords", e.keywords)), t.push(ge("author", e.metaAuthor)), at("head", t.filter((n) => n != null).flat());
|
|
3738
3746
|
}, it = ({
|
|
3739
3747
|
viewTransition: e,
|
|
3740
3748
|
state: t,
|
|
@@ -3783,23 +3791,23 @@ function va({
|
|
|
3783
3791
|
scroll: u,
|
|
3784
3792
|
replace: c,
|
|
3785
3793
|
target: o,
|
|
3786
|
-
rel:
|
|
3787
|
-
}, ...
|
|
3794
|
+
rel: f
|
|
3795
|
+
}, ...p) {
|
|
3788
3796
|
return J(
|
|
3789
3797
|
r,
|
|
3790
|
-
() =>
|
|
3798
|
+
() => d.span(
|
|
3791
3799
|
s.class(
|
|
3792
3800
|
S(
|
|
3793
3801
|
t,
|
|
3794
3802
|
r
|
|
3795
|
-
)((x,
|
|
3803
|
+
)((x, v) => It(x, v))
|
|
3796
3804
|
),
|
|
3797
3805
|
s.style(
|
|
3798
3806
|
S(a)(
|
|
3799
3807
|
(x) => $t(x ?? "base")
|
|
3800
3808
|
)
|
|
3801
3809
|
),
|
|
3802
|
-
...
|
|
3810
|
+
...p
|
|
3803
3811
|
),
|
|
3804
3812
|
() => rt(
|
|
3805
3813
|
{
|
|
@@ -3815,14 +3823,14 @@ function va({
|
|
|
3815
3823
|
S(
|
|
3816
3824
|
t,
|
|
3817
3825
|
r
|
|
3818
|
-
)((x,
|
|
3826
|
+
)((x, v) => It(x, v))
|
|
3819
3827
|
),
|
|
3820
3828
|
s.style(
|
|
3821
3829
|
S(n)((x) => $t(x ?? "primary"))
|
|
3822
3830
|
),
|
|
3823
3831
|
o ? s.target(o) : null,
|
|
3824
|
-
|
|
3825
|
-
...
|
|
3832
|
+
f ? s.rel(f) : null,
|
|
3833
|
+
...p
|
|
3826
3834
|
)
|
|
3827
3835
|
);
|
|
3828
3836
|
}
|
|
@@ -3848,10 +3856,10 @@ function xa(e, t, n) {
|
|
|
3848
3856
|
return !1;
|
|
3849
3857
|
const o = Array.from(
|
|
3850
3858
|
new URLSearchParams(c.search).entries()
|
|
3851
|
-
).sort(),
|
|
3852
|
-
return o.length !==
|
|
3853
|
-
const [
|
|
3854
|
-
return
|
|
3859
|
+
).sort(), f = Array.from(a.entries()).sort();
|
|
3860
|
+
return o.length !== f.length ? !1 : o.every(([p, x], v) => {
|
|
3861
|
+
const [y, h] = f[v];
|
|
3862
|
+
return p === y && x === h;
|
|
3855
3863
|
});
|
|
3856
3864
|
} catch {
|
|
3857
3865
|
return e.pathname === t;
|
|
@@ -3899,19 +3907,19 @@ function qr({
|
|
|
3899
3907
|
matchMode: u,
|
|
3900
3908
|
disableWhenActive: c,
|
|
3901
3909
|
variant: o = "filled",
|
|
3902
|
-
size:
|
|
3903
|
-
color:
|
|
3910
|
+
size: f = "md",
|
|
3911
|
+
color: p = "base",
|
|
3904
3912
|
roundedness: x = "sm",
|
|
3905
|
-
disabled:
|
|
3906
|
-
}, ...
|
|
3907
|
-
return u !== void 0 || c !== void 0 ? ne(Ve, (
|
|
3908
|
-
const
|
|
3909
|
-
|
|
3913
|
+
disabled: v = !1
|
|
3914
|
+
}, ...y) {
|
|
3915
|
+
return u !== void 0 || c !== void 0 ? ne(Ve, (h) => {
|
|
3916
|
+
const b = u !== void 0 ? h.matchSignal(ct(e, u)) : S(h.location)(() => !1), w = S(
|
|
3917
|
+
b,
|
|
3910
3918
|
c
|
|
3911
|
-
)((
|
|
3912
|
-
|
|
3919
|
+
)((k, T) => !(T ?? !0) || !u ? !1 : k), g = S(
|
|
3920
|
+
v,
|
|
3913
3921
|
w
|
|
3914
|
-
)((
|
|
3922
|
+
)((k, T) => k || T);
|
|
3915
3923
|
return Tt(
|
|
3916
3924
|
{
|
|
3917
3925
|
href: e,
|
|
@@ -3922,12 +3930,12 @@ function qr({
|
|
|
3922
3930
|
target: l,
|
|
3923
3931
|
rel: i,
|
|
3924
3932
|
variant: o,
|
|
3925
|
-
size:
|
|
3926
|
-
color:
|
|
3933
|
+
size: f,
|
|
3934
|
+
color: p,
|
|
3927
3935
|
roundedness: x,
|
|
3928
|
-
disabled:
|
|
3936
|
+
disabled: g
|
|
3929
3937
|
},
|
|
3930
|
-
...
|
|
3938
|
+
...y
|
|
3931
3939
|
);
|
|
3932
3940
|
}) : Tt(
|
|
3933
3941
|
{
|
|
@@ -3939,12 +3947,12 @@ function qr({
|
|
|
3939
3947
|
target: l,
|
|
3940
3948
|
rel: i,
|
|
3941
3949
|
variant: o,
|
|
3942
|
-
size:
|
|
3943
|
-
color:
|
|
3950
|
+
size: f,
|
|
3951
|
+
color: p,
|
|
3944
3952
|
roundedness: x,
|
|
3945
|
-
disabled:
|
|
3953
|
+
disabled: v
|
|
3946
3954
|
},
|
|
3947
|
-
...
|
|
3955
|
+
...y
|
|
3948
3956
|
);
|
|
3949
3957
|
}
|
|
3950
3958
|
function Tt({
|
|
@@ -3958,19 +3966,19 @@ function Tt({
|
|
|
3958
3966
|
variant: u = "default",
|
|
3959
3967
|
size: c = "md",
|
|
3960
3968
|
color: o = "base",
|
|
3961
|
-
roundedness:
|
|
3962
|
-
disabled:
|
|
3969
|
+
roundedness: f = "sm",
|
|
3970
|
+
disabled: p = !1,
|
|
3963
3971
|
fullWidth: x = !1,
|
|
3964
|
-
loading:
|
|
3965
|
-
}, ...
|
|
3972
|
+
loading: v = !1
|
|
3973
|
+
}, ...y) {
|
|
3966
3974
|
return J(
|
|
3967
|
-
|
|
3968
|
-
() =>
|
|
3975
|
+
p ?? !1,
|
|
3976
|
+
() => d.span(
|
|
3969
3977
|
s.class(
|
|
3970
3978
|
S(
|
|
3971
3979
|
c,
|
|
3972
|
-
|
|
3973
|
-
|
|
3980
|
+
f,
|
|
3981
|
+
v,
|
|
3974
3982
|
x
|
|
3975
3983
|
)(bt)
|
|
3976
3984
|
),
|
|
@@ -3978,16 +3986,16 @@ function Tt({
|
|
|
3978
3986
|
S(
|
|
3979
3987
|
u,
|
|
3980
3988
|
o,
|
|
3981
|
-
|
|
3989
|
+
p
|
|
3982
3990
|
)(
|
|
3983
|
-
(
|
|
3984
|
-
|
|
3985
|
-
|
|
3991
|
+
(h, b, w) => gt(
|
|
3992
|
+
h ?? "filled",
|
|
3993
|
+
b ?? "base",
|
|
3986
3994
|
w
|
|
3987
3995
|
)
|
|
3988
3996
|
)
|
|
3989
3997
|
),
|
|
3990
|
-
...
|
|
3998
|
+
...y
|
|
3991
3999
|
),
|
|
3992
4000
|
() => rt(
|
|
3993
4001
|
{
|
|
@@ -4002,8 +4010,8 @@ function Tt({
|
|
|
4002
4010
|
s.class(
|
|
4003
4011
|
S(
|
|
4004
4012
|
c,
|
|
4005
|
-
|
|
4006
|
-
|
|
4013
|
+
f,
|
|
4014
|
+
v,
|
|
4007
4015
|
x
|
|
4008
4016
|
)(bt)
|
|
4009
4017
|
),
|
|
@@ -4011,18 +4019,18 @@ function Tt({
|
|
|
4011
4019
|
S(
|
|
4012
4020
|
u,
|
|
4013
4021
|
o,
|
|
4014
|
-
|
|
4022
|
+
p
|
|
4015
4023
|
)(
|
|
4016
|
-
(
|
|
4017
|
-
|
|
4018
|
-
|
|
4024
|
+
(h, b, w) => gt(
|
|
4025
|
+
h ?? "filled",
|
|
4026
|
+
b ?? "base",
|
|
4019
4027
|
w
|
|
4020
4028
|
)
|
|
4021
4029
|
)
|
|
4022
4030
|
),
|
|
4023
4031
|
l ? s.target(l) : null,
|
|
4024
4032
|
i ? s.rel(i) : null,
|
|
4025
|
-
...
|
|
4033
|
+
...y
|
|
4026
4034
|
)
|
|
4027
4035
|
);
|
|
4028
4036
|
}
|
|
@@ -4045,7 +4053,7 @@ function Zr({ backgroundMode: e = "light" }, ...t) {
|
|
|
4045
4053
|
backgroundMode: n
|
|
4046
4054
|
})
|
|
4047
4055
|
),
|
|
4048
|
-
() =>
|
|
4056
|
+
() => d.div(
|
|
4049
4057
|
s.class("bc-sidebar"),
|
|
4050
4058
|
s.class(
|
|
4051
4059
|
m.map(
|
|
@@ -4059,8 +4067,8 @@ function Zr({ backgroundMode: e = "light" }, ...t) {
|
|
|
4059
4067
|
}
|
|
4060
4068
|
function _t({ rail: e, header: t }, ...n) {
|
|
4061
4069
|
return ot(
|
|
4062
|
-
t != null ?
|
|
4063
|
-
|
|
4070
|
+
t != null ? d.div(s.class("bc-sidebar-group__header"), t) : null,
|
|
4071
|
+
d.div(
|
|
4064
4072
|
s.class(
|
|
4065
4073
|
m.map(
|
|
4066
4074
|
e ?? !1,
|
|
@@ -4082,10 +4090,10 @@ function Ca(e, ...t) {
|
|
|
4082
4090
|
return rt({ href: e.href, ...n }, ...t);
|
|
4083
4091
|
}
|
|
4084
4092
|
function Sa(...e) {
|
|
4085
|
-
return
|
|
4093
|
+
return d.span(...e);
|
|
4086
4094
|
}
|
|
4087
4095
|
function Ia(e, ...t) {
|
|
4088
|
-
return
|
|
4096
|
+
return d.button(
|
|
4089
4097
|
s.type("button"),
|
|
4090
4098
|
$.click(e.onClick),
|
|
4091
4099
|
e.ariaExpanded != null ? B.expanded(
|
|
@@ -4102,16 +4110,16 @@ function Ia(e, ...t) {
|
|
|
4102
4110
|
function $a(e) {
|
|
4103
4111
|
const t = [s.class("bc-sidebar-link")];
|
|
4104
4112
|
return e.icon != null && t.push(
|
|
4105
|
-
|
|
4113
|
+
d.span(
|
|
4106
4114
|
s.class("bc-sidebar-link--icon"),
|
|
4107
4115
|
ee({ icon: e.icon })
|
|
4108
4116
|
)
|
|
4109
4117
|
), t.push(
|
|
4110
|
-
|
|
4118
|
+
d.span(s.class("bc-sidebar-link__content"), e.content)
|
|
4111
4119
|
), e.right != null && t.push(
|
|
4112
|
-
|
|
4120
|
+
d.span(s.class("bc-sidebar-link__right"), e.right)
|
|
4113
4121
|
), e.action != null && t.push(
|
|
4114
|
-
|
|
4122
|
+
d.button(
|
|
4115
4123
|
s.type("button"),
|
|
4116
4124
|
s.class("bc-sidebar-link--action"),
|
|
4117
4125
|
$.click((n, a) => {
|
|
@@ -4158,7 +4166,7 @@ function Gr({
|
|
|
4158
4166
|
// Add ARIA attributes for the toggle button
|
|
4159
4167
|
ariaExpanded: l,
|
|
4160
4168
|
ariaControls: u,
|
|
4161
|
-
right:
|
|
4169
|
+
right: d.span(
|
|
4162
4170
|
s.class("bc-sidebar-group-collapsible-indicator"),
|
|
4163
4171
|
ee({ icon: "lucide:chevron-down", color: "base" })
|
|
4164
4172
|
),
|
|
@@ -4168,7 +4176,7 @@ function Gr({
|
|
|
4168
4176
|
);
|
|
4169
4177
|
}
|
|
4170
4178
|
function Kr() {
|
|
4171
|
-
return
|
|
4179
|
+
return d.hr(s.class("bc-sidebar-separator"));
|
|
4172
4180
|
}
|
|
4173
4181
|
function Ta(e, t, n, a) {
|
|
4174
4182
|
const r = ["bc-tabs", `bc-tabs--${e}`, `bc-tabs--${t}`];
|
|
@@ -4213,41 +4221,41 @@ function Qr(e) {
|
|
|
4213
4221
|
disabled: u = !1,
|
|
4214
4222
|
orientation: c = "horizontal",
|
|
4215
4223
|
showContent: o = !0,
|
|
4216
|
-
ariaLabel:
|
|
4217
|
-
} = e,
|
|
4224
|
+
ariaLabel: f
|
|
4225
|
+
} = e, p = he("tablist"), x = G(-1), v = S(n)((h) => t.find((b) => b.key === h)), y = (h) => {
|
|
4218
4226
|
if (m.get(u)) return;
|
|
4219
|
-
const w = x.value,
|
|
4220
|
-
let
|
|
4221
|
-
switch (
|
|
4222
|
-
case (
|
|
4223
|
-
|
|
4227
|
+
const w = x.value, g = m.get(c) === "horizontal";
|
|
4228
|
+
let k = w;
|
|
4229
|
+
switch (h.key) {
|
|
4230
|
+
case (g ? "ArrowRight" : "ArrowDown"):
|
|
4231
|
+
h.preventDefault(), k = Ue(w, t, 1);
|
|
4224
4232
|
break;
|
|
4225
|
-
case (
|
|
4226
|
-
|
|
4233
|
+
case (g ? "ArrowLeft" : "ArrowUp"):
|
|
4234
|
+
h.preventDefault(), k = Ue(w, t, -1);
|
|
4227
4235
|
break;
|
|
4228
4236
|
case "Home":
|
|
4229
|
-
|
|
4237
|
+
h.preventDefault(), k = Ue(-1, t, 1);
|
|
4230
4238
|
break;
|
|
4231
4239
|
case "End":
|
|
4232
|
-
|
|
4240
|
+
h.preventDefault(), k = Ue(t.length, t, -1);
|
|
4233
4241
|
break;
|
|
4234
4242
|
case "Enter":
|
|
4235
4243
|
case " ":
|
|
4236
|
-
if (
|
|
4237
|
-
const
|
|
4238
|
-
m.get(
|
|
4244
|
+
if (h.preventDefault(), w >= 0 && w < t.length) {
|
|
4245
|
+
const T = t[w];
|
|
4246
|
+
m.get(T.disabled ?? !1) || a?.(T.key);
|
|
4239
4247
|
}
|
|
4240
4248
|
break;
|
|
4241
4249
|
}
|
|
4242
|
-
|
|
4243
|
-
const
|
|
4244
|
-
`[data-tab-index="${
|
|
4250
|
+
k !== w && k >= 0 && k < t.length && (x.set(k), setTimeout(() => {
|
|
4251
|
+
const T = document.querySelector(
|
|
4252
|
+
`[data-tab-index="${k}"]`
|
|
4245
4253
|
);
|
|
4246
|
-
|
|
4254
|
+
T && T.focus();
|
|
4247
4255
|
}, 0));
|
|
4248
4256
|
};
|
|
4249
|
-
return
|
|
4250
|
-
Y(
|
|
4257
|
+
return d.div(
|
|
4258
|
+
Y(v, x),
|
|
4251
4259
|
s.class(
|
|
4252
4260
|
S(
|
|
4253
4261
|
r,
|
|
@@ -4255,11 +4263,11 @@ function Qr(e) {
|
|
|
4255
4263
|
u,
|
|
4256
4264
|
l
|
|
4257
4265
|
)(
|
|
4258
|
-
(
|
|
4259
|
-
|
|
4260
|
-
|
|
4266
|
+
(h, b, w, g) => Ta(
|
|
4267
|
+
h ?? "md",
|
|
4268
|
+
b ?? "horizontal",
|
|
4261
4269
|
w ?? !1,
|
|
4262
|
-
|
|
4270
|
+
g ?? "default"
|
|
4263
4271
|
)
|
|
4264
4272
|
)
|
|
4265
4273
|
),
|
|
@@ -4268,32 +4276,32 @@ function Qr(e) {
|
|
|
4268
4276
|
l,
|
|
4269
4277
|
i
|
|
4270
4278
|
)(
|
|
4271
|
-
(
|
|
4279
|
+
(h, b) => _a(h ?? "default", b ?? "primary")
|
|
4272
4280
|
)
|
|
4273
4281
|
),
|
|
4274
4282
|
// Tab list
|
|
4275
|
-
|
|
4283
|
+
d.div(
|
|
4276
4284
|
s.class("bc-tabs__list"),
|
|
4277
4285
|
s.role("tablist"),
|
|
4278
|
-
s.id(
|
|
4286
|
+
s.id(p),
|
|
4279
4287
|
B.orientation(
|
|
4280
4288
|
c ?? "horizontal"
|
|
4281
4289
|
),
|
|
4282
|
-
|
|
4283
|
-
$.keydown(
|
|
4284
|
-
...t.map((
|
|
4285
|
-
const w = S(n)((L) => L ===
|
|
4290
|
+
f ? B.label(f) : E(),
|
|
4291
|
+
$.keydown(y),
|
|
4292
|
+
...t.map((h, b) => {
|
|
4293
|
+
const w = S(n)((L) => L === h.key), g = S(
|
|
4286
4294
|
u,
|
|
4287
|
-
|
|
4288
|
-
)((L, V) => L || V),
|
|
4289
|
-
return
|
|
4290
|
-
Y(w,
|
|
4295
|
+
h.disabled
|
|
4296
|
+
)((L, V) => L || V), k = `${p}-tab-${h.key}`, T = `${p}-panel-${h.key}`;
|
|
4297
|
+
return d.button(
|
|
4298
|
+
Y(w, g),
|
|
4291
4299
|
s.type("button"),
|
|
4292
4300
|
s.class(
|
|
4293
4301
|
S(
|
|
4294
4302
|
r,
|
|
4295
4303
|
w,
|
|
4296
|
-
|
|
4304
|
+
g
|
|
4297
4305
|
)(
|
|
4298
4306
|
(L, V, P) => Da(
|
|
4299
4307
|
L ?? "md",
|
|
@@ -4302,45 +4310,45 @@ function Qr(e) {
|
|
|
4302
4310
|
)
|
|
4303
4311
|
)
|
|
4304
4312
|
),
|
|
4305
|
-
s.id(
|
|
4313
|
+
s.id(k),
|
|
4306
4314
|
s.role("tab"),
|
|
4307
4315
|
s.tabindex(
|
|
4308
4316
|
S(
|
|
4309
4317
|
w,
|
|
4310
4318
|
x
|
|
4311
|
-
)((L, V) => L || V ===
|
|
4319
|
+
)((L, V) => L || V === b ? 0 : -1)
|
|
4312
4320
|
),
|
|
4313
4321
|
B.selected(w),
|
|
4314
|
-
B.controls(
|
|
4315
|
-
B.disabled(
|
|
4316
|
-
s.disabled(
|
|
4317
|
-
nt["tab-index"](String(
|
|
4318
|
-
|
|
4322
|
+
B.controls(T),
|
|
4323
|
+
B.disabled(g),
|
|
4324
|
+
s.disabled(g),
|
|
4325
|
+
nt["tab-index"](String(b)),
|
|
4326
|
+
h.ariaLabel ? B.label(h.ariaLabel) : E(),
|
|
4319
4327
|
$.click((L) => {
|
|
4320
|
-
L.preventDefault(), m.get(
|
|
4328
|
+
L.preventDefault(), m.get(h.disabled ?? !1) || m.get(u) || (a?.(h.key), x.set(b));
|
|
4321
4329
|
}),
|
|
4322
4330
|
$.focus(() => {
|
|
4323
|
-
x.set(
|
|
4331
|
+
x.set(b);
|
|
4324
4332
|
}),
|
|
4325
|
-
|
|
4333
|
+
h.label
|
|
4326
4334
|
);
|
|
4327
4335
|
})
|
|
4328
4336
|
),
|
|
4329
4337
|
// Panel
|
|
4330
4338
|
J(
|
|
4331
4339
|
o ?? !0,
|
|
4332
|
-
() => Ye(
|
|
4333
|
-
const
|
|
4334
|
-
return
|
|
4335
|
-
Y(
|
|
4340
|
+
() => Ye(v, (h) => {
|
|
4341
|
+
const b = h.$.key, w = b.map((k) => `${p}-tab-${k}`), g = b.map((k) => `${p}-panel-${k}`);
|
|
4342
|
+
return d.div(
|
|
4343
|
+
Y(b),
|
|
4336
4344
|
s.class("bc-tabs__panels"),
|
|
4337
|
-
|
|
4345
|
+
d.div(
|
|
4338
4346
|
s.class("bc-tabs__panel"),
|
|
4339
|
-
s.id(
|
|
4347
|
+
s.id(g),
|
|
4340
4348
|
s.role("tabpanel"),
|
|
4341
4349
|
s.tabindex(0),
|
|
4342
4350
|
B.labelledby(w),
|
|
4343
|
-
At(
|
|
4351
|
+
At(h, (k) => k.content())
|
|
4344
4352
|
)
|
|
4345
4353
|
);
|
|
4346
4354
|
})
|
|
@@ -4355,24 +4363,24 @@ function Xr(e) {
|
|
|
4355
4363
|
const {
|
|
4356
4364
|
size: c = "md",
|
|
4357
4365
|
side: o = "right",
|
|
4358
|
-
dismissable:
|
|
4359
|
-
showCloseButton:
|
|
4366
|
+
dismissable: f = !0,
|
|
4367
|
+
showCloseButton: p = !0,
|
|
4360
4368
|
onClose: x,
|
|
4361
|
-
overlayEffect:
|
|
4362
|
-
container:
|
|
4363
|
-
header:
|
|
4364
|
-
body:
|
|
4369
|
+
overlayEffect: v = "opaque",
|
|
4370
|
+
container: y = "body",
|
|
4371
|
+
header: h,
|
|
4372
|
+
body: b,
|
|
4365
4373
|
footer: w
|
|
4366
4374
|
} = u;
|
|
4367
4375
|
a = n;
|
|
4368
|
-
const
|
|
4369
|
-
m.on(
|
|
4370
|
-
|
|
4376
|
+
const g = G("capturing");
|
|
4377
|
+
m.on(f, (L) => {
|
|
4378
|
+
g.set(L ? "capturing" : "non-capturing");
|
|
4371
4379
|
});
|
|
4372
|
-
const
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
)((L, V) => L || V),
|
|
4380
|
+
const k = S(
|
|
4381
|
+
h != null,
|
|
4382
|
+
p
|
|
4383
|
+
)((L, V) => L || V), T = ae((L) => {
|
|
4376
4384
|
const V = Me({
|
|
4377
4385
|
initialStatus: "closed",
|
|
4378
4386
|
element: L
|
|
@@ -4382,8 +4390,8 @@ function Xr(e) {
|
|
|
4382
4390
|
}), a = () => {
|
|
4383
4391
|
V.close();
|
|
4384
4392
|
}, We(() => V.open());
|
|
4385
|
-
const I = he("drawer"), M =
|
|
4386
|
-
return
|
|
4393
|
+
const I = he("drawer"), M = h != null ? `${I}-header` : void 0, F = `${I}-body`;
|
|
4394
|
+
return d.div(
|
|
4387
4395
|
Y(V),
|
|
4388
4396
|
s.class(
|
|
4389
4397
|
S(
|
|
@@ -4391,7 +4399,7 @@ function Xr(e) {
|
|
|
4391
4399
|
o,
|
|
4392
4400
|
V.status
|
|
4393
4401
|
)(
|
|
4394
|
-
(O, H, oe) => `bc-drawer bc-drawer--size-${O} bc-drawer--container-${
|
|
4402
|
+
(O, H, oe) => `bc-drawer bc-drawer--size-${O} bc-drawer--container-${y} bc-drawer--side-${H} bc-drawer--status-${oe}`
|
|
4395
4403
|
)
|
|
4396
4404
|
),
|
|
4397
4405
|
// Essential ARIA attributes for drawer dialog
|
|
@@ -4416,12 +4424,12 @@ function Xr(e) {
|
|
|
4416
4424
|
$.mousedown((O) => O.stopPropagation()),
|
|
4417
4425
|
// Prevent overlay click-outside when clicking drawer content
|
|
4418
4426
|
// Drawer content container
|
|
4419
|
-
At(
|
|
4420
|
-
header:
|
|
4427
|
+
At(k, (O) => kt(O ? {
|
|
4428
|
+
header: d.div(
|
|
4421
4429
|
s.class("bc-drawer__header"),
|
|
4422
|
-
|
|
4430
|
+
d.div(s.id(M), h),
|
|
4423
4431
|
J(
|
|
4424
|
-
|
|
4432
|
+
p,
|
|
4425
4433
|
() => ne(
|
|
4426
4434
|
fe,
|
|
4427
4435
|
(H) => qe({
|
|
@@ -4432,27 +4440,27 @@ function Xr(e) {
|
|
|
4432
4440
|
)
|
|
4433
4441
|
)
|
|
4434
4442
|
),
|
|
4435
|
-
body:
|
|
4443
|
+
body: d.div(
|
|
4436
4444
|
s.class("bc-drawer__body"),
|
|
4437
4445
|
s.id(F),
|
|
4438
|
-
|
|
4446
|
+
b
|
|
4439
4447
|
),
|
|
4440
|
-
footer: w &&
|
|
4448
|
+
footer: w && d.div(s.class("bc-drawer__footer"), w)
|
|
4441
4449
|
} : {
|
|
4442
|
-
body:
|
|
4450
|
+
body: d.div(
|
|
4443
4451
|
s.class("bc-drawer__body"),
|
|
4444
4452
|
s.id(F),
|
|
4445
|
-
|
|
4453
|
+
b
|
|
4446
4454
|
),
|
|
4447
|
-
footer: w &&
|
|
4455
|
+
footer: w && d.div(s.class("bc-drawer__footer"), w)
|
|
4448
4456
|
}))
|
|
4449
4457
|
);
|
|
4450
4458
|
});
|
|
4451
4459
|
t({
|
|
4452
|
-
mode:
|
|
4453
|
-
effect:
|
|
4454
|
-
container:
|
|
4455
|
-
content: E(Y(
|
|
4460
|
+
mode: g,
|
|
4461
|
+
effect: v ?? "opaque",
|
|
4462
|
+
container: y,
|
|
4463
|
+
content: E(Y(g, k), T),
|
|
4456
4464
|
onClickOutside: () => {
|
|
4457
4465
|
x?.(), r();
|
|
4458
4466
|
},
|
|
@@ -4507,18 +4515,18 @@ function Jr(e) {
|
|
|
4507
4515
|
// Override the default dialog role for tooltips
|
|
4508
4516
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4509
4517
|
arrow: (o) => {
|
|
4510
|
-
const
|
|
4518
|
+
const f = o.map(
|
|
4511
4519
|
({
|
|
4512
|
-
placement:
|
|
4513
|
-
}) =>
|
|
4520
|
+
placement: p
|
|
4521
|
+
}) => p.includes("top") ? "down" : p.includes("bottom") ? "up" : p.includes("left") ? "right" : p.includes("right") ? "left" : "up"
|
|
4514
4522
|
);
|
|
4515
4523
|
return E(
|
|
4516
4524
|
s.class("bc-tooltip__arrow"),
|
|
4517
|
-
s.class(
|
|
4518
|
-
|
|
4519
|
-
o.map(({ x:
|
|
4525
|
+
s.class(f.map((p) => `bc-tooltip__arrow-${p}`)),
|
|
4526
|
+
C.transform(
|
|
4527
|
+
o.map(({ x: p, y: x }) => p == null && x == null ? "" : p != null ? `translate(${p}px, 0)` : `translate(0, ${x}px)`)
|
|
4520
4528
|
),
|
|
4521
|
-
Pa(
|
|
4529
|
+
Pa(f)
|
|
4522
4530
|
);
|
|
4523
4531
|
}
|
|
4524
4532
|
})
|
|
@@ -4550,7 +4558,7 @@ function es({
|
|
|
4550
4558
|
angle: l = 45,
|
|
4551
4559
|
corner: i = "top-end"
|
|
4552
4560
|
}, ...u) {
|
|
4553
|
-
return
|
|
4561
|
+
return d.div(
|
|
4554
4562
|
s.class("bc-ribbon"),
|
|
4555
4563
|
// Theme styles via CSS variables
|
|
4556
4564
|
s.style(
|
|
@@ -4581,25 +4589,25 @@ function ts(e, t) {
|
|
|
4581
4589
|
};
|
|
4582
4590
|
return t((x) => {
|
|
4583
4591
|
o = c;
|
|
4584
|
-
const
|
|
4592
|
+
const v = G(
|
|
4585
4593
|
typeof n != "boolean" || n ? "capturing" : "non-capturing"
|
|
4586
4594
|
);
|
|
4587
|
-
let
|
|
4588
|
-
m.on(n, (
|
|
4589
|
-
|
|
4595
|
+
let y = typeof n == "boolean" ? n : !0;
|
|
4596
|
+
m.on(n, (b) => {
|
|
4597
|
+
y = b, v.set(b ? "capturing" : "non-capturing");
|
|
4590
4598
|
});
|
|
4591
|
-
const
|
|
4599
|
+
const h = d.div(
|
|
4592
4600
|
s.class("bc-lightbox"),
|
|
4593
4601
|
// Close button (top-end)
|
|
4594
4602
|
J(
|
|
4595
4603
|
a,
|
|
4596
4604
|
() => ne(
|
|
4597
4605
|
fe,
|
|
4598
|
-
(
|
|
4606
|
+
(b) => d.div(
|
|
4599
4607
|
s.class("bc-lightbox__close"),
|
|
4600
4608
|
qe({
|
|
4601
4609
|
size: "md",
|
|
4602
|
-
label:
|
|
4610
|
+
label: b.$.closeModal,
|
|
4603
4611
|
onClick: () => {
|
|
4604
4612
|
o(), c();
|
|
4605
4613
|
}
|
|
@@ -4609,28 +4617,28 @@ function ts(e, t) {
|
|
|
4609
4617
|
() => null
|
|
4610
4618
|
),
|
|
4611
4619
|
// Viewport (centering + padding)
|
|
4612
|
-
|
|
4620
|
+
d.div(
|
|
4613
4621
|
s.class("bc-lightbox__viewport"),
|
|
4614
4622
|
// Visual padding applied here
|
|
4615
4623
|
s.style(
|
|
4616
4624
|
S(i)(
|
|
4617
|
-
(
|
|
4625
|
+
(b) => `padding:${typeof b == "number" ? b + "px" : b}`
|
|
4618
4626
|
)
|
|
4619
4627
|
),
|
|
4620
4628
|
// Content wrapper capped by viewport; overflow is clipped
|
|
4621
|
-
|
|
4629
|
+
d.div(s.class("bc-lightbox__content"), x)
|
|
4622
4630
|
)
|
|
4623
4631
|
);
|
|
4624
4632
|
u({
|
|
4625
|
-
mode:
|
|
4633
|
+
mode: v,
|
|
4626
4634
|
effect: r ?? "opaque",
|
|
4627
4635
|
container: l,
|
|
4628
|
-
content: E(Y(
|
|
4636
|
+
content: E(Y(v), h),
|
|
4629
4637
|
onClickOutside: () => {
|
|
4630
|
-
|
|
4638
|
+
y && (o(), c());
|
|
4631
4639
|
},
|
|
4632
4640
|
onEscape: () => {
|
|
4633
|
-
|
|
4641
|
+
y && (o(), c());
|
|
4634
4642
|
}
|
|
4635
4643
|
});
|
|
4636
4644
|
}, () => {
|
|
@@ -4663,17 +4671,17 @@ function ns(e) {
|
|
|
4663
4671
|
playbackRate: u = 1,
|
|
4664
4672
|
pip: c = !1,
|
|
4665
4673
|
playsinline: o = !0,
|
|
4666
|
-
width:
|
|
4667
|
-
height:
|
|
4674
|
+
width: f,
|
|
4675
|
+
height: p,
|
|
4668
4676
|
progressInterval: x = 1e3,
|
|
4669
|
-
seekTo:
|
|
4670
|
-
config:
|
|
4671
|
-
onReady:
|
|
4672
|
-
onStart:
|
|
4677
|
+
seekTo: v,
|
|
4678
|
+
config: y,
|
|
4679
|
+
onReady: h,
|
|
4680
|
+
onStart: b,
|
|
4673
4681
|
onPlay: w,
|
|
4674
|
-
onPause:
|
|
4675
|
-
onBuffer:
|
|
4676
|
-
onBufferEnd:
|
|
4682
|
+
onPause: g,
|
|
4683
|
+
onBuffer: k,
|
|
4684
|
+
onBufferEnd: T,
|
|
4677
4685
|
onEnded: L,
|
|
4678
4686
|
onError: V,
|
|
4679
4687
|
onDuration: P,
|
|
@@ -4682,12 +4690,12 @@ function ns(e) {
|
|
|
4682
4690
|
onPlaybackRateChange: F,
|
|
4683
4691
|
onPlaybackQualityChange: O
|
|
4684
4692
|
} = e;
|
|
4685
|
-
function H(
|
|
4686
|
-
return /\.m3u8(\?|$)/i.test(
|
|
4693
|
+
function H(_) {
|
|
4694
|
+
return /\.m3u8(\?|$)/i.test(_);
|
|
4687
4695
|
}
|
|
4688
|
-
function oe(
|
|
4696
|
+
function oe(_) {
|
|
4689
4697
|
try {
|
|
4690
|
-
const A =
|
|
4698
|
+
const A = _.canPlayType("application/vnd.apple.mpegurl");
|
|
4691
4699
|
return A === "probably" || A === "maybe";
|
|
4692
4700
|
} catch {
|
|
4693
4701
|
return !1;
|
|
@@ -4704,22 +4712,22 @@ function ns(e) {
|
|
|
4704
4712
|
}
|
|
4705
4713
|
const ue = [];
|
|
4706
4714
|
ue.push(
|
|
4707
|
-
m.on(t, (
|
|
4708
|
-
typeof
|
|
4715
|
+
m.on(t, (_) => {
|
|
4716
|
+
typeof _ == "string" && _.length > 0 && Aa(_) ? Q.value = "youtube" : (Q.value = "file", U && Oe());
|
|
4709
4717
|
})
|
|
4710
4718
|
);
|
|
4711
4719
|
async function Oe() {
|
|
4712
|
-
const
|
|
4713
|
-
if (!
|
|
4720
|
+
const _ = U;
|
|
4721
|
+
if (!_) return;
|
|
4714
4722
|
const A = m.get(t);
|
|
4715
4723
|
if (typeof A != "string" || A.length === 0) return;
|
|
4716
4724
|
Ne();
|
|
4717
|
-
const j =
|
|
4725
|
+
const j = y?.file?.forceHLS ?? !1;
|
|
4718
4726
|
if (H(A) || j) {
|
|
4719
|
-
if (oe(
|
|
4720
|
-
|
|
4727
|
+
if (oe(_)) {
|
|
4728
|
+
_.setAttribute("src", A);
|
|
4721
4729
|
try {
|
|
4722
|
-
|
|
4730
|
+
_.load();
|
|
4723
4731
|
} catch {
|
|
4724
4732
|
}
|
|
4725
4733
|
return;
|
|
@@ -4733,45 +4741,45 @@ function ns(e) {
|
|
|
4733
4741
|
if (typeof $e == "function") {
|
|
4734
4742
|
const De = $e;
|
|
4735
4743
|
if (typeof De.isSupported == "function" && De.isSupported()) {
|
|
4736
|
-
|
|
4744
|
+
_.removeAttribute("src");
|
|
4737
4745
|
try {
|
|
4738
|
-
|
|
4746
|
+
_.load();
|
|
4739
4747
|
} catch {
|
|
4740
4748
|
}
|
|
4741
|
-
const Ke = new De(
|
|
4742
|
-
pe = Ke, Ke.attachMedia(
|
|
4749
|
+
const Ke = new De(y?.hls);
|
|
4750
|
+
pe = Ke, Ke.attachMedia(_), Ke.loadSource(A);
|
|
4743
4751
|
} else {
|
|
4744
|
-
|
|
4752
|
+
_.setAttribute("src", A);
|
|
4745
4753
|
try {
|
|
4746
|
-
|
|
4754
|
+
_.load();
|
|
4747
4755
|
} catch {
|
|
4748
4756
|
}
|
|
4749
4757
|
}
|
|
4750
4758
|
} else {
|
|
4751
|
-
|
|
4759
|
+
_.setAttribute("src", A);
|
|
4752
4760
|
try {
|
|
4753
|
-
|
|
4761
|
+
_.load();
|
|
4754
4762
|
} catch {
|
|
4755
4763
|
}
|
|
4756
4764
|
}
|
|
4757
4765
|
} catch (Z) {
|
|
4758
|
-
V?.(Z),
|
|
4766
|
+
V?.(Z), _.setAttribute("src", A);
|
|
4759
4767
|
try {
|
|
4760
|
-
|
|
4768
|
+
_.load();
|
|
4761
4769
|
} catch {
|
|
4762
4770
|
}
|
|
4763
4771
|
}
|
|
4764
4772
|
return;
|
|
4765
4773
|
}
|
|
4766
|
-
|
|
4774
|
+
_.setAttribute("src", A);
|
|
4767
4775
|
try {
|
|
4768
|
-
|
|
4776
|
+
_.load();
|
|
4769
4777
|
} catch {
|
|
4770
4778
|
}
|
|
4771
4779
|
}
|
|
4772
4780
|
function Re() {
|
|
4773
4781
|
X?.();
|
|
4774
|
-
const
|
|
4782
|
+
const _ = m.get(x) ?? 1e3;
|
|
4775
4783
|
X = vt(() => {
|
|
4776
4784
|
const A = U;
|
|
4777
4785
|
if (!A) return;
|
|
@@ -4782,21 +4790,21 @@ function ns(e) {
|
|
|
4782
4790
|
loaded: j > 0 ? Math.min(Be, j) / j : 0,
|
|
4783
4791
|
loadedSeconds: Math.min(Be, j)
|
|
4784
4792
|
});
|
|
4785
|
-
},
|
|
4793
|
+
}, _);
|
|
4786
4794
|
}
|
|
4787
|
-
function ke(
|
|
4788
|
-
if (
|
|
4789
|
-
return typeof
|
|
4795
|
+
function ke(_) {
|
|
4796
|
+
if (_ != null)
|
|
4797
|
+
return typeof _ == "number" ? `${_}px` : _;
|
|
4790
4798
|
}
|
|
4791
|
-
const Ae =
|
|
4792
|
-
ae((
|
|
4793
|
-
U =
|
|
4799
|
+
const Ae = d.video(
|
|
4800
|
+
ae((_) => {
|
|
4801
|
+
U = _, h?.();
|
|
4794
4802
|
try {
|
|
4795
4803
|
U.playbackRate = m.get(u) ?? 1;
|
|
4796
4804
|
} catch {
|
|
4797
4805
|
}
|
|
4798
4806
|
U.muted = !!(m.get(i) ?? !1), U.loop = !!(m.get(a) ?? !1), U.controls = !!(m.get(r) ?? !1), U.playsInline != null && (!!(m.get(o) ?? !0) ? U.setAttribute("playsinline", "") : U.removeAttribute("playsinline")), m.get(n) && (U.play?.().catch(() => {
|
|
4799
|
-
}),
|
|
4807
|
+
}), b?.());
|
|
4800
4808
|
try {
|
|
4801
4809
|
const A = !!(m.get(c) ?? !1), j = document, Z = U;
|
|
4802
4810
|
A ? typeof Z.requestPictureInPicture == "function" && j.pictureInPictureElement !== U && Z.requestPictureInPicture().catch(() => {
|
|
@@ -4807,33 +4815,33 @@ function ns(e) {
|
|
|
4807
4815
|
Re(), Oe();
|
|
4808
4816
|
}),
|
|
4809
4817
|
// size
|
|
4810
|
-
|
|
4811
|
-
m.map(
|
|
4818
|
+
C.width(
|
|
4819
|
+
m.map(f, ke)
|
|
4812
4820
|
),
|
|
4813
|
-
|
|
4814
|
-
m.map(
|
|
4821
|
+
C.height(
|
|
4822
|
+
m.map(p, ke)
|
|
4815
4823
|
),
|
|
4816
4824
|
// Events
|
|
4817
4825
|
$.play(() => w?.()),
|
|
4818
4826
|
$.playing(() => {
|
|
4819
|
-
|
|
4827
|
+
b?.(), T?.();
|
|
4820
4828
|
}),
|
|
4821
|
-
$.pause(() =>
|
|
4822
|
-
$.waiting(() =>
|
|
4829
|
+
$.pause(() => g?.()),
|
|
4830
|
+
$.waiting(() => k?.()),
|
|
4823
4831
|
$.canplay(() => {
|
|
4824
|
-
const
|
|
4825
|
-
|
|
4832
|
+
const _ = U?.duration;
|
|
4833
|
+
_ != null && Number.isFinite(_) && P?.(_);
|
|
4826
4834
|
}),
|
|
4827
4835
|
$.ended(() => L?.()),
|
|
4828
|
-
$.error((
|
|
4829
|
-
pe || V?.(
|
|
4836
|
+
$.error((_) => {
|
|
4837
|
+
pe || V?.(_);
|
|
4830
4838
|
})
|
|
4831
4839
|
);
|
|
4832
4840
|
let Ce = null, z = null, Se = null;
|
|
4833
4841
|
function Ie() {
|
|
4834
|
-
const
|
|
4835
|
-
!Ce || typeof
|
|
4836
|
-
const j = rn(
|
|
4842
|
+
const _ = m.get(t);
|
|
4843
|
+
!Ce || typeof _ != "string" || Ba().then((A) => {
|
|
4844
|
+
const j = rn(_);
|
|
4837
4845
|
if (j) {
|
|
4838
4846
|
if (z) {
|
|
4839
4847
|
z.loadVideoById({ videoId: j });
|
|
@@ -4844,18 +4852,18 @@ function ns(e) {
|
|
|
4844
4852
|
playerVars: Va(e),
|
|
4845
4853
|
events: {
|
|
4846
4854
|
onReady: () => {
|
|
4847
|
-
|
|
4855
|
+
h?.(), D(), m.get(n) && b?.(), Ge();
|
|
4848
4856
|
},
|
|
4849
4857
|
onStateChange: (Z) => {
|
|
4850
4858
|
switch (Z.data) {
|
|
4851
4859
|
case A.PlayerState.PLAYING:
|
|
4852
|
-
w?.(),
|
|
4860
|
+
w?.(), T?.();
|
|
4853
4861
|
break;
|
|
4854
4862
|
case A.PlayerState.PAUSED:
|
|
4855
|
-
|
|
4863
|
+
g?.();
|
|
4856
4864
|
break;
|
|
4857
4865
|
case A.PlayerState.BUFFERING:
|
|
4858
|
-
|
|
4866
|
+
k?.();
|
|
4859
4867
|
break;
|
|
4860
4868
|
case A.PlayerState.ENDED:
|
|
4861
4869
|
L?.();
|
|
@@ -4872,7 +4880,7 @@ function ns(e) {
|
|
|
4872
4880
|
}
|
|
4873
4881
|
function Ge() {
|
|
4874
4882
|
Se?.();
|
|
4875
|
-
const
|
|
4883
|
+
const _ = m.get(x) ?? 1e3;
|
|
4876
4884
|
Se = vt(() => {
|
|
4877
4885
|
if (!z) return;
|
|
4878
4886
|
const A = z.getDuration?.() ?? 0, j = z.getCurrentTime?.() ?? 0, Z = z.getVideoLoadedFraction?.() ?? 0;
|
|
@@ -4882,7 +4890,7 @@ function ns(e) {
|
|
|
4882
4890
|
loaded: Z,
|
|
4883
4891
|
loadedSeconds: Z * A
|
|
4884
4892
|
});
|
|
4885
|
-
},
|
|
4893
|
+
}, _);
|
|
4886
4894
|
}
|
|
4887
4895
|
function D() {
|
|
4888
4896
|
if (!z) return;
|
|
@@ -4903,12 +4911,12 @@ function ns(e) {
|
|
|
4903
4911
|
} catch {
|
|
4904
4912
|
}
|
|
4905
4913
|
m.get(n) ?? !1 ? z.playVideo?.() : z.pauseVideo?.();
|
|
4906
|
-
const A = m.get(
|
|
4914
|
+
const A = m.get(v);
|
|
4907
4915
|
typeof A == "number" && Number.isFinite(A) && (z.seekTo?.(A, !0), I?.(A));
|
|
4908
4916
|
}
|
|
4909
|
-
const N =
|
|
4910
|
-
ae((
|
|
4911
|
-
Ce =
|
|
4917
|
+
const N = d.div(
|
|
4918
|
+
ae((_) => {
|
|
4919
|
+
Ce = _, Ie(), h?.();
|
|
4912
4920
|
})
|
|
4913
4921
|
);
|
|
4914
4922
|
ue.push(
|
|
@@ -4925,10 +4933,10 @@ function ns(e) {
|
|
|
4925
4933
|
if (Q.value === "file" && U)
|
|
4926
4934
|
U.volume = Math.min(Math.max(m.get(l) ?? 1, 0), 1);
|
|
4927
4935
|
else if (Q.value === "youtube" && z) {
|
|
4928
|
-
const
|
|
4936
|
+
const _ = Math.round(
|
|
4929
4937
|
Math.min(Math.max(m.get(l) ?? 1, 0), 1) * 100
|
|
4930
4938
|
);
|
|
4931
|
-
z.setVolume?.(
|
|
4939
|
+
z.setVolume?.(_);
|
|
4932
4940
|
}
|
|
4933
4941
|
})
|
|
4934
4942
|
), ue.push(
|
|
@@ -4948,35 +4956,35 @@ function ns(e) {
|
|
|
4948
4956
|
m.on(c, async () => {
|
|
4949
4957
|
if (!(Q.value !== "file" || !U))
|
|
4950
4958
|
try {
|
|
4951
|
-
const
|
|
4952
|
-
|
|
4959
|
+
const _ = !!(m.get(c) ?? !1), A = document, j = U;
|
|
4960
|
+
_ ? typeof j.requestPictureInPicture == "function" && A.pictureInPictureElement !== U && await j.requestPictureInPicture()?.catch(() => {
|
|
4953
4961
|
}) : A.pictureInPictureElement === U && typeof A.exitPictureInPicture == "function" && await A.exitPictureInPicture()?.catch(() => {
|
|
4954
4962
|
});
|
|
4955
4963
|
} catch {
|
|
4956
4964
|
}
|
|
4957
4965
|
})
|
|
4958
4966
|
), ue.push(
|
|
4959
|
-
m.on(
|
|
4960
|
-
const
|
|
4961
|
-
if (
|
|
4967
|
+
m.on(v ?? null, () => {
|
|
4968
|
+
const _ = m.get(v);
|
|
4969
|
+
if (_ != null)
|
|
4962
4970
|
if (Q.value === "file" && U)
|
|
4963
4971
|
try {
|
|
4964
|
-
U.currentTime =
|
|
4972
|
+
U.currentTime = _, I?.(_);
|
|
4965
4973
|
} catch {
|
|
4966
4974
|
}
|
|
4967
|
-
else Q.value === "youtube" && z && (z.seekTo?.(
|
|
4975
|
+
else Q.value === "youtube" && z && (z.seekTo?.(_, !0), I?.(_));
|
|
4968
4976
|
})
|
|
4969
4977
|
);
|
|
4970
|
-
const K =
|
|
4978
|
+
const K = d.div(
|
|
4971
4979
|
s.class("bc-base-video"),
|
|
4972
|
-
|
|
4973
|
-
m.map(
|
|
4980
|
+
C.width(
|
|
4981
|
+
m.map(f, ke)
|
|
4974
4982
|
),
|
|
4975
|
-
|
|
4976
|
-
m.map(
|
|
4983
|
+
C.height(
|
|
4984
|
+
m.map(p, ke)
|
|
4977
4985
|
),
|
|
4978
4986
|
J(
|
|
4979
|
-
m.map(Q, (
|
|
4987
|
+
m.map(Q, (_) => _ === "youtube"),
|
|
4980
4988
|
() => N,
|
|
4981
4989
|
() => Ae
|
|
4982
4990
|
)
|