@tempots/beatui 0.50.3 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +1007 -1005
- package/dist/types/components/data/page-drop-zone.d.ts +4 -1
- 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 f, 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 k, 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,24 +115,24 @@ function qa({
|
|
|
115
115
|
circle: r = !1,
|
|
116
116
|
fullWidth: l = !1
|
|
117
117
|
}, ...i) {
|
|
118
|
-
return
|
|
118
|
+
return f.span(
|
|
119
119
|
s.class(
|
|
120
|
-
|
|
120
|
+
S(
|
|
121
121
|
t,
|
|
122
122
|
a,
|
|
123
123
|
r,
|
|
124
124
|
l
|
|
125
125
|
)(
|
|
126
|
-
(u, c, o,
|
|
126
|
+
(u, c, o, p) => Pn(
|
|
127
127
|
u ?? "md",
|
|
128
128
|
c ?? "sm",
|
|
129
129
|
o ?? !1,
|
|
130
|
-
|
|
130
|
+
p ?? !1
|
|
131
131
|
)
|
|
132
132
|
)
|
|
133
133
|
),
|
|
134
134
|
s.style(
|
|
135
|
-
|
|
135
|
+
S(
|
|
136
136
|
e,
|
|
137
137
|
n
|
|
138
138
|
)(
|
|
@@ -142,47 +142,49 @@ function qa({
|
|
|
142
142
|
)
|
|
143
143
|
)
|
|
144
144
|
),
|
|
145
|
-
|
|
145
|
+
f.span(s.class("bc-badge__content"), ...i)
|
|
146
146
|
);
|
|
147
147
|
}
|
|
148
148
|
function Za({
|
|
149
149
|
onChange: e,
|
|
150
150
|
accept: t = "*/*",
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
onDragContent: n,
|
|
152
|
+
content: a,
|
|
153
|
+
disabled: r = !1
|
|
153
154
|
}) {
|
|
154
|
-
const
|
|
155
|
-
let
|
|
156
|
-
const
|
|
157
|
-
if (
|
|
158
|
-
if (
|
|
159
|
-
const
|
|
160
|
-
return
|
|
155
|
+
const l = G(!1), i = G([]);
|
|
156
|
+
let u = 0;
|
|
157
|
+
const c = (d) => d.dataTransfer?.types.includes("Files") ?? !1, o = (d, y) => y === "*/*" ? !0 : y.split(",").map((b) => b.trim()).some((b) => {
|
|
158
|
+
if (b === "*/*") return !0;
|
|
159
|
+
if (b.endsWith("/*")) {
|
|
160
|
+
const C = b.slice(0, -2);
|
|
161
|
+
return d.type.startsWith(C + "/");
|
|
161
162
|
}
|
|
162
|
-
return
|
|
163
|
-
}),
|
|
164
|
-
|
|
165
|
-
},
|
|
166
|
-
|
|
167
|
-
},
|
|
168
|
-
|
|
169
|
-
},
|
|
170
|
-
if (
|
|
171
|
-
|
|
172
|
-
const
|
|
173
|
-
if (
|
|
174
|
-
const w =
|
|
175
|
-
(
|
|
163
|
+
return d.type === b || d.name.endsWith(b);
|
|
164
|
+
}), p = (d) => {
|
|
165
|
+
m.get(r) || c(d) && (d.preventDefault(), d.stopPropagation(), u++, u === 1 && (l.value = !0));
|
|
166
|
+
}, g = (d) => {
|
|
167
|
+
m.get(r) || c(d) && (d.preventDefault(), d.stopPropagation(), d.dataTransfer != null && (d.dataTransfer.dropEffect = "copy"));
|
|
168
|
+
}, x = (d) => {
|
|
169
|
+
m.get(r) || c(d) && (d.preventDefault(), d.stopPropagation(), u--, u === 0 && (l.value = !1));
|
|
170
|
+
}, h = (d) => {
|
|
171
|
+
if (m.get(r) || !c(d)) return;
|
|
172
|
+
d.preventDefault(), d.stopPropagation(), u = 0, l.value = !1;
|
|
173
|
+
const y = Array.from(d.dataTransfer?.files ?? []);
|
|
174
|
+
if (y.length > 0) {
|
|
175
|
+
const w = m.get(t), b = y.filter(
|
|
176
|
+
(C) => o(C, w)
|
|
176
177
|
);
|
|
177
|
-
|
|
178
|
+
b.length > 0 && (i.value = b, e(b));
|
|
178
179
|
}
|
|
179
180
|
};
|
|
180
|
-
return typeof document < "u" && (document.addEventListener("dragenter",
|
|
181
|
+
return typeof document < "u" && (document.addEventListener("dragenter", p), document.addEventListener("dragover", g), document.addEventListener("dragleave", x), document.addEventListener("drop", h)), E(
|
|
181
182
|
Y(() => {
|
|
182
|
-
typeof document < "u" && (document.removeEventListener("dragenter",
|
|
183
|
-
},
|
|
183
|
+
typeof document < "u" && (document.removeEventListener("dragenter", p), document.removeEventListener("dragover", g), document.removeEventListener("dragleave", x), document.removeEventListener("drop", h)), u = 0;
|
|
184
|
+
}, l, i),
|
|
184
185
|
// Render overlay content to body when dragging (if content is provided)
|
|
185
|
-
n != null ? J(
|
|
186
|
+
n != null ? J(l, () => n({ files: i })) : null,
|
|
187
|
+
a != null ? a({ isDragging: l, files: i }) : null
|
|
186
188
|
);
|
|
187
189
|
}
|
|
188
190
|
function An(e, t, n, a, r, l) {
|
|
@@ -204,7 +206,7 @@ function Ga({
|
|
|
204
206
|
withRowBorders: u = !0,
|
|
205
207
|
borderRadius: c
|
|
206
208
|
} = {}, ...o) {
|
|
207
|
-
const
|
|
209
|
+
const p = S(
|
|
208
210
|
e,
|
|
209
211
|
t,
|
|
210
212
|
n,
|
|
@@ -212,29 +214,29 @@ function Ga({
|
|
|
212
214
|
i,
|
|
213
215
|
u
|
|
214
216
|
)(
|
|
215
|
-
(v,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
w ?? !1,
|
|
217
|
+
(h, v, d, y, w, b) => An(
|
|
218
|
+
h ?? "md",
|
|
219
|
+
v ?? !1,
|
|
220
|
+
d ?? !1,
|
|
220
221
|
y ?? !1,
|
|
221
|
-
|
|
222
|
+
w ?? !1,
|
|
223
|
+
b ?? !0
|
|
222
224
|
)
|
|
223
|
-
),
|
|
225
|
+
), g = S(
|
|
224
226
|
n,
|
|
225
227
|
a,
|
|
226
228
|
l
|
|
227
|
-
)((
|
|
228
|
-
const
|
|
229
|
-
return
|
|
230
|
-
}), x =
|
|
231
|
-
(
|
|
229
|
+
)((h, v, d) => {
|
|
230
|
+
const y = ["bc-table-container"];
|
|
231
|
+
return h && y.push("bc-table-container--sticky"), v && y.push("bc-table-container--full-width"), d && y.push("bc-table-container--with-table-border"), y.join(" ");
|
|
232
|
+
}), x = S(c)(
|
|
233
|
+
(h) => Bn(h)
|
|
232
234
|
);
|
|
233
|
-
return
|
|
234
|
-
Y(
|
|
235
|
-
s.class(
|
|
235
|
+
return f.div(
|
|
236
|
+
Y(p, g, x),
|
|
237
|
+
s.class(g),
|
|
236
238
|
s.style(x),
|
|
237
|
-
|
|
239
|
+
f.table(s.class(p), ...o)
|
|
238
240
|
);
|
|
239
241
|
}
|
|
240
242
|
function Vn(e, t) {
|
|
@@ -261,21 +263,21 @@ const jt = ({
|
|
|
261
263
|
size: a = "md",
|
|
262
264
|
class: r,
|
|
263
265
|
disabled: l
|
|
264
|
-
}) =>
|
|
266
|
+
}) => f.span(
|
|
265
267
|
s.class(
|
|
266
|
-
|
|
268
|
+
S(
|
|
267
269
|
a ?? "md",
|
|
268
270
|
l ?? !1
|
|
269
271
|
)((i, u) => Vn(i, u))
|
|
270
272
|
),
|
|
271
273
|
s.style(
|
|
272
|
-
|
|
274
|
+
S(t)(
|
|
273
275
|
(i) => Mn(i ?? "base")
|
|
274
276
|
)
|
|
275
277
|
),
|
|
276
278
|
// Allow external classes like bc-tag--disabled to be applied
|
|
277
279
|
s.class(r),
|
|
278
|
-
|
|
280
|
+
f.span(e),
|
|
279
281
|
n != null ? ne(
|
|
280
282
|
fe,
|
|
281
283
|
(i) => qe(
|
|
@@ -284,7 +286,7 @@ const jt = ({
|
|
|
284
286
|
label: i.$.removeItem,
|
|
285
287
|
color: "white",
|
|
286
288
|
disabled: l,
|
|
287
|
-
onClick: () => n?.(
|
|
289
|
+
onClick: () => n?.(m.get(e))
|
|
288
290
|
},
|
|
289
291
|
s.class("bc-tag__close")
|
|
290
292
|
)
|
|
@@ -300,15 +302,15 @@ function En({
|
|
|
300
302
|
value: e,
|
|
301
303
|
disabled: n,
|
|
302
304
|
options: {
|
|
303
|
-
system:
|
|
305
|
+
system: f.span(
|
|
304
306
|
s.title("System"),
|
|
305
307
|
ee({ icon: "line-md:laptop", color: "gray" })
|
|
306
308
|
),
|
|
307
|
-
light:
|
|
309
|
+
light: f.span(
|
|
308
310
|
s.title("Light"),
|
|
309
311
|
ee({ icon: "line-md:sunny-twotone-loop", color: "yellow" })
|
|
310
312
|
),
|
|
311
|
-
dark:
|
|
313
|
+
dark: f.span(
|
|
312
314
|
s.title("Dark"),
|
|
313
315
|
ee({
|
|
314
316
|
icon: "line-md:sunny-outline-to-moon-alt-loop-transition",
|
|
@@ -334,9 +336,9 @@ function Nn({
|
|
|
334
336
|
onInput: n
|
|
335
337
|
}) {
|
|
336
338
|
let a = null;
|
|
337
|
-
return
|
|
339
|
+
return f.div(
|
|
338
340
|
s.class("bc-color-input__swatch-container"),
|
|
339
|
-
|
|
341
|
+
f.span(
|
|
340
342
|
s.class("bc-color-input__swatch"),
|
|
341
343
|
$.click(() => a?.showPicker()),
|
|
342
344
|
se.color(
|
|
@@ -347,7 +349,7 @@ function Nn({
|
|
|
347
349
|
t != null ? $.change(W(t)) : R,
|
|
348
350
|
n != null ? $.input(W(n)) : R
|
|
349
351
|
),
|
|
350
|
-
s.style(
|
|
352
|
+
s.style(m.map(e, (r) => `background-color: ${r}`))
|
|
351
353
|
)
|
|
352
354
|
);
|
|
353
355
|
}
|
|
@@ -383,50 +385,50 @@ function Ze(e) {
|
|
|
383
385
|
showOn: u = "hover-focus",
|
|
384
386
|
closable: c = !0,
|
|
385
387
|
arrow: o,
|
|
386
|
-
role:
|
|
387
|
-
hasPopup:
|
|
388
|
+
role: p,
|
|
389
|
+
hasPopup: g = "dialog"
|
|
388
390
|
} = e;
|
|
389
|
-
return bn((x,
|
|
390
|
-
const
|
|
391
|
+
return bn((x, h) => {
|
|
392
|
+
const v = Me({
|
|
391
393
|
initialStatus: "closed"
|
|
392
|
-
}),
|
|
393
|
-
let
|
|
394
|
+
}), d = he("flyout"), y = G(!1);
|
|
395
|
+
let w = null, b = null, C = !1;
|
|
394
396
|
function _() {
|
|
395
|
-
V != null && (clearTimeout(V), V = null), I != null && (clearTimeout(I), I = null),
|
|
397
|
+
V != null && (clearTimeout(V), V = null), I != null && (clearTimeout(I), I = null), b && (b(), b = null), w && (document.removeEventListener("keydown", w), w = null), y.set(!1), C = !1;
|
|
396
398
|
}
|
|
397
399
|
function L() {
|
|
398
|
-
|
|
400
|
+
m.get(c) && (w = (F) => {
|
|
399
401
|
F.key === "Escape" && M();
|
|
400
|
-
}, document.addEventListener("keydown",
|
|
402
|
+
}, document.addEventListener("keydown", w)), C = !0, y.set(!0), x({
|
|
401
403
|
placement: n ?? "top",
|
|
402
404
|
mainAxisOffset: l,
|
|
403
405
|
crossAxisOffset: i,
|
|
404
406
|
onClickOutside: () => {
|
|
405
|
-
|
|
407
|
+
m.get(c) && M();
|
|
406
408
|
},
|
|
407
409
|
arrow: o,
|
|
408
410
|
content: ae((F) => {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
+
v.setElement(F), b = We(() => {
|
|
412
|
+
v.open(), b = null;
|
|
411
413
|
});
|
|
412
414
|
const O = (H) => {
|
|
413
|
-
|
|
415
|
+
m.get(c) && H.key === "Escape" && (H.preventDefault(), H.stopPropagation(), M(), y.set(!1));
|
|
414
416
|
};
|
|
415
417
|
return document.addEventListener("keydown", O, !0), E(
|
|
416
418
|
Y(() => {
|
|
417
419
|
_(), document.removeEventListener("keydown", O, !0);
|
|
418
420
|
}),
|
|
419
421
|
s.class("bc-flyout-container"),
|
|
420
|
-
s.id(
|
|
422
|
+
s.id(d),
|
|
421
423
|
s.tabindex(-1),
|
|
422
424
|
// Make focusable for screen readers
|
|
423
|
-
|
|
425
|
+
f.div(
|
|
424
426
|
s.class("bc-flyout"),
|
|
425
427
|
tt({
|
|
426
|
-
animation:
|
|
427
|
-
status:
|
|
428
|
+
animation: m.map(n, On),
|
|
429
|
+
status: v.status
|
|
428
430
|
}),
|
|
429
|
-
|
|
431
|
+
p ? s.role(p) : s.role("dialog"),
|
|
430
432
|
// Default to dialog role
|
|
431
433
|
t()
|
|
432
434
|
)
|
|
@@ -436,40 +438,40 @@ function Ze(e) {
|
|
|
436
438
|
}
|
|
437
439
|
let V = null;
|
|
438
440
|
function P() {
|
|
439
|
-
if (V != null && (clearTimeout(V), V = null), I != null && (clearTimeout(I), I = null),
|
|
441
|
+
if (V != null && (clearTimeout(V), V = null), I != null && (clearTimeout(I), I = null), v.isOpened.value || v.isOpening.value || v.isStartOpening.value)
|
|
440
442
|
return;
|
|
441
|
-
if (
|
|
442
|
-
|
|
443
|
+
if (v.isClosing.value || v.isStartClosing.value) {
|
|
444
|
+
v.open();
|
|
443
445
|
return;
|
|
444
446
|
}
|
|
445
|
-
const F =
|
|
447
|
+
const F = m.get(a);
|
|
446
448
|
V = setTimeout(() => {
|
|
447
449
|
V = null, L();
|
|
448
450
|
}, F);
|
|
449
451
|
}
|
|
450
452
|
let I = null;
|
|
451
453
|
function M() {
|
|
452
|
-
if (V != null && (clearTimeout(V), V = null), I != null && (clearTimeout(I), I = null),
|
|
453
|
-
|
|
454
|
+
if (V != null && (clearTimeout(V), V = null), I != null && (clearTimeout(I), I = null), y.set(!1), b && (b(), b = null, C)) {
|
|
455
|
+
h(), _();
|
|
454
456
|
return;
|
|
455
457
|
}
|
|
456
|
-
const F =
|
|
458
|
+
const F = m.get(r);
|
|
457
459
|
I = setTimeout(() => {
|
|
458
|
-
I = null,
|
|
459
|
-
|
|
460
|
+
I = null, v.close(), v.listenOnClosed(() => {
|
|
461
|
+
h(), _();
|
|
460
462
|
});
|
|
461
463
|
}, F);
|
|
462
464
|
}
|
|
463
465
|
return ae((F) => {
|
|
464
466
|
const O = () => {
|
|
465
|
-
P(),
|
|
467
|
+
P(), y.set(!0);
|
|
466
468
|
}, H = () => {
|
|
467
|
-
M(),
|
|
469
|
+
M(), y.set(!1);
|
|
468
470
|
}, oe = E(
|
|
469
|
-
B.expanded(
|
|
470
|
-
B.controls(
|
|
471
|
+
B.expanded(y),
|
|
472
|
+
B.controls(d),
|
|
471
473
|
B.haspopup(
|
|
472
|
-
|
|
474
|
+
g
|
|
473
475
|
)
|
|
474
476
|
);
|
|
475
477
|
if (typeof u == "function")
|
|
@@ -480,7 +482,7 @@ function Ze(e) {
|
|
|
480
482
|
const Q = u;
|
|
481
483
|
return E(
|
|
482
484
|
oe,
|
|
483
|
-
Y(
|
|
485
|
+
Y(y, v),
|
|
484
486
|
sn(Q, {
|
|
485
487
|
"hover-focus": () => E(
|
|
486
488
|
$.mouseenter(() => O()),
|
|
@@ -540,38 +542,38 @@ function Xa({
|
|
|
540
542
|
iconColor: u = "primary",
|
|
541
543
|
iconSize: c = "md",
|
|
542
544
|
backgroundColor: o,
|
|
543
|
-
borderColor:
|
|
544
|
-
titleColor:
|
|
545
|
+
borderColor: p,
|
|
546
|
+
titleColor: g,
|
|
545
547
|
descriptionColor: x
|
|
546
548
|
}) {
|
|
547
|
-
const
|
|
548
|
-
return
|
|
549
|
+
const h = l != null;
|
|
550
|
+
return f.div(
|
|
549
551
|
s.class(
|
|
550
|
-
|
|
552
|
+
S(
|
|
551
553
|
a,
|
|
552
554
|
r,
|
|
553
555
|
i
|
|
554
556
|
)(
|
|
555
|
-
(
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
557
|
+
(v, d, y) => Rn(
|
|
558
|
+
v ?? !1,
|
|
559
|
+
d ?? !1,
|
|
560
|
+
y ?? "md",
|
|
561
|
+
h
|
|
560
562
|
)
|
|
561
563
|
)
|
|
562
564
|
),
|
|
563
565
|
s.style(
|
|
564
|
-
|
|
566
|
+
S(
|
|
565
567
|
o,
|
|
566
|
-
f,
|
|
567
568
|
p,
|
|
569
|
+
g,
|
|
568
570
|
x
|
|
569
571
|
)(
|
|
570
|
-
(
|
|
572
|
+
(v, d, y, w) => Fn(v, d, y, w)
|
|
571
573
|
)
|
|
572
574
|
),
|
|
573
575
|
J(
|
|
574
|
-
|
|
576
|
+
h,
|
|
575
577
|
() => E(
|
|
576
578
|
ln(
|
|
577
579
|
r,
|
|
@@ -585,15 +587,15 @@ function Xa({
|
|
|
585
587
|
),
|
|
586
588
|
B.disabled(r),
|
|
587
589
|
// Icon container
|
|
588
|
-
|
|
590
|
+
f.div(
|
|
589
591
|
s.class("bc-action-card__icon"),
|
|
590
592
|
ee({ icon: e, size: c, color: u })
|
|
591
593
|
),
|
|
592
594
|
// Content container
|
|
593
|
-
|
|
595
|
+
f.div(
|
|
594
596
|
s.class("bc-action-card__content"),
|
|
595
|
-
|
|
596
|
-
|
|
597
|
+
f.div(s.class("bc-action-card__title"), t),
|
|
598
|
+
f.div(s.class("bc-action-card__description"), n)
|
|
597
599
|
)
|
|
598
600
|
);
|
|
599
601
|
}
|
|
@@ -635,14 +637,14 @@ function Ht(e, { breakpoints: t, mode: n = "viewport" }) {
|
|
|
635
637
|
([i, u]) => [u, i]
|
|
636
638
|
)].sort((i, u) => i[0] - u[0]), l = (i) => {
|
|
637
639
|
const u = i.map(({ width: o }) => {
|
|
638
|
-
const
|
|
639
|
-
return
|
|
640
|
+
const p = r.findIndex((g) => g[0] > o) - 1;
|
|
641
|
+
return p >= 0 ? { width: o, breakpoint: r[p][1] } : r.length > 0 && o >= r[0][0] ? { width: o, breakpoint: r[0][1] } : { width: o, breakpoint: r[0][1] };
|
|
640
642
|
});
|
|
641
643
|
return e({
|
|
642
644
|
value: u,
|
|
643
645
|
breakpoints: t,
|
|
644
646
|
asList: r,
|
|
645
|
-
is: (o,
|
|
647
|
+
is: (o, p) => Hn(r, o, p)
|
|
646
648
|
});
|
|
647
649
|
};
|
|
648
650
|
return n === "element" ? Ee(l) : gn(l);
|
|
@@ -694,9 +696,9 @@ function be(e, t) {
|
|
|
694
696
|
return `bc-panel ${(Array.isArray(e) ? e : [e]).map((a) => `bc-panel--side-${a}`).join(" ")} bc-panel--shadow-${t}`;
|
|
695
697
|
}
|
|
696
698
|
function ye(e) {
|
|
697
|
-
const t =
|
|
699
|
+
const t = m.toSignal(e).map(
|
|
698
700
|
(a) => de(a, "lighter", "light")
|
|
699
|
-
), n =
|
|
701
|
+
), n = m.toSignal(e).map(
|
|
700
702
|
(a) => de(a, "lighter", "dark")
|
|
701
703
|
);
|
|
702
704
|
return E(
|
|
@@ -806,15 +808,15 @@ function Yn({
|
|
|
806
808
|
[null],
|
|
807
809
|
[null]
|
|
808
810
|
];
|
|
809
|
-
const f = [];
|
|
810
|
-
f.push("1fr");
|
|
811
811
|
const p = [];
|
|
812
|
-
|
|
812
|
+
p.push("1fr");
|
|
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(
|
|
813
815
|
(a.header?.[c] ?? me.header[c]) + "px"
|
|
814
|
-
), o[1][1] = "header"), a.mainHeader && (
|
|
815
|
-
columns:
|
|
816
|
-
rows:
|
|
817
|
-
areas: o.map((
|
|
816
|
+
), o[1][1] = "header"), a.mainHeader && (g.push(a.mainHeader[c] + "px"), o[2][1] = "mainHeader"), g.push("1fr"), o[3][1] = "main", a.mainFooter && (g.push(a.mainFooter[c] + "px"), o[4][1] = "mainFooter"), a.footer && (g.push(a.footer[c] + "px"), o[5][1] = "footer"), o = Je(o), {
|
|
817
|
+
columns: p.join(" "),
|
|
818
|
+
rows: g.join(" "),
|
|
819
|
+
areas: o.map((h) => `"${h.join(" ")}"`).join(`
|
|
818
820
|
`),
|
|
819
821
|
displayMenu: !1,
|
|
820
822
|
displayAside: !1,
|
|
@@ -831,15 +833,15 @@ function Yn({
|
|
|
831
833
|
[null, null],
|
|
832
834
|
[null, null]
|
|
833
835
|
];
|
|
834
|
-
const f = [];
|
|
835
|
-
n.menu && (f.push(n.menu[c] + "px"), o[2][0] = "?menu", o[3][0] = "menu", o[4][0] = "?menu"), f.push("1fr");
|
|
836
836
|
const p = [];
|
|
837
|
-
|
|
837
|
+
n.menu && (p.push(n.menu[c] + "px"), o[2][0] = "?menu", o[3][0] = "menu", o[4][0] = "?menu"), p.push("1fr");
|
|
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(
|
|
838
840
|
(a.header?.[c] ?? me.header[c]) + "px"
|
|
839
|
-
), o[1][0] = "?header", o[1][1] = "header"), a.mainHeader && (
|
|
840
|
-
columns:
|
|
841
|
-
rows:
|
|
842
|
-
areas: o.map((
|
|
841
|
+
), o[1][0] = "?header", o[1][1] = "header"), a.mainHeader && (g.push(a.mainHeader[c] + "px"), o[2][1] = "mainHeader"), g.push("1fr"), o[3][1] = "main", a.mainFooter && (g.push(a.mainFooter[c] + "px"), o[4][1] = "mainFooter"), a.footer && (g.push(a.footer[c] + "px"), o[5][0] = "?footer", o[5][1] = "footer"), o = Je(o), {
|
|
842
|
+
columns: p.join(" "),
|
|
843
|
+
rows: g.join(" "),
|
|
844
|
+
areas: o.map((h) => `"${h.join(" ")}"`).join(`
|
|
843
845
|
`),
|
|
844
846
|
displayMenu: !0,
|
|
845
847
|
displayAside: !1,
|
|
@@ -856,13 +858,13 @@ function Yn({
|
|
|
856
858
|
[null, null, null],
|
|
857
859
|
[null, null, null]
|
|
858
860
|
];
|
|
859
|
-
const f = [];
|
|
860
|
-
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
861
|
const p = [];
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
862
|
+
n.menu && (p.push(n.menu[c] + "px"), o[2][0] = "?menu", o[3][0] = "menu", o[4][0] = "?menu"), p.push("1fr"), n.aside && (p.push(n.aside[c] + "px"), o[2][2] = "?aside", o[3][2] = "aside", o[4][2] = "?aside");
|
|
863
|
+
const g = [];
|
|
864
|
+
return a.banner && (g.push(a.banner[c] + "px"), o[0][0] = "?banner", o[0][1] = "banner", o[0][2] = "?banner"), a.header && (g.push(a.header[c] + "px"), o[1][0] = "?header", o[1][1] = "header", o[1][2] = "?header"), a.mainHeader && (g.push(a.mainHeader[c] + "px"), o[2][1] = "mainHeader"), g.push("1fr"), o[3][1] = "main", a.mainFooter && (g.push(a.mainFooter[c] + "px"), o[4][1] = "mainFooter"), a.footer && (g.push(a.footer[c] + "px"), o[5][0] = "?footer", o[5][1] = "footer", o[5][2] = "?footer"), o = Je(o), {
|
|
865
|
+
columns: p.join(" "),
|
|
866
|
+
rows: g.join(" "),
|
|
867
|
+
areas: o.map((h) => `"${h.join(" ")}"`).join(`
|
|
866
868
|
`),
|
|
867
869
|
displayMenu: !0,
|
|
868
870
|
displayAside: !0,
|
|
@@ -917,23 +919,23 @@ function tr({
|
|
|
917
919
|
vertical: a,
|
|
918
920
|
horizontal: r,
|
|
919
921
|
is: u
|
|
920
|
-
}), o = i.map(c),
|
|
922
|
+
}), o = i.map(c), p = r.header != null || a.menu != null || a.aside != null, g = S(
|
|
921
923
|
a.aside != null,
|
|
922
924
|
o
|
|
923
|
-
)((
|
|
925
|
+
)((b, { displayAside: C }) => b && !C), x = S(
|
|
924
926
|
a.menu != null,
|
|
925
927
|
o
|
|
926
|
-
)((
|
|
928
|
+
)((b, { displayMenu: C }) => b && !C), h = Me(), v = Me(), d = G(0), y = S(
|
|
927
929
|
a.menu != null,
|
|
928
930
|
o,
|
|
929
|
-
|
|
930
|
-
)(Gn),
|
|
931
|
+
h.display
|
|
932
|
+
)(Gn), w = S(
|
|
931
933
|
a.aside != null,
|
|
932
934
|
o,
|
|
933
|
-
|
|
935
|
+
v.display
|
|
934
936
|
)(Kn);
|
|
935
|
-
return
|
|
936
|
-
Y(
|
|
937
|
+
return f.div(
|
|
938
|
+
Y(d, h, v, o),
|
|
937
939
|
k.display("grid"),
|
|
938
940
|
k.height("100%"),
|
|
939
941
|
k.width("100%"),
|
|
@@ -942,7 +944,7 @@ function tr({
|
|
|
942
944
|
k.gridTemplateAreas(o.$.areas),
|
|
943
945
|
k.gridColumnGap("0"),
|
|
944
946
|
k.gridRowGap("0"),
|
|
945
|
-
n.banner ?
|
|
947
|
+
n.banner ? f.header(
|
|
946
948
|
s.class(
|
|
947
949
|
be("none", n.banner.shadow ?? "none")
|
|
948
950
|
),
|
|
@@ -951,21 +953,21 @@ function tr({
|
|
|
951
953
|
k.gridArea("banner"),
|
|
952
954
|
n.banner.content
|
|
953
955
|
) : null,
|
|
954
|
-
|
|
956
|
+
f.header(
|
|
955
957
|
s.class(
|
|
956
958
|
be("bottom", n.header?.shadow ?? "none")
|
|
957
959
|
),
|
|
958
960
|
ye(n.header?.color ?? "white"),
|
|
959
961
|
k.zIndex("20"),
|
|
960
|
-
k.display(
|
|
962
|
+
k.display(p ? "block" : "none"),
|
|
961
963
|
k.gridArea("header"),
|
|
962
|
-
Ee((
|
|
963
|
-
|
|
964
|
+
Ee((b) => (b.$.bottom.feedProp(d), null)),
|
|
965
|
+
f.div(
|
|
964
966
|
k.display("flex"),
|
|
965
967
|
k.height("100%"),
|
|
966
|
-
|
|
968
|
+
f.div(
|
|
967
969
|
k.display(
|
|
968
|
-
x.map((
|
|
970
|
+
x.map((b) => b ? "flex" : "none")
|
|
969
971
|
),
|
|
970
972
|
k.alignItems("center"),
|
|
971
973
|
k.justifyContent("center"),
|
|
@@ -973,34 +975,34 @@ function tr({
|
|
|
973
975
|
k.width("60px"),
|
|
974
976
|
pt(
|
|
975
977
|
{
|
|
976
|
-
onClick: () =>
|
|
978
|
+
onClick: () => h.toggle(),
|
|
977
979
|
variant: "light",
|
|
978
980
|
color: "base"
|
|
979
981
|
},
|
|
980
982
|
B.label(l.$.toggleMenu),
|
|
981
983
|
ee({
|
|
982
|
-
icon:
|
|
983
|
-
(
|
|
984
|
+
icon: h.display.map(
|
|
985
|
+
(b) => b ? "line-md/menu-to-close-alt-transition" : "line-md/close-to-menu-alt-transition"
|
|
984
986
|
)
|
|
985
987
|
})
|
|
986
988
|
)
|
|
987
989
|
),
|
|
988
|
-
|
|
990
|
+
f.div(
|
|
989
991
|
k.height("100%"),
|
|
990
992
|
k.flexGrow("1"),
|
|
991
993
|
n.header?.content
|
|
992
994
|
),
|
|
993
|
-
|
|
995
|
+
f.div(
|
|
994
996
|
k.alignItems("center"),
|
|
995
997
|
k.justifyContent("center"),
|
|
996
998
|
k.height("100%"),
|
|
997
999
|
k.width("60px"),
|
|
998
1000
|
k.display(
|
|
999
|
-
|
|
1001
|
+
g.map((b) => b ? "flex" : "none")
|
|
1000
1002
|
),
|
|
1001
1003
|
pt(
|
|
1002
1004
|
{
|
|
1003
|
-
onClick: () =>
|
|
1005
|
+
onClick: () => v.toggle(),
|
|
1004
1006
|
roundedness: "full",
|
|
1005
1007
|
variant: "light",
|
|
1006
1008
|
color: "base"
|
|
@@ -1010,8 +1012,8 @@ function tr({
|
|
|
1010
1012
|
{ icon: "line-md/chevron-left" },
|
|
1011
1013
|
s.style("transition: transform 0.2s ease-in-out"),
|
|
1012
1014
|
s.style(
|
|
1013
|
-
|
|
1014
|
-
(
|
|
1015
|
+
v.display.map(
|
|
1016
|
+
(b) => `transform: rotate(${b ? 180 : 0}deg)`
|
|
1015
1017
|
)
|
|
1016
1018
|
)
|
|
1017
1019
|
)
|
|
@@ -1019,16 +1021,16 @@ function tr({
|
|
|
1019
1021
|
)
|
|
1020
1022
|
)
|
|
1021
1023
|
),
|
|
1022
|
-
n.menu ?
|
|
1023
|
-
ae((
|
|
1024
|
+
n.menu ? f.nav(
|
|
1025
|
+
ae((b) => h.setElement(b)),
|
|
1024
1026
|
k.zIndex("10"),
|
|
1025
1027
|
// Add ARIA attributes for navigation landmark
|
|
1026
1028
|
B.label(l.$.mainNavigation),
|
|
1027
1029
|
s.role("navigation"),
|
|
1028
1030
|
k.overflow("hidden"),
|
|
1029
1031
|
s.class(
|
|
1030
|
-
|
|
1031
|
-
(
|
|
1032
|
+
y.map(
|
|
1033
|
+
(b) => b === "float" ? be(
|
|
1032
1034
|
"right",
|
|
1033
1035
|
n.menu?.shadow ?? "md"
|
|
1034
1036
|
) : be(
|
|
@@ -1039,37 +1041,37 @@ function tr({
|
|
|
1039
1041
|
),
|
|
1040
1042
|
ye(n.menu?.color ?? "white"),
|
|
1041
1043
|
k.height(
|
|
1042
|
-
|
|
1043
|
-
(
|
|
1044
|
+
y.map(
|
|
1045
|
+
(b) => b === "float" ? "auto" : "100%"
|
|
1044
1046
|
)
|
|
1045
1047
|
),
|
|
1046
1048
|
k.overflow("hidden"),
|
|
1047
1049
|
k.gridArea("menu"),
|
|
1048
1050
|
k.display(
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
)((
|
|
1051
|
+
S(
|
|
1052
|
+
y,
|
|
1053
|
+
h.status
|
|
1054
|
+
)((b, C) => b === "none" && C === "closed" ? "none" : "block")
|
|
1053
1055
|
),
|
|
1054
1056
|
k.position(
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
)((
|
|
1057
|
+
S(
|
|
1058
|
+
y,
|
|
1059
|
+
h.status
|
|
1060
|
+
)((b, C) => b === "float" || b === "none" && C !== "closed" ? "fixed" : "initial")
|
|
1059
1061
|
),
|
|
1060
|
-
k.top(
|
|
1062
|
+
k.top(d.map((b) => `${b}px`)),
|
|
1061
1063
|
tt({
|
|
1062
1064
|
animation: { slide: "right" },
|
|
1063
|
-
status:
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
)((
|
|
1065
|
+
status: S(
|
|
1066
|
+
y,
|
|
1067
|
+
h.status
|
|
1068
|
+
)((b, C) => b === "block" ? "opened" : C)
|
|
1067
1069
|
}),
|
|
1068
1070
|
k.width(Te(n.menu?.width, o.$.menuWidth)),
|
|
1069
1071
|
k.bottom("0"),
|
|
1070
1072
|
n.menu?.content
|
|
1071
1073
|
) : null,
|
|
1072
|
-
n.mainHeader ?
|
|
1074
|
+
n.mainHeader ? f.header(
|
|
1073
1075
|
k.height("100%"),
|
|
1074
1076
|
k.gridArea("mainHeader"),
|
|
1075
1077
|
s.class(
|
|
@@ -1081,7 +1083,7 @@ function tr({
|
|
|
1081
1083
|
ye(n.mainHeader?.color ?? "white"),
|
|
1082
1084
|
n.mainHeader.content
|
|
1083
1085
|
) : null,
|
|
1084
|
-
|
|
1086
|
+
f.main(
|
|
1085
1087
|
k.height("100%"),
|
|
1086
1088
|
k.overflow("hidden"),
|
|
1087
1089
|
k.gridArea("main"),
|
|
@@ -1091,7 +1093,7 @@ function tr({
|
|
|
1091
1093
|
ye(n.main?.color ?? "white"),
|
|
1092
1094
|
n.main.content
|
|
1093
1095
|
),
|
|
1094
|
-
n.mainFooter ?
|
|
1096
|
+
n.mainFooter ? f.footer(
|
|
1095
1097
|
k.height("100%"),
|
|
1096
1098
|
k.gridArea("mainFooter"),
|
|
1097
1099
|
s.class(
|
|
@@ -1103,49 +1105,49 @@ function tr({
|
|
|
1103
1105
|
ye(n.mainFooter?.color ?? "white"),
|
|
1104
1106
|
n.mainFooter.content
|
|
1105
1107
|
) : null,
|
|
1106
|
-
n.aside ?
|
|
1107
|
-
ae((
|
|
1108
|
-
|
|
1108
|
+
n.aside ? f.aside(
|
|
1109
|
+
ae((b) => {
|
|
1110
|
+
v.setElement(b);
|
|
1109
1111
|
}),
|
|
1110
1112
|
k.zIndex("10"),
|
|
1111
1113
|
// Add ARIA attributes for aside landmark
|
|
1112
1114
|
B.label(l.$.sidebar),
|
|
1113
1115
|
s.role("complementary"),
|
|
1114
1116
|
s.class(
|
|
1115
|
-
|
|
1116
|
-
(
|
|
1117
|
+
w.map(
|
|
1118
|
+
(b) => b === "float" ? be("left", "md") : be("left", "none")
|
|
1117
1119
|
)
|
|
1118
1120
|
),
|
|
1119
1121
|
ye("white"),
|
|
1120
1122
|
k.height("100%"),
|
|
1121
1123
|
k.gridArea("aside"),
|
|
1122
1124
|
k.display(
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
)((
|
|
1125
|
+
S(
|
|
1126
|
+
w,
|
|
1127
|
+
v.status
|
|
1128
|
+
)((b, C) => b === "none" && C === "closed" ? "none" : "block")
|
|
1127
1129
|
),
|
|
1128
1130
|
k.position(
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
)((
|
|
1131
|
+
S(
|
|
1132
|
+
w,
|
|
1133
|
+
v.status
|
|
1134
|
+
)((b, C) => b === "float" || b === "none" && C !== "closed" ? "fixed" : "initial")
|
|
1133
1135
|
),
|
|
1134
|
-
k.top(
|
|
1136
|
+
k.top(d.map((b) => `${b}px`)),
|
|
1135
1137
|
tt({
|
|
1136
1138
|
animation: { slide: "left" },
|
|
1137
|
-
status:
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
)((
|
|
1139
|
+
status: S(
|
|
1140
|
+
w,
|
|
1141
|
+
v.status
|
|
1142
|
+
)((b, C) => b === "block" ? "opened" : C)
|
|
1141
1143
|
}),
|
|
1142
1144
|
k.width(
|
|
1143
1145
|
Te(n.aside?.width, o.$.asideWidth)
|
|
1144
1146
|
),
|
|
1145
|
-
k.bottom(
|
|
1147
|
+
k.bottom(d.map((b) => `${b}px`)),
|
|
1146
1148
|
n.aside.content
|
|
1147
1149
|
) : null,
|
|
1148
|
-
n.footer ?
|
|
1150
|
+
n.footer ? f.footer(
|
|
1149
1151
|
s.class(be("top", "none")),
|
|
1150
1152
|
ye("white"),
|
|
1151
1153
|
k.height("100%"),
|
|
@@ -1157,9 +1159,9 @@ function tr({
|
|
|
1157
1159
|
);
|
|
1158
1160
|
}
|
|
1159
1161
|
function nr(...e) {
|
|
1160
|
-
return
|
|
1162
|
+
return f.div(
|
|
1161
1163
|
s.class("bc-center-h"),
|
|
1162
|
-
|
|
1164
|
+
f.div(s.class("bc-center__content"), ...e)
|
|
1163
1165
|
);
|
|
1164
1166
|
}
|
|
1165
1167
|
function Qn(e) {
|
|
@@ -1167,30 +1169,30 @@ function Qn(e) {
|
|
|
1167
1169
|
return e !== "lg" && t.push(`bc-center--gap-${e}`), t.join(" ");
|
|
1168
1170
|
}
|
|
1169
1171
|
function ar({ gap: e = "lg" } = {}, ...t) {
|
|
1170
|
-
return
|
|
1171
|
-
s.class(
|
|
1172
|
+
return f.div(
|
|
1173
|
+
s.class(S(e)((n) => Qn(n ?? "lg"))),
|
|
1172
1174
|
...t
|
|
1173
1175
|
);
|
|
1174
1176
|
}
|
|
1175
1177
|
function Xn({ open: e }, ...t) {
|
|
1176
1178
|
return ae((n) => {
|
|
1177
1179
|
const { status: a, setOpen: r, dispose: l } = Me({
|
|
1178
|
-
initialStatus:
|
|
1180
|
+
initialStatus: m.get(e) ? "opened" : "closed",
|
|
1179
1181
|
element: n
|
|
1180
1182
|
});
|
|
1181
|
-
return
|
|
1182
|
-
const u = G(null), c =
|
|
1183
|
+
return m.on(e, r), Ee((i) => {
|
|
1184
|
+
const u = G(null), c = S(
|
|
1183
1185
|
a,
|
|
1184
1186
|
i.$.height
|
|
1185
|
-
)((o,
|
|
1187
|
+
)((o, p) => o === "opened" && p > 0 ? p : null);
|
|
1186
1188
|
return c.on((o) => {
|
|
1187
1189
|
o != null && u.set(o);
|
|
1188
1190
|
}), a.on((o) => {
|
|
1189
1191
|
if (n && o === "start-opening") {
|
|
1190
|
-
const
|
|
1192
|
+
const p = n.style.height, g = n.style.transition;
|
|
1191
1193
|
n.style.transition = "none", n.style.height = "auto", n.offsetHeight;
|
|
1192
1194
|
const x = n.scrollHeight;
|
|
1193
|
-
x > 0 && u.set(x), n.style.height =
|
|
1195
|
+
x > 0 && u.set(x), n.style.height = p, n.style.transition = g, n.offsetHeight;
|
|
1194
1196
|
}
|
|
1195
1197
|
}), E(
|
|
1196
1198
|
Y(l, u, c),
|
|
@@ -1207,7 +1209,7 @@ function Jn(e) {
|
|
|
1207
1209
|
return `${e}px`;
|
|
1208
1210
|
}
|
|
1209
1211
|
function xt(e) {
|
|
1210
|
-
return
|
|
1212
|
+
return m.map(e, Jn);
|
|
1211
1213
|
}
|
|
1212
1214
|
function rr({
|
|
1213
1215
|
body: e,
|
|
@@ -1220,74 +1222,74 @@ function rr({
|
|
|
1220
1222
|
footer: u,
|
|
1221
1223
|
footerHeight: c = 0,
|
|
1222
1224
|
bottomStart: o,
|
|
1223
|
-
bottomEnd:
|
|
1224
|
-
sidebarStart:
|
|
1225
|
+
bottomEnd: p,
|
|
1226
|
+
sidebarStart: g,
|
|
1225
1227
|
sidebarStartWidth: x = 0,
|
|
1226
|
-
sidebarEnd:
|
|
1227
|
-
sidebarEndWidth:
|
|
1228
|
-
anchorMode:
|
|
1228
|
+
sidebarEnd: h,
|
|
1229
|
+
sidebarEndWidth: v = 0,
|
|
1230
|
+
anchorMode: d = "container-edge"
|
|
1229
1231
|
}) {
|
|
1230
|
-
const
|
|
1231
|
-
return
|
|
1232
|
+
const y = G(0n), w = G(0n), b = xt(r), C = xt(x), _ = G(16);
|
|
1233
|
+
return f.div(
|
|
1232
1234
|
Y(
|
|
1233
|
-
w.dispose,
|
|
1234
1235
|
y.dispose,
|
|
1236
|
+
w.dispose,
|
|
1235
1237
|
_.dispose
|
|
1236
1238
|
),
|
|
1237
1239
|
s.class("bc-nine-slice-container"),
|
|
1238
1240
|
Ee((L) => {
|
|
1239
|
-
const V =
|
|
1241
|
+
const V = S(
|
|
1240
1242
|
L.$.width,
|
|
1241
1243
|
x,
|
|
1242
|
-
|
|
1243
|
-
)((D, N, K) => D - N - K), P =
|
|
1244
|
+
v
|
|
1245
|
+
)((D, N, K) => D - N - K), P = S(
|
|
1244
1246
|
L.$.height,
|
|
1245
1247
|
r,
|
|
1246
1248
|
c
|
|
1247
|
-
)((D, N, K) => D - N - K), I =
|
|
1249
|
+
)((D, N, K) => D - N - K), I = S(
|
|
1248
1250
|
t,
|
|
1249
1251
|
V
|
|
1250
|
-
)((D, N) => D > BigInt(N)), M =
|
|
1252
|
+
)((D, N) => D > BigInt(N)), M = S(
|
|
1251
1253
|
n,
|
|
1252
1254
|
P
|
|
1253
|
-
)((D, N) => D > BigInt(N)), F =
|
|
1255
|
+
)((D, N) => D > BigInt(N)), F = S(
|
|
1254
1256
|
V,
|
|
1255
1257
|
M,
|
|
1256
1258
|
_
|
|
1257
|
-
)((D, N, K) => N ? D - K : D), O =
|
|
1259
|
+
)((D, N, K) => N ? D - K : D), O = S(
|
|
1258
1260
|
P,
|
|
1259
1261
|
I,
|
|
1260
1262
|
_
|
|
1261
|
-
)((D, N, K) => N ? D - K : D), H =
|
|
1263
|
+
)((D, N, K) => N ? D - K : D), H = S(
|
|
1262
1264
|
t,
|
|
1263
1265
|
F
|
|
1264
|
-
)((D, N) => Number(D / BigInt(Math.max(1, N)))), oe =
|
|
1266
|
+
)((D, N) => Number(D / BigInt(Math.max(1, N)))), oe = S(
|
|
1265
1267
|
n,
|
|
1266
1268
|
O
|
|
1267
|
-
)((D, N) => Number(D / BigInt(Math.max(1, N)))), Q =
|
|
1268
|
-
|
|
1269
|
+
)((D, N) => Number(D / BigInt(Math.max(1, N)))), Q = m.map(
|
|
1270
|
+
d,
|
|
1269
1271
|
(D) => D === "body-end" || D === "body-end-bottom"
|
|
1270
1272
|
), U = J(
|
|
1271
1273
|
Q,
|
|
1272
1274
|
() => k.left(
|
|
1273
|
-
|
|
1275
|
+
S(
|
|
1274
1276
|
x,
|
|
1275
1277
|
t,
|
|
1276
1278
|
F,
|
|
1277
|
-
|
|
1279
|
+
v
|
|
1278
1280
|
)((D, N, K, T) => {
|
|
1279
1281
|
const A = D + Number(N), j = D + K, Z = Math.min(A, j);
|
|
1280
1282
|
return `${Math.max(D + T, Z)}px`;
|
|
1281
1283
|
})
|
|
1282
1284
|
),
|
|
1283
1285
|
() => k.right("0")
|
|
1284
|
-
), X =
|
|
1285
|
-
|
|
1286
|
+
), X = m.map(
|
|
1287
|
+
d,
|
|
1286
1288
|
(D) => D === "body-bottom" || D === "body-end-bottom"
|
|
1287
1289
|
), pe = J(
|
|
1288
1290
|
X,
|
|
1289
1291
|
() => k.top(
|
|
1290
|
-
|
|
1292
|
+
S(
|
|
1291
1293
|
r,
|
|
1292
1294
|
n,
|
|
1293
1295
|
O,
|
|
@@ -1298,16 +1300,16 @@ function rr({
|
|
|
1298
1300
|
})
|
|
1299
1301
|
),
|
|
1300
1302
|
() => k.bottom("0")
|
|
1301
|
-
), Ne =
|
|
1303
|
+
), Ne = S(
|
|
1302
1304
|
M,
|
|
1303
1305
|
_
|
|
1304
|
-
)((D, N) => D ? `${N}px` : "0"), ue =
|
|
1306
|
+
)((D, N) => D ? `${N}px` : "0"), ue = S(
|
|
1305
1307
|
I,
|
|
1306
1308
|
_
|
|
1307
1309
|
)((D, N) => D ? `${N}px` : "0"), Oe = k.transform(
|
|
1308
|
-
|
|
1309
|
-
y,
|
|
1310
|
+
S(
|
|
1310
1311
|
w,
|
|
1312
|
+
y,
|
|
1311
1313
|
I,
|
|
1312
1314
|
M
|
|
1313
1315
|
)((D, N, K, T) => {
|
|
@@ -1315,13 +1317,13 @@ function rr({
|
|
|
1315
1317
|
return `${A} ${j}`.trim() || "none";
|
|
1316
1318
|
})
|
|
1317
1319
|
), Re = k.transform(
|
|
1318
|
-
|
|
1320
|
+
w.map((D) => `translateX(-${D}px)`)
|
|
1319
1321
|
), ke = k.transform(
|
|
1320
|
-
|
|
1321
|
-
), Ae =
|
|
1322
|
+
y.map((D) => `translateY(-${D}px)`)
|
|
1323
|
+
), Ae = S(
|
|
1322
1324
|
n,
|
|
1323
1325
|
O
|
|
1324
|
-
)((D, N) => D - BigInt(Math.max(1, N))), Ce =
|
|
1326
|
+
)((D, N) => D - BigInt(Math.max(1, N))), Ce = S(
|
|
1325
1327
|
t,
|
|
1326
1328
|
F
|
|
1327
1329
|
)((D, N) => D - BigInt(Math.max(1, N)));
|
|
@@ -1333,20 +1335,20 @@ function rr({
|
|
|
1333
1335
|
Fe(0n, D),
|
|
1334
1336
|
Fe(
|
|
1335
1337
|
0n,
|
|
1336
|
-
|
|
1338
|
+
y.value + BigInt(Math.round(Ie))
|
|
1337
1339
|
)
|
|
1338
1340
|
);
|
|
1339
|
-
|
|
1341
|
+
y.set(A);
|
|
1340
1342
|
}
|
|
1341
1343
|
if (T && Se !== 0) {
|
|
1342
1344
|
const A = yt(
|
|
1343
1345
|
Fe(0n, N),
|
|
1344
1346
|
Fe(
|
|
1345
1347
|
0n,
|
|
1346
|
-
|
|
1348
|
+
w.value + BigInt(Math.round(Se))
|
|
1347
1349
|
)
|
|
1348
1350
|
);
|
|
1349
|
-
|
|
1351
|
+
w.set(A);
|
|
1350
1352
|
}
|
|
1351
1353
|
Se = 0, Ie = 0, z = null;
|
|
1352
1354
|
};
|
|
@@ -1354,7 +1356,7 @@ function rr({
|
|
|
1354
1356
|
Y(
|
|
1355
1357
|
I,
|
|
1356
1358
|
M,
|
|
1357
|
-
() =>
|
|
1359
|
+
() => m.dispose(Q),
|
|
1358
1360
|
V,
|
|
1359
1361
|
P,
|
|
1360
1362
|
F,
|
|
@@ -1364,10 +1366,10 @@ function rr({
|
|
|
1364
1366
|
Ne,
|
|
1365
1367
|
ue,
|
|
1366
1368
|
I.on((D) => {
|
|
1367
|
-
D ||
|
|
1369
|
+
D || w.set(0n);
|
|
1368
1370
|
}),
|
|
1369
1371
|
M.on((D) => {
|
|
1370
|
-
D ||
|
|
1372
|
+
D || y.set(0n);
|
|
1371
1373
|
}),
|
|
1372
1374
|
Ae.dispose,
|
|
1373
1375
|
Ce.dispose,
|
|
@@ -1380,12 +1382,12 @@ function rr({
|
|
|
1380
1382
|
const { deltaX: N, deltaY: K } = D;
|
|
1381
1383
|
Se += N, Ie += K, z || (z = setTimeout(Ge, 16));
|
|
1382
1384
|
}),
|
|
1383
|
-
|
|
1385
|
+
f.div(
|
|
1384
1386
|
s.class("bc-nine-slice-pane-container"),
|
|
1385
1387
|
k.right(Ne),
|
|
1386
1388
|
k.bottom(ue),
|
|
1387
1389
|
// top-start corner
|
|
1388
|
-
l != null ?
|
|
1390
|
+
l != null ? f.div(
|
|
1389
1391
|
s.class("bc-nine-slice-pane bc-nine-slice-top-start"),
|
|
1390
1392
|
k.top("0"),
|
|
1391
1393
|
k.left("0"),
|
|
@@ -1394,20 +1396,20 @@ function rr({
|
|
|
1394
1396
|
l
|
|
1395
1397
|
) : null,
|
|
1396
1398
|
// top-center
|
|
1397
|
-
a != null ?
|
|
1399
|
+
a != null ? f.div(
|
|
1398
1400
|
s.class("bc-nine-slice-pane bc-nine-slice-header"),
|
|
1399
1401
|
k.top("0"),
|
|
1400
|
-
k.left(
|
|
1402
|
+
k.left(C),
|
|
1401
1403
|
// style.height(headerHeightPx),
|
|
1402
1404
|
// style.width(visibleAreaWidthPx),
|
|
1403
|
-
|
|
1405
|
+
f.div(
|
|
1404
1406
|
s.class("bc-nine-slice-pane-content"),
|
|
1405
1407
|
Re,
|
|
1406
1408
|
a
|
|
1407
1409
|
)
|
|
1408
1410
|
) : null,
|
|
1409
1411
|
// top-end corner
|
|
1410
|
-
i != null ?
|
|
1412
|
+
i != null ? f.div(
|
|
1411
1413
|
s.class("bc-nine-slice-pane bc-nine-slice-top-end"),
|
|
1412
1414
|
k.top("0"),
|
|
1413
1415
|
U,
|
|
@@ -1416,46 +1418,46 @@ function rr({
|
|
|
1416
1418
|
i
|
|
1417
1419
|
) : null,
|
|
1418
1420
|
// middle-start sidebar
|
|
1419
|
-
|
|
1421
|
+
g != null ? f.div(
|
|
1420
1422
|
s.class("bc-nine-slice-pane bc-nine-slice-sidebar-start"),
|
|
1421
1423
|
k.left("0"),
|
|
1422
|
-
k.top(
|
|
1424
|
+
k.top(b),
|
|
1423
1425
|
// style.height(visibleAreaHeightPx),
|
|
1424
1426
|
// style.width(sidebarStartWidthPx),
|
|
1425
|
-
|
|
1427
|
+
f.div(
|
|
1426
1428
|
s.class("bc-nine-slice-pane-content"),
|
|
1427
1429
|
ke,
|
|
1428
|
-
|
|
1430
|
+
g
|
|
1429
1431
|
)
|
|
1430
1432
|
) : null,
|
|
1431
1433
|
// middle-center (main body)
|
|
1432
|
-
|
|
1434
|
+
f.div(
|
|
1433
1435
|
s.class("bc-nine-slice-pane bc-nine-slice-body"),
|
|
1434
|
-
k.left(
|
|
1435
|
-
k.top(
|
|
1436
|
+
k.left(C),
|
|
1437
|
+
k.top(b),
|
|
1436
1438
|
// style.width(visibleAreaWidth.map(toPx)),
|
|
1437
1439
|
// style.height(visibleAreaHeight.map(toPx)),
|
|
1438
|
-
|
|
1440
|
+
f.div(
|
|
1439
1441
|
s.class("bc-nine-slice-pane-content"),
|
|
1440
1442
|
Oe,
|
|
1441
1443
|
e
|
|
1442
1444
|
)
|
|
1443
1445
|
),
|
|
1444
1446
|
// middle-end sidebar
|
|
1445
|
-
|
|
1447
|
+
h != null ? f.div(
|
|
1446
1448
|
s.class("bc-nine-slice-pane bc-nine-slice-sidebar-end"),
|
|
1447
1449
|
U,
|
|
1448
|
-
k.top(
|
|
1450
|
+
k.top(b),
|
|
1449
1451
|
// style.height(visibleAreaHeightPx),
|
|
1450
1452
|
// style.width(sidebarEndWidthPx),
|
|
1451
|
-
|
|
1453
|
+
f.div(
|
|
1452
1454
|
s.class("bc-nine-slice-pane-content"),
|
|
1453
1455
|
ke,
|
|
1454
|
-
|
|
1456
|
+
h
|
|
1455
1457
|
)
|
|
1456
1458
|
) : null,
|
|
1457
1459
|
// bottom-start corner
|
|
1458
|
-
o != null ?
|
|
1460
|
+
o != null ? f.div(
|
|
1459
1461
|
s.class("bc-nine-slice-pane bc-nine-slice-bottom-start"),
|
|
1460
1462
|
k.left("0"),
|
|
1461
1463
|
pe,
|
|
@@ -1464,35 +1466,35 @@ function rr({
|
|
|
1464
1466
|
o
|
|
1465
1467
|
) : null,
|
|
1466
1468
|
// bottom-center
|
|
1467
|
-
u != null ?
|
|
1469
|
+
u != null ? f.div(
|
|
1468
1470
|
s.class("bc-nine-slice-pane bc-nine-slice-footer"),
|
|
1469
|
-
k.left(
|
|
1471
|
+
k.left(C),
|
|
1470
1472
|
pe,
|
|
1471
1473
|
// style.height(footerHeightPx),
|
|
1472
1474
|
// style.width(visibleAreaWidthPx),
|
|
1473
|
-
|
|
1475
|
+
f.div(
|
|
1474
1476
|
s.class("bc-nine-slice-pane-content"),
|
|
1475
1477
|
Re,
|
|
1476
1478
|
u
|
|
1477
1479
|
)
|
|
1478
1480
|
) : null,
|
|
1479
1481
|
// bottom-end corner
|
|
1480
|
-
|
|
1482
|
+
p != null ? f.div(
|
|
1481
1483
|
s.class("bc-nine-slice-pane bc-nine-slice-bottom-end"),
|
|
1482
1484
|
U,
|
|
1483
1485
|
pe,
|
|
1484
1486
|
// style.height(footerHeightPx),
|
|
1485
1487
|
// style.width(sidebarEndWidthPx),
|
|
1486
|
-
|
|
1488
|
+
p
|
|
1487
1489
|
) : null
|
|
1488
1490
|
),
|
|
1489
1491
|
// horizontal scrollbar
|
|
1490
|
-
|
|
1492
|
+
f.div(
|
|
1491
1493
|
s.class("bc-nine-slice-pane bc-nine-slice-horizontal-scrollbar"),
|
|
1492
1494
|
k.overflowX("scroll"),
|
|
1493
1495
|
k.left("0"),
|
|
1494
1496
|
k.right(
|
|
1495
|
-
|
|
1497
|
+
S(
|
|
1496
1498
|
M,
|
|
1497
1499
|
_
|
|
1498
1500
|
)((D, N) => D ? `${N}px` : "0")
|
|
@@ -1503,7 +1505,7 @@ function rr({
|
|
|
1503
1505
|
(D) => D ? "16px" : "0"
|
|
1504
1506
|
)
|
|
1505
1507
|
),
|
|
1506
|
-
|
|
1508
|
+
f.div(
|
|
1507
1509
|
s.class(
|
|
1508
1510
|
"bc-nine-slice-pane bc-nine-slice-horizontal-scrollbar-thumb"
|
|
1509
1511
|
),
|
|
@@ -1517,19 +1519,19 @@ function rr({
|
|
|
1517
1519
|
const N = D.target, K = N.scrollLeft, T = N.scrollWidth - N.clientWidth;
|
|
1518
1520
|
if (T > 0) {
|
|
1519
1521
|
const A = K / T, j = Ce.value;
|
|
1520
|
-
|
|
1522
|
+
w.set(
|
|
1521
1523
|
BigInt(Math.round(Number(j) * A))
|
|
1522
1524
|
);
|
|
1523
1525
|
}
|
|
1524
1526
|
})
|
|
1525
1527
|
),
|
|
1526
1528
|
// vertical scrollbar
|
|
1527
|
-
|
|
1529
|
+
f.div(
|
|
1528
1530
|
s.class("bc-nine-slice-pane bc-nine-slice-vertical-scrollbar"),
|
|
1529
1531
|
k.overflowY("scroll"),
|
|
1530
1532
|
k.top("0"),
|
|
1531
1533
|
k.bottom(
|
|
1532
|
-
|
|
1534
|
+
S(
|
|
1533
1535
|
I,
|
|
1534
1536
|
_
|
|
1535
1537
|
)((D, N) => D ? `${N}px` : "0")
|
|
@@ -1540,13 +1542,13 @@ function rr({
|
|
|
1540
1542
|
(D) => D ? "16px" : "0"
|
|
1541
1543
|
)
|
|
1542
1544
|
),
|
|
1543
|
-
|
|
1545
|
+
f.div(
|
|
1544
1546
|
s.class(
|
|
1545
1547
|
"bc-nine-slice-pane bc-nine-slice-vertical-scrollbar-thumb"
|
|
1546
1548
|
),
|
|
1547
1549
|
k.width("100%"),
|
|
1548
1550
|
k.height(
|
|
1549
|
-
|
|
1551
|
+
S(
|
|
1550
1552
|
r,
|
|
1551
1553
|
c,
|
|
1552
1554
|
n,
|
|
@@ -1559,7 +1561,7 @@ function rr({
|
|
|
1559
1561
|
const N = D.target, K = N.scrollTop, T = N.scrollHeight - N.clientHeight;
|
|
1560
1562
|
if (T > 0) {
|
|
1561
1563
|
const A = K / T, j = Ae.value;
|
|
1562
|
-
|
|
1564
|
+
y.set(
|
|
1563
1565
|
BigInt(Math.round(Number(j) * A))
|
|
1564
1566
|
);
|
|
1565
1567
|
}
|
|
@@ -1572,13 +1574,13 @@ function rr({
|
|
|
1572
1574
|
function kt({ header: e, footer: t, body: n, shadowOnScroll: a = !0 }, ...r) {
|
|
1573
1575
|
const l = G("none");
|
|
1574
1576
|
function i(c) {
|
|
1575
|
-
const o = c.scrollTop === 0,
|
|
1576
|
-
o &&
|
|
1577
|
+
const o = c.scrollTop === 0, p = c.scrollTop + c.clientHeight >= c.scrollHeight - 1;
|
|
1578
|
+
o && p ? l.set("none") : o ? l.set("bottom") : p ? l.set("top") : l.set("both");
|
|
1577
1579
|
}
|
|
1578
|
-
return
|
|
1580
|
+
return f.div(
|
|
1579
1581
|
s.class("bc-scrollable-panel"),
|
|
1580
1582
|
s.class(
|
|
1581
|
-
|
|
1583
|
+
S(
|
|
1582
1584
|
l,
|
|
1583
1585
|
a
|
|
1584
1586
|
)((c, o) => {
|
|
@@ -1595,9 +1597,9 @@ function kt({ header: e, footer: t, body: n, shadowOnScroll: a = !0 }, ...r) {
|
|
|
1595
1597
|
}
|
|
1596
1598
|
})
|
|
1597
1599
|
),
|
|
1598
|
-
e &&
|
|
1599
|
-
|
|
1600
|
-
|
|
1600
|
+
e && f.div(s.class("bc-scrollable-panel__header"), e),
|
|
1601
|
+
f.div(s.class("bc-scrollable-panel--header-shadow"), f.div()),
|
|
1602
|
+
f.div(
|
|
1601
1603
|
s.class("bc-scrollable-panel__body"),
|
|
1602
1604
|
ae(
|
|
1603
1605
|
(c) => Y(We(() => i(c)))
|
|
@@ -1608,8 +1610,8 @@ function kt({ header: e, footer: t, body: n, shadowOnScroll: a = !0 }, ...r) {
|
|
|
1608
1610
|
}),
|
|
1609
1611
|
n
|
|
1610
1612
|
),
|
|
1611
|
-
|
|
1612
|
-
t &&
|
|
1613
|
+
f.div(s.class("bc-scrollable-panel--footer-shadow"), f.div()),
|
|
1614
|
+
t && f.div(s.class("bc-scrollable-panel__footer"), t),
|
|
1613
1615
|
...r
|
|
1614
1616
|
);
|
|
1615
1617
|
}
|
|
@@ -1618,9 +1620,9 @@ function ea(e, t, n) {
|
|
|
1618
1620
|
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(" ");
|
|
1619
1621
|
}
|
|
1620
1622
|
function sr({ variant: e = "default", size: t = "md", roundedness: n = "lg" } = {}, ...a) {
|
|
1621
|
-
return
|
|
1623
|
+
return f.div(
|
|
1622
1624
|
s.class(
|
|
1623
|
-
|
|
1625
|
+
S(
|
|
1624
1626
|
e,
|
|
1625
1627
|
t,
|
|
1626
1628
|
n
|
|
@@ -1676,52 +1678,52 @@ const xe = {
|
|
|
1676
1678
|
onBeforeOpen: u,
|
|
1677
1679
|
onAfterOpen: c,
|
|
1678
1680
|
buildListboxContent: o
|
|
1679
|
-
} = e,
|
|
1680
|
-
let
|
|
1681
|
-
const
|
|
1682
|
-
t?.(
|
|
1683
|
-
},
|
|
1684
|
-
const _ = xe.getValues(
|
|
1685
|
-
switch (
|
|
1681
|
+
} = e, p = G(!1), g = G(-1), x = G(null), h = he("dropdown"), v = he("listbox");
|
|
1682
|
+
let d, y;
|
|
1683
|
+
const w = (C) => {
|
|
1684
|
+
t?.(C), p.set(!1), g.set(-1), x.set(null), d?.focus();
|
|
1685
|
+
}, b = (C) => {
|
|
1686
|
+
const _ = xe.getValues(m.get(l));
|
|
1687
|
+
switch (C.key) {
|
|
1686
1688
|
case "ArrowDown": {
|
|
1687
|
-
if (
|
|
1688
|
-
|
|
1689
|
+
if (C.preventDefault(), !p.value)
|
|
1690
|
+
p.set(!0), _.length > 0 && (g.set(0), x.set(_[0]));
|
|
1689
1691
|
else {
|
|
1690
1692
|
const L = Math.min(
|
|
1691
|
-
|
|
1693
|
+
g.value + 1,
|
|
1692
1694
|
_.length - 1
|
|
1693
1695
|
);
|
|
1694
|
-
|
|
1696
|
+
g.set(L), x.set(_[L] ?? null);
|
|
1695
1697
|
}
|
|
1696
1698
|
break;
|
|
1697
1699
|
}
|
|
1698
1700
|
case "ArrowUp": {
|
|
1699
|
-
if (
|
|
1700
|
-
const L = Math.max(
|
|
1701
|
-
|
|
1701
|
+
if (C.preventDefault(), p.value) {
|
|
1702
|
+
const L = Math.max(g.value - 1, 0);
|
|
1703
|
+
g.set(L), x.set(_[L] ?? null);
|
|
1702
1704
|
}
|
|
1703
1705
|
break;
|
|
1704
1706
|
}
|
|
1705
1707
|
case "Enter": {
|
|
1706
|
-
if (
|
|
1707
|
-
const L = _[
|
|
1708
|
-
L != null &&
|
|
1708
|
+
if (C.preventDefault(), p.value && g.value >= 0) {
|
|
1709
|
+
const L = _[g.value];
|
|
1710
|
+
L != null && w(L);
|
|
1709
1711
|
} else {
|
|
1710
1712
|
u?.();
|
|
1711
|
-
const L = xe.getValues(
|
|
1712
|
-
|
|
1713
|
+
const L = xe.getValues(m.get(l));
|
|
1714
|
+
p.set(!0), L.length > 0 && (g.set(0), x.set(L[0])), setTimeout(() => c?.(), 0);
|
|
1713
1715
|
}
|
|
1714
1716
|
break;
|
|
1715
1717
|
}
|
|
1716
1718
|
case "Escape": {
|
|
1717
|
-
|
|
1719
|
+
p.value && (C.preventDefault(), p.set(!1), g.set(-1), x.set(null), d?.focus());
|
|
1718
1720
|
break;
|
|
1719
1721
|
}
|
|
1720
1722
|
case " ": {
|
|
1721
|
-
if (
|
|
1722
|
-
|
|
1723
|
-
const L = xe.getValues(
|
|
1724
|
-
|
|
1723
|
+
if (m.get(i)) {
|
|
1724
|
+
C.preventDefault();
|
|
1725
|
+
const L = xe.getValues(m.get(l));
|
|
1726
|
+
p.set(!p.value), p.value && L.length > 0 && (g.set(0), x.set(L[0]));
|
|
1725
1727
|
}
|
|
1726
1728
|
break;
|
|
1727
1729
|
}
|
|
@@ -1732,27 +1734,27 @@ const xe = {
|
|
|
1732
1734
|
...e,
|
|
1733
1735
|
input: Ft(
|
|
1734
1736
|
s.class("bc-dropdown__trigger"),
|
|
1735
|
-
|
|
1737
|
+
f.span(s.class("bc-dropdown__display"), r),
|
|
1736
1738
|
ee(
|
|
1737
1739
|
{ icon: "ph:caret-up-down-bold", color: "neutral" },
|
|
1738
1740
|
s.class("bc-dropdown__arrow")
|
|
1739
1741
|
)
|
|
1740
1742
|
)
|
|
1741
1743
|
},
|
|
1742
|
-
Ee((
|
|
1743
|
-
ae((_) => (
|
|
1744
|
-
() => _.removeEventListener("keydown",
|
|
1744
|
+
Ee((C) => E(
|
|
1745
|
+
ae((_) => (d = _, _.addEventListener("keydown", b), Y(
|
|
1746
|
+
() => _.removeEventListener("keydown", b)
|
|
1745
1747
|
))),
|
|
1746
1748
|
le(e),
|
|
1747
|
-
s.id(
|
|
1749
|
+
s.id(h),
|
|
1748
1750
|
s.tabindex(0),
|
|
1749
|
-
B.controls(
|
|
1750
|
-
B.expanded(
|
|
1751
|
+
B.controls(v),
|
|
1752
|
+
B.expanded(p),
|
|
1751
1753
|
s.class("bc-dropdown"),
|
|
1752
1754
|
s.role(a),
|
|
1753
1755
|
B.activedescendant(
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
+
S(
|
|
1757
|
+
p,
|
|
1756
1758
|
x
|
|
1757
1759
|
)(
|
|
1758
1760
|
(_, L) => _ && L != null ? `dropdown-option-${String(L)}` : ""
|
|
@@ -1760,25 +1762,25 @@ const xe = {
|
|
|
1760
1762
|
),
|
|
1761
1763
|
n != null ? $.blur(() => {
|
|
1762
1764
|
setTimeout(() => {
|
|
1763
|
-
|
|
1765
|
+
y?.contains(document.activeElement) || (p.set(!1), g.set(-1), n());
|
|
1764
1766
|
}, 100);
|
|
1765
1767
|
}) : R,
|
|
1766
1768
|
Ze({
|
|
1767
|
-
content: () =>
|
|
1769
|
+
content: () => f.div(
|
|
1768
1770
|
ae((_) => {
|
|
1769
|
-
|
|
1771
|
+
y = _;
|
|
1770
1772
|
}),
|
|
1771
|
-
k.minWidth(
|
|
1773
|
+
k.minWidth(C.$.width.map((_) => `${_ - 10}px`)),
|
|
1772
1774
|
s.class("bc-dropdown__listbox"),
|
|
1773
1775
|
s.role("listbox"),
|
|
1774
|
-
s.id(
|
|
1775
|
-
B.labelledby(
|
|
1776
|
+
s.id(v),
|
|
1777
|
+
B.labelledby(h),
|
|
1776
1778
|
o({
|
|
1777
|
-
dropdownId:
|
|
1778
|
-
listboxId:
|
|
1779
|
+
dropdownId: h,
|
|
1780
|
+
listboxId: v,
|
|
1779
1781
|
focusedValue: x,
|
|
1780
|
-
handleKeyDown:
|
|
1781
|
-
onSelect:
|
|
1782
|
+
handleKeyDown: b,
|
|
1783
|
+
onSelect: w
|
|
1782
1784
|
})
|
|
1783
1785
|
),
|
|
1784
1786
|
mainAxisOffset: 0,
|
|
@@ -1787,15 +1789,15 @@ const xe = {
|
|
|
1787
1789
|
showOn: (_, L) => {
|
|
1788
1790
|
const V = L;
|
|
1789
1791
|
L = () => {
|
|
1790
|
-
|
|
1792
|
+
p.set(!1), g.set(-1), x.set(null), V();
|
|
1791
1793
|
};
|
|
1792
1794
|
const P = () => {
|
|
1793
|
-
if (
|
|
1795
|
+
if (p.value)
|
|
1794
1796
|
L();
|
|
1795
1797
|
else {
|
|
1796
1798
|
u?.();
|
|
1797
|
-
const I = xe.getValues(
|
|
1798
|
-
|
|
1799
|
+
const I = xe.getValues(m.get(l));
|
|
1800
|
+
p.set(!0), I.length > 0 && (g.set(0), x.set(I[0])), _(), setTimeout(() => c?.(), 0);
|
|
1799
1801
|
}
|
|
1800
1802
|
};
|
|
1801
1803
|
return $.click(P);
|
|
@@ -1810,25 +1812,25 @@ const xe = {
|
|
|
1810
1812
|
e,
|
|
1811
1813
|
(l) => Dt(l, {
|
|
1812
1814
|
value: (i) => {
|
|
1813
|
-
const u =
|
|
1815
|
+
const u = S(
|
|
1814
1816
|
i,
|
|
1815
1817
|
n
|
|
1816
|
-
)((o,
|
|
1818
|
+
)((o, p) => t(o.value, p)), c = S(
|
|
1817
1819
|
i,
|
|
1818
1820
|
r
|
|
1819
|
-
)((o,
|
|
1820
|
-
return
|
|
1821
|
+
)((o, p) => p != null && t(o.value, p));
|
|
1822
|
+
return f.div(
|
|
1821
1823
|
Y(u.dispose),
|
|
1822
1824
|
Y(c.dispose),
|
|
1823
1825
|
s.class("bc-dropdown__option"),
|
|
1824
1826
|
s.class(
|
|
1825
|
-
|
|
1827
|
+
S(
|
|
1826
1828
|
u,
|
|
1827
1829
|
c,
|
|
1828
1830
|
i
|
|
1829
|
-
)((o,
|
|
1831
|
+
)((o, p, g) => {
|
|
1830
1832
|
const x = [];
|
|
1831
|
-
return o && x.push("bc-dropdown__option--selected"),
|
|
1833
|
+
return o && x.push("bc-dropdown__option--selected"), p && x.push("bc-dropdown__option--focused"), g.disabled && x.push("bc-dropdown__option--disabled"), x.join(" ");
|
|
1832
1834
|
})
|
|
1833
1835
|
),
|
|
1834
1836
|
s.role("option"),
|
|
@@ -1840,25 +1842,25 @@ const xe = {
|
|
|
1840
1842
|
() => $.click(() => a(i.value.value)),
|
|
1841
1843
|
() => R
|
|
1842
1844
|
),
|
|
1843
|
-
|
|
1845
|
+
f.div(
|
|
1844
1846
|
s.class("bc-dropdown__option-content"),
|
|
1845
1847
|
// Before content - simple conditional rendering
|
|
1846
|
-
i.value.before &&
|
|
1848
|
+
i.value.before && f.span(
|
|
1847
1849
|
s.class("bc-dropdown__option-before"),
|
|
1848
1850
|
i.value.before
|
|
1849
1851
|
),
|
|
1850
1852
|
// Label
|
|
1851
|
-
|
|
1853
|
+
f.span(s.class("bc-dropdown__option-label"), i.$.label),
|
|
1852
1854
|
// After content - simple conditional rendering
|
|
1853
|
-
i.value.after &&
|
|
1855
|
+
i.value.after && f.span(s.class("bc-dropdown__option-after"), i.value.after)
|
|
1854
1856
|
)
|
|
1855
1857
|
);
|
|
1856
1858
|
},
|
|
1857
|
-
group: (i) =>
|
|
1859
|
+
group: (i) => f.div(
|
|
1858
1860
|
s.class("bc-dropdown__group"),
|
|
1859
1861
|
s.role("group"),
|
|
1860
1862
|
B.label(i.$.group),
|
|
1861
|
-
|
|
1863
|
+
f.div(s.class("bc-dropdown__group-label"), i.$.group),
|
|
1862
1864
|
_e(
|
|
1863
1865
|
i.$.options,
|
|
1864
1866
|
(u) => Wt(
|
|
@@ -1870,33 +1872,33 @@ const xe = {
|
|
|
1870
1872
|
)
|
|
1871
1873
|
)
|
|
1872
1874
|
),
|
|
1873
|
-
break: () =>
|
|
1875
|
+
break: () => f.hr(s.class("bc-dropdown__separator"))
|
|
1874
1876
|
})
|
|
1875
1877
|
), ta = (e) => {
|
|
1876
1878
|
const {
|
|
1877
1879
|
value: t,
|
|
1878
1880
|
options: n,
|
|
1879
1881
|
unselectedLabel: a,
|
|
1880
|
-
equality: r = (o,
|
|
1882
|
+
equality: r = (o, p) => o === p,
|
|
1881
1883
|
placeholder: l,
|
|
1882
1884
|
searchable: i = !1
|
|
1883
|
-
} = e, u =
|
|
1885
|
+
} = e, u = S(
|
|
1884
1886
|
t,
|
|
1885
1887
|
n
|
|
1886
|
-
)((o,
|
|
1888
|
+
)((o, p) => {
|
|
1887
1889
|
if (o == null) return "";
|
|
1888
|
-
const
|
|
1889
|
-
for (const
|
|
1890
|
-
if (
|
|
1891
|
-
return
|
|
1892
|
-
if (
|
|
1893
|
-
const
|
|
1894
|
-
if (
|
|
1890
|
+
const g = (x) => {
|
|
1891
|
+
for (const h of x) {
|
|
1892
|
+
if (h.type === "value" && r(h.value, o))
|
|
1893
|
+
return h.label;
|
|
1894
|
+
if (h.type === "group") {
|
|
1895
|
+
const v = g(h.options);
|
|
1896
|
+
if (v) return v;
|
|
1895
1897
|
}
|
|
1896
1898
|
}
|
|
1897
1899
|
};
|
|
1898
|
-
return p
|
|
1899
|
-
}), c =
|
|
1900
|
+
return g(p) || String(o);
|
|
1901
|
+
}), c = S(i)((o) => !o);
|
|
1900
1902
|
return zt({
|
|
1901
1903
|
...e,
|
|
1902
1904
|
role: "dropdown",
|
|
@@ -1910,9 +1912,9 @@ const xe = {
|
|
|
1910
1912
|
),
|
|
1911
1913
|
optionsSource: n,
|
|
1912
1914
|
allowSpaceToggle: c,
|
|
1913
|
-
buildListboxContent: ({ focusedValue: o, onSelect:
|
|
1915
|
+
buildListboxContent: ({ focusedValue: o, onSelect: p }) => _e(
|
|
1914
1916
|
n,
|
|
1915
|
-
(
|
|
1917
|
+
(g) => Wt(g, r, t, p, o)
|
|
1916
1918
|
)
|
|
1917
1919
|
});
|
|
1918
1920
|
}, na = (e) => {
|
|
@@ -1930,59 +1932,59 @@ const xe = {
|
|
|
1930
1932
|
e,
|
|
1931
1933
|
(i) => Dt(i, {
|
|
1932
1934
|
value: (u) => {
|
|
1933
|
-
const c =
|
|
1935
|
+
const c = S(
|
|
1934
1936
|
u,
|
|
1935
1937
|
n
|
|
1936
|
-
)((
|
|
1938
|
+
)((p, g) => t(p.value, g)), o = S(
|
|
1937
1939
|
u,
|
|
1938
1940
|
r
|
|
1939
1941
|
)(
|
|
1940
|
-
(
|
|
1942
|
+
(p, g) => g != null && t(p.value, g)
|
|
1941
1943
|
);
|
|
1942
|
-
return
|
|
1944
|
+
return f.div(
|
|
1943
1945
|
Y(c.dispose),
|
|
1944
1946
|
Y(o.dispose),
|
|
1945
1947
|
s.class("bc-dropdown__option"),
|
|
1946
1948
|
s.class(
|
|
1947
|
-
|
|
1949
|
+
S(
|
|
1948
1950
|
c,
|
|
1949
1951
|
o,
|
|
1950
1952
|
u
|
|
1951
|
-
)((
|
|
1952
|
-
const
|
|
1953
|
-
return
|
|
1953
|
+
)((p, g, x) => {
|
|
1954
|
+
const h = [];
|
|
1955
|
+
return p && h.push("bc-dropdown__option--selected"), g && h.push("bc-dropdown__option--focused"), x.disabled && h.push("bc-dropdown__option--disabled"), h.join(" ");
|
|
1954
1956
|
})
|
|
1955
1957
|
),
|
|
1956
1958
|
s.role("option"),
|
|
1957
|
-
s.id(u.map((
|
|
1959
|
+
s.id(u.map((p) => `dropdown-option-${String(p.value)}`)),
|
|
1958
1960
|
B.selected(c),
|
|
1959
1961
|
J(
|
|
1960
|
-
u.map((
|
|
1962
|
+
u.map((p) => !p.disabled),
|
|
1961
1963
|
() => $.click(() => a(u.value.value)),
|
|
1962
1964
|
() => R
|
|
1963
1965
|
),
|
|
1964
|
-
|
|
1966
|
+
f.div(
|
|
1965
1967
|
s.class("bc-dropdown__option-content"),
|
|
1966
1968
|
// Before slot
|
|
1967
|
-
u.value.before &&
|
|
1969
|
+
u.value.before && f.span(
|
|
1968
1970
|
s.class("bc-dropdown__option-before"),
|
|
1969
1971
|
u.value.before
|
|
1970
1972
|
),
|
|
1971
1973
|
// Custom renderer for the main content
|
|
1972
|
-
|
|
1974
|
+
f.span(
|
|
1973
1975
|
s.class("bc-dropdown__option-label"),
|
|
1974
1976
|
l(u.$.value)
|
|
1975
1977
|
),
|
|
1976
1978
|
// After slot
|
|
1977
|
-
u.value.after &&
|
|
1979
|
+
u.value.after && f.span(s.class("bc-dropdown__option-after"), u.value.after)
|
|
1978
1980
|
)
|
|
1979
1981
|
);
|
|
1980
1982
|
},
|
|
1981
|
-
group: (u) =>
|
|
1983
|
+
group: (u) => f.div(
|
|
1982
1984
|
s.class("bc-dropdown__group"),
|
|
1983
1985
|
s.role("group"),
|
|
1984
1986
|
B.label(u.$.group),
|
|
1985
|
-
|
|
1987
|
+
f.div(s.class("bc-dropdown__group-label"), u.$.group),
|
|
1986
1988
|
_e(
|
|
1987
1989
|
u.$.options,
|
|
1988
1990
|
(c) => Yt(
|
|
@@ -1995,7 +1997,7 @@ const xe = {
|
|
|
1995
1997
|
)
|
|
1996
1998
|
)
|
|
1997
1999
|
),
|
|
1998
|
-
break: () =>
|
|
2000
|
+
break: () => f.hr(s.class("bc-dropdown__separator"))
|
|
1999
2001
|
})
|
|
2000
2002
|
), aa = (e) => {
|
|
2001
2003
|
const {
|
|
@@ -2003,24 +2005,24 @@ const xe = {
|
|
|
2003
2005
|
loadOptions: n,
|
|
2004
2006
|
renderOption: a,
|
|
2005
2007
|
renderValue: r,
|
|
2006
|
-
equality: l = (
|
|
2008
|
+
equality: l = (b, C) => b === C,
|
|
2007
2009
|
placeholder: i,
|
|
2008
2010
|
searchPlaceholder: u,
|
|
2009
2011
|
debounceMs: c = 150
|
|
2010
|
-
} = e, o = G(""),
|
|
2012
|
+
} = e, o = G(""), p = G(!1), g = G([]);
|
|
2011
2013
|
let x;
|
|
2012
|
-
const
|
|
2013
|
-
let
|
|
2014
|
-
const
|
|
2015
|
-
|
|
2016
|
-
|
|
2014
|
+
const h = m.toSignal(t), v = () => (r ?? a)(h);
|
|
2015
|
+
let d = null;
|
|
2016
|
+
const y = (b) => {
|
|
2017
|
+
p.set(!0), Promise.resolve(n(b)).then((C) => {
|
|
2018
|
+
g.set(C ?? []);
|
|
2017
2019
|
}).catch(() => {
|
|
2018
|
-
|
|
2019
|
-
}).finally(() =>
|
|
2020
|
-
},
|
|
2021
|
-
|
|
2020
|
+
g.set([]);
|
|
2021
|
+
}).finally(() => p.set(!1));
|
|
2022
|
+
}, w = (b) => {
|
|
2023
|
+
d != null && (clearTimeout(d), d = null), d = setTimeout(
|
|
2022
2024
|
() => {
|
|
2023
|
-
|
|
2025
|
+
y(b);
|
|
2024
2026
|
},
|
|
2025
2027
|
Math.max(0, c)
|
|
2026
2028
|
);
|
|
@@ -2029,27 +2031,27 @@ const xe = {
|
|
|
2029
2031
|
...e,
|
|
2030
2032
|
role: "combobox",
|
|
2031
2033
|
display: J(
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
() => ne(fe, (
|
|
2034
|
+
S(t)((b) => b != null),
|
|
2035
|
+
v,
|
|
2036
|
+
() => ne(fe, (b) => b.$.selectOne)
|
|
2035
2037
|
),
|
|
2036
|
-
optionsSource:
|
|
2038
|
+
optionsSource: g,
|
|
2037
2039
|
onBeforeOpen: () => {
|
|
2038
|
-
const
|
|
2039
|
-
|
|
2040
|
+
const b = m.get(o);
|
|
2041
|
+
w(b);
|
|
2040
2042
|
},
|
|
2041
2043
|
onAfterOpen: () => {
|
|
2042
2044
|
x?.focus();
|
|
2043
2045
|
},
|
|
2044
|
-
buildListboxContent: ({ focusedValue:
|
|
2046
|
+
buildListboxContent: ({ focusedValue: b, handleKeyDown: C, onSelect: _ }) => E(
|
|
2045
2047
|
// Search input at the top
|
|
2046
|
-
|
|
2048
|
+
f.div(
|
|
2047
2049
|
s.class("bc-dropdown__search"),
|
|
2048
|
-
|
|
2050
|
+
f.input(
|
|
2049
2051
|
s.type("text"),
|
|
2050
2052
|
s.class("bc-dropdown__search-input"),
|
|
2051
2053
|
s.placeholder(
|
|
2052
|
-
|
|
2054
|
+
S(
|
|
2053
2055
|
u,
|
|
2054
2056
|
i
|
|
2055
2057
|
)((L, V) => L ?? V ?? "Search")
|
|
@@ -2058,25 +2060,25 @@ const xe = {
|
|
|
2058
2060
|
ae((L) => (x = L, R)),
|
|
2059
2061
|
$.input((L) => {
|
|
2060
2062
|
const V = L.target;
|
|
2061
|
-
o.set(V.value),
|
|
2063
|
+
o.set(V.value), w(V.value);
|
|
2062
2064
|
}),
|
|
2063
|
-
$.keydown(
|
|
2065
|
+
$.keydown(C)
|
|
2064
2066
|
)
|
|
2065
2067
|
),
|
|
2066
2068
|
J(
|
|
2067
|
-
|
|
2068
|
-
() =>
|
|
2069
|
+
p,
|
|
2070
|
+
() => f.div(
|
|
2069
2071
|
s.class("bc-dropdown__loading"),
|
|
2070
2072
|
ee({ icon: "ph:spinner-bold", color: "neutral" })
|
|
2071
2073
|
),
|
|
2072
2074
|
() => _e(
|
|
2073
|
-
|
|
2075
|
+
g,
|
|
2074
2076
|
(L) => Yt(
|
|
2075
2077
|
L,
|
|
2076
2078
|
l,
|
|
2077
|
-
|
|
2079
|
+
h,
|
|
2078
2080
|
_,
|
|
2079
|
-
|
|
2081
|
+
b,
|
|
2080
2082
|
a
|
|
2081
2083
|
)
|
|
2082
2084
|
)
|
|
@@ -2106,17 +2108,17 @@ function qt(e) {
|
|
|
2106
2108
|
showOn: u = "click",
|
|
2107
2109
|
closable: c = !0,
|
|
2108
2110
|
onClose: o,
|
|
2109
|
-
onAction:
|
|
2110
|
-
ariaLabel:
|
|
2111
|
+
onAction: p,
|
|
2112
|
+
ariaLabel: g,
|
|
2111
2113
|
ariaLabelledBy: x
|
|
2112
|
-
} = e,
|
|
2113
|
-
let
|
|
2114
|
+
} = e, h = he("menu"), v = G(-1), d = G([]);
|
|
2115
|
+
let y = null;
|
|
2114
2116
|
return E(
|
|
2115
|
-
Y(
|
|
2117
|
+
Y(v, d),
|
|
2116
2118
|
Ze({
|
|
2117
|
-
content: () => ae((
|
|
2118
|
-
|
|
2119
|
-
const
|
|
2119
|
+
content: () => ae((w) => {
|
|
2120
|
+
y = document.activeElement;
|
|
2121
|
+
const b = (P, I, M) => {
|
|
2120
2122
|
if (I.length === 0) return -1;
|
|
2121
2123
|
let F = P + M, O = 0;
|
|
2122
2124
|
for (; O < I.length; ) {
|
|
@@ -2127,17 +2129,17 @@ function qt(e) {
|
|
|
2127
2129
|
F += M, O++;
|
|
2128
2130
|
}
|
|
2129
2131
|
return P;
|
|
2130
|
-
},
|
|
2131
|
-
const I =
|
|
2132
|
+
}, C = (P) => {
|
|
2133
|
+
const I = d.value, M = v.value;
|
|
2132
2134
|
switch (P.key) {
|
|
2133
2135
|
case "ArrowDown":
|
|
2134
2136
|
P.preventDefault(), P.stopPropagation();
|
|
2135
|
-
const F =
|
|
2137
|
+
const F = b(M, I, 1);
|
|
2136
2138
|
_(F, I);
|
|
2137
2139
|
break;
|
|
2138
2140
|
case "ArrowUp":
|
|
2139
2141
|
P.preventDefault(), P.stopPropagation();
|
|
2140
|
-
const O =
|
|
2142
|
+
const O = b(M, I, -1);
|
|
2141
2143
|
_(O, I);
|
|
2142
2144
|
break;
|
|
2143
2145
|
case "Enter":
|
|
@@ -2147,7 +2149,7 @@ function qt(e) {
|
|
|
2147
2149
|
if (H.getAttribute("aria-disabled") === "true")
|
|
2148
2150
|
return;
|
|
2149
2151
|
const oe = H.getAttribute("data-key");
|
|
2150
|
-
oe &&
|
|
2152
|
+
oe && p && p(oe), H.click(), o?.();
|
|
2151
2153
|
}
|
|
2152
2154
|
break;
|
|
2153
2155
|
case "Escape":
|
|
@@ -2172,37 +2174,37 @@ function qt(e) {
|
|
|
2172
2174
|
break;
|
|
2173
2175
|
}
|
|
2174
2176
|
}, _ = (P, I) => {
|
|
2175
|
-
|
|
2177
|
+
v.value >= 0 && I[v.value] && (I[v.value].classList.remove(
|
|
2176
2178
|
"bc-menu-item--focused"
|
|
2177
|
-
), I[
|
|
2179
|
+
), I[v.value].removeAttribute("aria-selected")), P >= 0 && I[P] && (I[P].classList.add("bc-menu-item--focused"), I[P].setAttribute("aria-selected", "true"), v.set(P), typeof I[P].scrollIntoView == "function" && I[P].scrollIntoView({ block: "nearest" }));
|
|
2178
2180
|
}, L = () => {
|
|
2179
2181
|
const P = Array.from(
|
|
2180
|
-
|
|
2182
|
+
w.querySelectorAll('[role="menuitem"]')
|
|
2181
2183
|
);
|
|
2182
|
-
if (
|
|
2184
|
+
if (d.set(P), P.length > 0) {
|
|
2183
2185
|
const I = P.findIndex(
|
|
2184
2186
|
(M) => M.getAttribute("aria-disabled") !== "true"
|
|
2185
2187
|
);
|
|
2186
2188
|
I >= 0 && _(I, P);
|
|
2187
2189
|
}
|
|
2188
2190
|
}, V = new MutationObserver(L);
|
|
2189
|
-
return V.observe(
|
|
2190
|
-
L(),
|
|
2191
|
-
}, 0), document.addEventListener("keydown",
|
|
2191
|
+
return V.observe(w, { childList: !0, subtree: !0 }), setTimeout(() => {
|
|
2192
|
+
L(), w.focus();
|
|
2193
|
+
}, 0), document.addEventListener("keydown", C, !0), E(
|
|
2192
2194
|
Y(() => {
|
|
2193
|
-
V.disconnect(), document.removeEventListener("keydown",
|
|
2195
|
+
V.disconnect(), document.removeEventListener("keydown", C, !0), y && y.focus();
|
|
2194
2196
|
}),
|
|
2195
2197
|
s.class("bc-menu"),
|
|
2196
|
-
s.id(
|
|
2198
|
+
s.id(h),
|
|
2197
2199
|
s.role("menu"),
|
|
2198
2200
|
s.tabindex(-1),
|
|
2199
2201
|
B.orientation("vertical"),
|
|
2200
|
-
|
|
2202
|
+
g ? B.label(g) : E(),
|
|
2201
2203
|
x ? B.labelledby(x) : E(),
|
|
2202
2204
|
B.activedescendant(
|
|
2203
|
-
|
|
2204
|
-
const I =
|
|
2205
|
-
return P >= 0 && I[P] ? I[P].id || `${
|
|
2205
|
+
v.map((P) => {
|
|
2206
|
+
const I = d.value;
|
|
2207
|
+
return P >= 0 && I[P] ? I[P].id || `${h}-item-${P}` : "";
|
|
2206
2208
|
})
|
|
2207
2209
|
),
|
|
2208
2210
|
$.click((P) => {
|
|
@@ -2211,16 +2213,16 @@ function qt(e) {
|
|
|
2211
2213
|
);
|
|
2212
2214
|
if (M && M.getAttribute("aria-disabled") !== "true") {
|
|
2213
2215
|
const F = M.getAttribute("data-key");
|
|
2214
|
-
F &&
|
|
2216
|
+
F && p && p(F);
|
|
2215
2217
|
}
|
|
2216
2218
|
}),
|
|
2217
2219
|
// Live region for screen reader announcements
|
|
2218
|
-
|
|
2220
|
+
f.div(
|
|
2219
2221
|
s.class("sr-only"),
|
|
2220
2222
|
B.live("polite"),
|
|
2221
2223
|
B.atomic(!0),
|
|
2222
|
-
|
|
2223
|
-
const I =
|
|
2224
|
+
v.map((P) => {
|
|
2225
|
+
const I = d.value;
|
|
2224
2226
|
if (P >= 0 && I[P]) {
|
|
2225
2227
|
const M = I[P].textContent || "";
|
|
2226
2228
|
return I[P].getAttribute("aria-disabled") === "true" ? `${M}, disabled` : `${M}, ${P + 1} of ${I.length}`;
|
|
@@ -2253,35 +2255,35 @@ function ir(e) {
|
|
|
2253
2255
|
ariaLabel: u,
|
|
2254
2256
|
submenu: c,
|
|
2255
2257
|
submenuPlacement: o = "right-start"
|
|
2256
|
-
} = e,
|
|
2257
|
-
return
|
|
2258
|
+
} = e, p = t ?? he("menu-item"), g = `menu-item-${p}`, x = c != null;
|
|
2259
|
+
return f.div(
|
|
2258
2260
|
s.class(
|
|
2259
|
-
|
|
2260
|
-
(
|
|
2261
|
+
S(l)(
|
|
2262
|
+
(h) => `bc-menu-item ${h ? "bc-menu-item--disabled" : ""} ${x ? "bc-menu-item--has-submenu" : ""}`
|
|
2261
2263
|
)
|
|
2262
2264
|
),
|
|
2263
|
-
s.id(
|
|
2265
|
+
s.id(g),
|
|
2264
2266
|
s.role("menuitem"),
|
|
2265
2267
|
s.tabindex(-1),
|
|
2266
|
-
nt.key(
|
|
2268
|
+
nt.key(p),
|
|
2267
2269
|
B.disabled(l),
|
|
2268
2270
|
B.selected(!1),
|
|
2269
2271
|
// Will be updated by focus management
|
|
2270
2272
|
x ? B.expanded(!1) : E(),
|
|
2271
2273
|
u ? B.label(u) : E(),
|
|
2272
|
-
$.click((
|
|
2273
|
-
if (
|
|
2274
|
-
|
|
2274
|
+
$.click((h) => {
|
|
2275
|
+
if (m.get(l)) {
|
|
2276
|
+
h.preventDefault(), h.stopPropagation();
|
|
2275
2277
|
return;
|
|
2276
2278
|
}
|
|
2277
2279
|
i?.();
|
|
2278
2280
|
}),
|
|
2279
2281
|
// Start content
|
|
2280
|
-
a &&
|
|
2282
|
+
a && f.span(s.class("bc-menu-item__start"), a),
|
|
2281
2283
|
// Main content
|
|
2282
|
-
|
|
2284
|
+
f.span(s.class("bc-menu-item__content"), n),
|
|
2283
2285
|
// End content
|
|
2284
|
-
r &&
|
|
2286
|
+
r && f.span(s.class("bc-menu-item__end"), r),
|
|
2285
2287
|
// Submenu (if present)
|
|
2286
2288
|
x && c ? Ze({
|
|
2287
2289
|
content: () => E(
|
|
@@ -2302,11 +2304,11 @@ function ir(e) {
|
|
|
2302
2304
|
}
|
|
2303
2305
|
function Zt(e = {}) {
|
|
2304
2306
|
const { label: t } = e;
|
|
2305
|
-
return
|
|
2307
|
+
return f.div(
|
|
2306
2308
|
s.class("bc-menu-separator"),
|
|
2307
2309
|
s.role("separator"),
|
|
2308
2310
|
B.orientation("horizontal"),
|
|
2309
|
-
t &&
|
|
2311
|
+
t && f.span(s.class("bc-menu-separator__label"), t)
|
|
2310
2312
|
);
|
|
2311
2313
|
}
|
|
2312
2314
|
function Gt(e, t, n) {
|
|
@@ -2358,7 +2360,7 @@ function en(e) {
|
|
|
2358
2360
|
() => _e(
|
|
2359
2361
|
t,
|
|
2360
2362
|
(i) => jt({
|
|
2361
|
-
value:
|
|
2363
|
+
value: S(
|
|
2362
2364
|
i,
|
|
2363
2365
|
n
|
|
2364
2366
|
)((u, c) => sa(c, u, a)),
|
|
@@ -2366,60 +2368,60 @@ function en(e) {
|
|
|
2366
2368
|
disabled: r
|
|
2367
2369
|
})
|
|
2368
2370
|
),
|
|
2369
|
-
() =>
|
|
2371
|
+
() => f.span(s.class("bc-input-container__placeholder"), e.placeholder)
|
|
2370
2372
|
);
|
|
2371
2373
|
}
|
|
2372
2374
|
function tn(e) {
|
|
2373
2375
|
const {
|
|
2374
2376
|
value: t,
|
|
2375
2377
|
options: n,
|
|
2376
|
-
equality: a = (o,
|
|
2378
|
+
equality: a = (o, p) => o === p,
|
|
2377
2379
|
placeholder: r
|
|
2378
2380
|
} = e, l = (o) => {
|
|
2379
|
-
const
|
|
2380
|
-
e.onChange?.(Kt(
|
|
2381
|
+
const p = m.get(t);
|
|
2382
|
+
e.onChange?.(Kt(p, o, a));
|
|
2381
2383
|
}, i = (o) => {
|
|
2382
|
-
const
|
|
2383
|
-
e.onChange?.(Gt(
|
|
2384
|
-
}, u = (o) =>
|
|
2384
|
+
const p = m.get(t);
|
|
2385
|
+
e.onChange?.(Gt(p, o, a));
|
|
2386
|
+
}, u = (o) => S(t)((p) => Qt(p, o, a)), c = qt({
|
|
2385
2387
|
items: () => {
|
|
2386
|
-
const o =
|
|
2387
|
-
for (const
|
|
2388
|
-
if (
|
|
2389
|
-
const x = u(
|
|
2390
|
-
|
|
2391
|
-
|
|
2388
|
+
const o = m.get(n), p = [];
|
|
2389
|
+
for (const g of o)
|
|
2390
|
+
if (g.type === "value") {
|
|
2391
|
+
const x = u(g.value);
|
|
2392
|
+
p.push(
|
|
2393
|
+
f.div(
|
|
2392
2394
|
s.role("menuitem"),
|
|
2393
2395
|
s.tabindex(-1),
|
|
2394
|
-
B.disabled(
|
|
2396
|
+
B.disabled(g.disabled === !0),
|
|
2395
2397
|
B.checked(x),
|
|
2396
2398
|
s.class("bc-menu-item"),
|
|
2397
|
-
|
|
2398
|
-
$.click(() => i(
|
|
2399
|
+
f.span(s.class("bc-menu-item__content"), g.label),
|
|
2400
|
+
$.click(() => i(g.value))
|
|
2399
2401
|
)
|
|
2400
2402
|
);
|
|
2401
|
-
} else
|
|
2402
|
-
|
|
2403
|
+
} else g.type === "group" ? p.push(
|
|
2404
|
+
f.div(
|
|
2403
2405
|
s.class("bc-menu-group"),
|
|
2404
|
-
|
|
2405
|
-
...
|
|
2406
|
+
f.div(s.class("bc-menu-group__label"), g.group),
|
|
2407
|
+
...g.options.map((x) => {
|
|
2406
2408
|
if (x.type === "value") {
|
|
2407
|
-
const
|
|
2408
|
-
return
|
|
2409
|
+
const h = u(x.value);
|
|
2410
|
+
return f.div(
|
|
2409
2411
|
s.role("menuitem"),
|
|
2410
2412
|
s.tabindex(-1),
|
|
2411
2413
|
B.disabled(x.disabled === !0),
|
|
2412
|
-
B.checked(
|
|
2414
|
+
B.checked(h),
|
|
2413
2415
|
s.class("bc-menu-item"),
|
|
2414
|
-
|
|
2416
|
+
f.span(s.class("bc-menu-item__content"), x.label),
|
|
2415
2417
|
$.click(() => i(x.value))
|
|
2416
2418
|
);
|
|
2417
2419
|
}
|
|
2418
2420
|
return E();
|
|
2419
2421
|
})
|
|
2420
2422
|
)
|
|
2421
|
-
) :
|
|
2422
|
-
return
|
|
2423
|
+
) : p.push(Zt());
|
|
2424
|
+
return p;
|
|
2423
2425
|
},
|
|
2424
2426
|
placement: "bottom-start",
|
|
2425
2427
|
showDelay: 0,
|
|
@@ -2468,65 +2470,65 @@ function nn(e) {
|
|
|
2468
2470
|
const {
|
|
2469
2471
|
value: t,
|
|
2470
2472
|
options: n,
|
|
2471
|
-
equality: a = (
|
|
2473
|
+
equality: a = (h, v) => h === v,
|
|
2472
2474
|
placeholder: r,
|
|
2473
2475
|
searchPlaceholder: l,
|
|
2474
2476
|
filter: i
|
|
2475
|
-
} = e, u = G(""), c = (
|
|
2476
|
-
const
|
|
2477
|
-
e.onChange?.(Kt(
|
|
2478
|
-
}, o = (
|
|
2479
|
-
const
|
|
2480
|
-
e.onChange?.(Gt(
|
|
2481
|
-
},
|
|
2477
|
+
} = e, u = G(""), c = (h) => {
|
|
2478
|
+
const v = m.get(t);
|
|
2479
|
+
e.onChange?.(Kt(v, h, a));
|
|
2480
|
+
}, o = (h) => {
|
|
2481
|
+
const v = m.get(t);
|
|
2482
|
+
e.onChange?.(Gt(v, h, a));
|
|
2483
|
+
}, p = (h) => S(t)((v) => Qt(v, h, a)), g = S(
|
|
2482
2484
|
n,
|
|
2483
2485
|
u
|
|
2484
|
-
)((
|
|
2486
|
+
)((h, v) => Jt(h, v, i)), x = qt({
|
|
2485
2487
|
items: () => {
|
|
2486
|
-
const
|
|
2487
|
-
if (
|
|
2488
|
-
return
|
|
2489
|
-
|
|
2488
|
+
const h = [], v = m.get(g);
|
|
2489
|
+
if (v.length === 0)
|
|
2490
|
+
return h.push(
|
|
2491
|
+
f.div(
|
|
2490
2492
|
s.class("bc-dropdown__empty"),
|
|
2491
|
-
ne(fe, (
|
|
2493
|
+
ne(fe, (d) => d.$.noResults)
|
|
2492
2494
|
)
|
|
2493
|
-
),
|
|
2494
|
-
for (const
|
|
2495
|
-
if (
|
|
2496
|
-
const
|
|
2497
|
-
|
|
2498
|
-
|
|
2495
|
+
), h;
|
|
2496
|
+
for (const d of v)
|
|
2497
|
+
if (d.type === "value") {
|
|
2498
|
+
const y = p(d.value);
|
|
2499
|
+
h.push(
|
|
2500
|
+
f.div(
|
|
2499
2501
|
s.role("menuitem"),
|
|
2500
2502
|
s.tabindex(-1),
|
|
2501
|
-
B.disabled(
|
|
2502
|
-
B.checked(
|
|
2503
|
+
B.disabled(d.disabled === !0),
|
|
2504
|
+
B.checked(y),
|
|
2503
2505
|
s.class("bc-menu-item"),
|
|
2504
|
-
|
|
2505
|
-
$.click(() => o(
|
|
2506
|
+
f.span(s.class("bc-menu-item__content"), d.label),
|
|
2507
|
+
$.click(() => o(d.value))
|
|
2506
2508
|
)
|
|
2507
2509
|
);
|
|
2508
|
-
} else
|
|
2509
|
-
|
|
2510
|
+
} else d.type === "group" ? h.push(
|
|
2511
|
+
f.div(
|
|
2510
2512
|
s.class("bc-menu-group"),
|
|
2511
|
-
|
|
2512
|
-
...
|
|
2513
|
-
if (
|
|
2514
|
-
const
|
|
2515
|
-
return
|
|
2513
|
+
f.div(s.class("bc-menu-group__label"), d.group),
|
|
2514
|
+
...d.options.map((y) => {
|
|
2515
|
+
if (y.type === "value") {
|
|
2516
|
+
const w = p(y.value);
|
|
2517
|
+
return f.div(
|
|
2516
2518
|
s.role("menuitem"),
|
|
2517
2519
|
s.tabindex(-1),
|
|
2518
|
-
B.disabled(
|
|
2519
|
-
B.checked(
|
|
2520
|
+
B.disabled(y.disabled === !0),
|
|
2521
|
+
B.checked(w),
|
|
2520
2522
|
s.class("bc-menu-item"),
|
|
2521
|
-
|
|
2522
|
-
$.click(() => o(
|
|
2523
|
+
f.span(s.class("bc-menu-item__content"), y.label),
|
|
2524
|
+
$.click(() => o(y.value))
|
|
2523
2525
|
);
|
|
2524
2526
|
}
|
|
2525
2527
|
return E();
|
|
2526
2528
|
})
|
|
2527
2529
|
)
|
|
2528
|
-
) :
|
|
2529
|
-
return
|
|
2530
|
+
) : h.push(Zt());
|
|
2531
|
+
return h;
|
|
2530
2532
|
},
|
|
2531
2533
|
placement: "bottom-start",
|
|
2532
2534
|
showDelay: 0,
|
|
@@ -2534,14 +2536,14 @@ function nn(e) {
|
|
|
2534
2536
|
// Open the menu when the search input gains focus
|
|
2535
2537
|
// We intentionally do not auto-hide on blur here because the Menu
|
|
2536
2538
|
// manages its own close behavior (outside click, Escape, etc.)
|
|
2537
|
-
showOn: (
|
|
2538
|
-
const
|
|
2539
|
+
showOn: (h, v) => ae((d) => {
|
|
2540
|
+
const y = d.querySelector(
|
|
2539
2541
|
".bc-dropdown__search-input"
|
|
2540
2542
|
);
|
|
2541
|
-
if (
|
|
2542
|
-
const
|
|
2543
|
-
return
|
|
2544
|
-
|
|
2543
|
+
if (y) {
|
|
2544
|
+
const w = () => h();
|
|
2545
|
+
return y.addEventListener("focus", w), Y(() => {
|
|
2546
|
+
y.removeEventListener("focus", w);
|
|
2545
2547
|
});
|
|
2546
2548
|
}
|
|
2547
2549
|
return E();
|
|
@@ -2562,24 +2564,24 @@ function nn(e) {
|
|
|
2562
2564
|
onRemove: c
|
|
2563
2565
|
}),
|
|
2564
2566
|
// Always-visible search box replacing the selector button
|
|
2565
|
-
|
|
2567
|
+
f.div(
|
|
2566
2568
|
s.class("bc-input-container__tags-selector"),
|
|
2567
|
-
|
|
2569
|
+
f.input(
|
|
2568
2570
|
s.type("text"),
|
|
2569
2571
|
s.class("bc-dropdown__search-input"),
|
|
2570
2572
|
s.placeholder(
|
|
2571
|
-
|
|
2573
|
+
S(
|
|
2572
2574
|
l,
|
|
2573
2575
|
r
|
|
2574
|
-
)((
|
|
2576
|
+
)((h, v) => h ?? v ?? "")
|
|
2575
2577
|
),
|
|
2576
2578
|
s.value(u),
|
|
2577
|
-
$.input((
|
|
2578
|
-
const
|
|
2579
|
-
u.set(
|
|
2579
|
+
$.input((h) => {
|
|
2580
|
+
const v = h.target;
|
|
2581
|
+
u.set(v.value);
|
|
2580
2582
|
}),
|
|
2581
|
-
$.keydown((
|
|
2582
|
-
(
|
|
2583
|
+
$.keydown((h) => {
|
|
2584
|
+
(h.key === "ArrowUp" || h.key === "ArrowDown" || h.key === "Enter" || h.key === " ") && h.stopPropagation();
|
|
2583
2585
|
})
|
|
2584
2586
|
),
|
|
2585
2587
|
x
|
|
@@ -2614,7 +2616,7 @@ const pr = (e) => {
|
|
|
2614
2616
|
...e,
|
|
2615
2617
|
input: se["datetime-local"](
|
|
2616
2618
|
le(e),
|
|
2617
|
-
s.value(
|
|
2619
|
+
s.value(m.map(t, la)),
|
|
2618
2620
|
s.class("bc-input"),
|
|
2619
2621
|
n != null ? $.blur(W(n)) : R,
|
|
2620
2622
|
a != null ? $.change(W((r) => a(new Date(r)))) : R
|
|
@@ -2630,7 +2632,7 @@ const pr = (e) => {
|
|
|
2630
2632
|
return In({
|
|
2631
2633
|
...r,
|
|
2632
2634
|
maxFiles: 1,
|
|
2633
|
-
value:
|
|
2635
|
+
value: m.map(t, (l) => l == null ? [] : [l]),
|
|
2634
2636
|
onChange: (l) => {
|
|
2635
2637
|
a?.(l[0]);
|
|
2636
2638
|
},
|
|
@@ -2655,7 +2657,7 @@ const pr = (e) => {
|
|
|
2655
2657
|
},
|
|
2656
2658
|
pending: () => ne(
|
|
2657
2659
|
fe,
|
|
2658
|
-
(t) =>
|
|
2660
|
+
(t) => f.span(
|
|
2659
2661
|
ee({
|
|
2660
2662
|
icon: "line-md:loading-twotone-loop",
|
|
2661
2663
|
title: t.$.loadingShort
|
|
@@ -2666,7 +2668,7 @@ const pr = (e) => {
|
|
|
2666
2668
|
const { value: t, onBlur: n, onChange: a, onInput: r, after: l, disabled: i, ...u } = e, c = ve(t, i, a);
|
|
2667
2669
|
return Le({
|
|
2668
2670
|
...u,
|
|
2669
|
-
value:
|
|
2671
|
+
value: m.map(t, $n),
|
|
2670
2672
|
onChange: a != null ? (o) => a(mt(o)) : void 0,
|
|
2671
2673
|
onInput: r != null ? (o) => r(mt(o)) : void 0,
|
|
2672
2674
|
onBlur: n,
|
|
@@ -2679,68 +2681,68 @@ const pr = (e) => {
|
|
|
2679
2681
|
return null;
|
|
2680
2682
|
}
|
|
2681
2683
|
}, vr = (e) => {
|
|
2682
|
-
const { value: t, step: n, min: a, max: r, onChange: l, onInput: i, after: u } = e, c = (
|
|
2683
|
-
const
|
|
2684
|
-
return
|
|
2685
|
-
}, o = n != null ? ne(fe, (
|
|
2686
|
-
const
|
|
2684
|
+
const { value: t, step: n, min: a, max: r, onChange: l, onInput: i, after: u } = e, c = (h) => {
|
|
2685
|
+
const v = a != null ? m.get(a) : void 0, d = r != null ? m.get(r) : void 0;
|
|
2686
|
+
return v != null && h < v ? v : d != null && h > d ? d : h;
|
|
2687
|
+
}, o = n != null ? ne(fe, (h) => {
|
|
2688
|
+
const v = S(
|
|
2687
2689
|
t,
|
|
2688
2690
|
a
|
|
2689
|
-
)((
|
|
2691
|
+
)((w, b) => b == null ? !0 : (w ?? 0n) > b), d = S(
|
|
2690
2692
|
t,
|
|
2691
2693
|
r
|
|
2692
|
-
)((
|
|
2693
|
-
const
|
|
2694
|
-
if (
|
|
2694
|
+
)((w, b) => b == null ? !0 : (w ?? 0n) < b), y = (w, b) => {
|
|
2695
|
+
const C = m.get(t) ?? 0n, _ = m.get(n), L = b?.shiftKey ? 10n : 1n, V = C + _ * L * w, P = a != null ? m.get(a) : void 0, I = r != null ? m.get(r) : void 0;
|
|
2696
|
+
if (w < 0n && P != null && V < P || w > 0n && I != null && V > I) return;
|
|
2695
2697
|
const M = c(V);
|
|
2696
|
-
M !==
|
|
2698
|
+
M !== C && l && l(M);
|
|
2697
2699
|
};
|
|
2698
2700
|
return ot(
|
|
2699
2701
|
s.class("bc-number-input-steppers"),
|
|
2700
|
-
|
|
2702
|
+
f.button(
|
|
2701
2703
|
s.type("button"),
|
|
2702
2704
|
s.class(
|
|
2703
2705
|
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
|
|
2704
2706
|
),
|
|
2705
2707
|
s.disabled(
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
+
S(
|
|
2709
|
+
d,
|
|
2708
2710
|
e.disabled ?? !1
|
|
2709
|
-
)((
|
|
2711
|
+
)((w, b) => !w || b)
|
|
2710
2712
|
),
|
|
2711
|
-
$.click((
|
|
2712
|
-
B.label(
|
|
2713
|
+
$.click((w) => y(1n, w)),
|
|
2714
|
+
B.label(h.$.incrementValue),
|
|
2713
2715
|
ee({ icon: "line-md:plus", size: "xs" })
|
|
2714
2716
|
),
|
|
2715
|
-
|
|
2717
|
+
f.button(
|
|
2716
2718
|
s.type("button"),
|
|
2717
2719
|
s.class(
|
|
2718
2720
|
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
|
|
2719
2721
|
),
|
|
2720
2722
|
s.disabled(
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
+
S(
|
|
2724
|
+
v,
|
|
2723
2725
|
e.disabled ?? !1
|
|
2724
|
-
)((
|
|
2726
|
+
)((w, b) => !w || b)
|
|
2725
2727
|
),
|
|
2726
|
-
$.click((
|
|
2727
|
-
B.label(
|
|
2728
|
+
$.click((w) => y(-1n, w)),
|
|
2729
|
+
B.label(h.$.decrementValue),
|
|
2728
2730
|
ee({ icon: "line-md:minus", size: "xs" })
|
|
2729
2731
|
)
|
|
2730
2732
|
);
|
|
2731
|
-
}) : null,
|
|
2732
|
-
const
|
|
2733
|
-
|
|
2734
|
-
} : void 0, x = i ? (
|
|
2735
|
-
const
|
|
2736
|
-
|
|
2733
|
+
}) : null, p = u != null && o != null ? E(o, u) : u ?? o, g = l ? (h) => {
|
|
2734
|
+
const v = Ct(h);
|
|
2735
|
+
v != null && l(c(v));
|
|
2736
|
+
} : void 0, x = i ? (h) => {
|
|
2737
|
+
const v = Ct(h);
|
|
2738
|
+
v != null && i(c(v));
|
|
2737
2739
|
} : void 0;
|
|
2738
2740
|
return Le({
|
|
2739
2741
|
...e,
|
|
2740
|
-
value:
|
|
2741
|
-
onChange:
|
|
2742
|
+
value: m.map(t, (h) => h.toString()),
|
|
2743
|
+
onChange: g,
|
|
2742
2744
|
onInput: x,
|
|
2743
|
-
after:
|
|
2745
|
+
after: p,
|
|
2744
2746
|
mask: null,
|
|
2745
2747
|
allowMode: "digits",
|
|
2746
2748
|
class: "bc-number-input"
|
|
@@ -2753,83 +2755,83 @@ const pr = (e) => {
|
|
|
2753
2755
|
return null;
|
|
2754
2756
|
}
|
|
2755
2757
|
}, yr = (e) => {
|
|
2756
|
-
const { value: t, step: n, min: a, max: r, onChange: l, onInput: i, after: u } = e, c = (
|
|
2757
|
-
const
|
|
2758
|
-
return
|
|
2759
|
-
}, o = n != null ? ne(fe, (
|
|
2760
|
-
const
|
|
2758
|
+
const { value: t, step: n, min: a, max: r, onChange: l, onInput: i, after: u } = e, c = (v) => {
|
|
2759
|
+
const d = a != null ? m.get(a) : void 0, y = r != null ? m.get(r) : void 0;
|
|
2760
|
+
return d != null && v < d ? d : y != null && v > y ? y : v;
|
|
2761
|
+
}, o = n != null ? ne(fe, (v) => {
|
|
2762
|
+
const d = S(
|
|
2761
2763
|
t,
|
|
2762
2764
|
a
|
|
2763
|
-
)((
|
|
2764
|
-
const _ =
|
|
2765
|
-
return
|
|
2766
|
-
}),
|
|
2765
|
+
)((b, C) => {
|
|
2766
|
+
const _ = b ?? 0n;
|
|
2767
|
+
return C == null ? !0 : _ > C;
|
|
2768
|
+
}), y = S(
|
|
2767
2769
|
t,
|
|
2768
2770
|
r
|
|
2769
|
-
)((
|
|
2770
|
-
const _ =
|
|
2771
|
-
return
|
|
2772
|
-
}),
|
|
2773
|
-
const _ =
|
|
2774
|
-
if (
|
|
2771
|
+
)((b, C) => {
|
|
2772
|
+
const _ = b ?? 0n;
|
|
2773
|
+
return C == null ? !0 : _ < C;
|
|
2774
|
+
}), w = (b, C) => {
|
|
2775
|
+
const _ = m.get(t) ?? 0n, L = m.get(n), V = C?.shiftKey ? 10n : 1n, P = _ + L * V * b, I = a != null ? m.get(a) : void 0, M = r != null ? m.get(r) : void 0;
|
|
2776
|
+
if (b < 0n && I != null && P < I || b > 0n && M != null && P > M) return;
|
|
2775
2777
|
const F = c(P);
|
|
2776
2778
|
F !== _ && l && l(F);
|
|
2777
2779
|
};
|
|
2778
2780
|
return ot(
|
|
2779
2781
|
s.class("bc-number-input-steppers"),
|
|
2780
2782
|
s.type("button"),
|
|
2781
|
-
|
|
2783
|
+
f.button(
|
|
2782
2784
|
s.class(
|
|
2783
2785
|
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
|
|
2784
2786
|
),
|
|
2785
2787
|
s.disabled(
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
+
S(
|
|
2789
|
+
y,
|
|
2788
2790
|
e.disabled ?? !1
|
|
2789
|
-
)((
|
|
2791
|
+
)((b, C) => !b || C)
|
|
2790
2792
|
),
|
|
2791
|
-
$.click((
|
|
2792
|
-
B.label(
|
|
2793
|
+
$.click((b) => w(1n, b)),
|
|
2794
|
+
B.label(v.$.incrementValue),
|
|
2793
2795
|
ee({ icon: "line-md:plus", size: "xs" })
|
|
2794
2796
|
),
|
|
2795
|
-
|
|
2797
|
+
f.button(
|
|
2796
2798
|
s.type("button"),
|
|
2797
2799
|
s.class(
|
|
2798
2800
|
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
|
|
2799
2801
|
),
|
|
2800
2802
|
s.disabled(
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
+
S(
|
|
2804
|
+
d,
|
|
2803
2805
|
e.disabled ?? !1
|
|
2804
|
-
)((
|
|
2806
|
+
)((b, C) => !b || C)
|
|
2805
2807
|
),
|
|
2806
|
-
$.click((
|
|
2807
|
-
B.label(
|
|
2808
|
+
$.click((b) => w(-1n, b)),
|
|
2809
|
+
B.label(v.$.decrementValue),
|
|
2808
2810
|
ee({ icon: "line-md:minus", size: "xs" })
|
|
2809
2811
|
)
|
|
2810
2812
|
);
|
|
2811
|
-
}) : null,
|
|
2812
|
-
const
|
|
2813
|
-
l(
|
|
2814
|
-
} : void 0,
|
|
2815
|
-
const
|
|
2816
|
-
i(
|
|
2813
|
+
}) : null, p = ve(t, e.disabled, l), g = u != null && o != null ? E(o, p, u) : u != null ? E(p, u) : o != null ? E(o, p) : p, x = l ? (v) => {
|
|
2814
|
+
const d = St(v);
|
|
2815
|
+
l(d === null ? null : c(d));
|
|
2816
|
+
} : void 0, h = i ? (v) => {
|
|
2817
|
+
const d = St(v);
|
|
2818
|
+
i(d === null ? null : c(d));
|
|
2817
2819
|
} : void 0;
|
|
2818
2820
|
return Le({
|
|
2819
2821
|
...e,
|
|
2820
|
-
value:
|
|
2822
|
+
value: m.map(t, (v) => v == null ? "" : v.toString()),
|
|
2821
2823
|
onChange: x,
|
|
2822
|
-
onInput:
|
|
2823
|
-
after:
|
|
2824
|
+
onInput: h,
|
|
2825
|
+
after: g,
|
|
2824
2826
|
mask: null,
|
|
2825
2827
|
allowMode: "digits",
|
|
2826
2828
|
class: "bc-number-input"
|
|
2827
2829
|
});
|
|
2828
2830
|
}, wr = (e) => {
|
|
2829
2831
|
const { value: t, onChange: n, onBlur: a, before: r } = e, l = G(""), i = (c) => {
|
|
2830
|
-
n?.(
|
|
2832
|
+
n?.(m.get(t).filter((o) => o !== c));
|
|
2831
2833
|
}, u = () => {
|
|
2832
|
-
const c = l.value.trim(), o =
|
|
2834
|
+
const c = l.value.trim(), o = m.get(t);
|
|
2833
2835
|
c === "" || o.includes(c) || (l.set(""), n?.([...o, c]));
|
|
2834
2836
|
};
|
|
2835
2837
|
return te({
|
|
@@ -2866,7 +2868,7 @@ const pr = (e) => {
|
|
|
2866
2868
|
...e,
|
|
2867
2869
|
input: se.date(
|
|
2868
2870
|
le(e),
|
|
2869
|
-
s.value(
|
|
2871
|
+
s.value(m.map(t, (l) => l.toString())),
|
|
2870
2872
|
s.class("bc-input"),
|
|
2871
2873
|
n != null ? $.blur(W(n)) : R,
|
|
2872
2874
|
a != null ? $.change(W((l) => a(r.PlainDate.from(l)))) : R
|
|
@@ -2880,7 +2882,7 @@ const pr = (e) => {
|
|
|
2880
2882
|
...e,
|
|
2881
2883
|
input: se.date(
|
|
2882
2884
|
le(e),
|
|
2883
|
-
s.value(
|
|
2885
|
+
s.value(m.map(t, (c) => c?.toString() ?? "")),
|
|
2884
2886
|
s.class("bc-input"),
|
|
2885
2887
|
n != null ? $.blur(W(n)) : R,
|
|
2886
2888
|
a != null ? $.change(
|
|
@@ -2899,7 +2901,7 @@ const pr = (e) => {
|
|
|
2899
2901
|
...e,
|
|
2900
2902
|
input: se.time(
|
|
2901
2903
|
le(e),
|
|
2902
|
-
s.value(
|
|
2904
|
+
s.value(m.map(t, (l) => l.toString())),
|
|
2903
2905
|
s.class("bc-input"),
|
|
2904
2906
|
n != null ? $.blur(W(n)) : R,
|
|
2905
2907
|
a != null ? $.change(W((l) => a(r.PlainTime.from(l)))) : R
|
|
@@ -2913,7 +2915,7 @@ const pr = (e) => {
|
|
|
2913
2915
|
...e,
|
|
2914
2916
|
input: se.time(
|
|
2915
2917
|
le(e),
|
|
2916
|
-
s.value(
|
|
2918
|
+
s.value(m.map(t, (c) => c?.toString())),
|
|
2917
2919
|
s.class("bc-input"),
|
|
2918
2920
|
n != null ? $.blur(W(n)) : R,
|
|
2919
2921
|
a != null ? $.change(
|
|
@@ -2932,7 +2934,7 @@ const pr = (e) => {
|
|
|
2932
2934
|
...e,
|
|
2933
2935
|
input: se["datetime-local"](
|
|
2934
2936
|
le(e),
|
|
2935
|
-
s.value(
|
|
2937
|
+
s.value(m.map(t, (l) => l.toJSON())),
|
|
2936
2938
|
s.class("bc-input"),
|
|
2937
2939
|
n != null ? $.blur(W(n)) : R,
|
|
2938
2940
|
a != null ? $.change(W((l) => a(r.PlainDateTime.from(l)))) : R
|
|
@@ -2946,7 +2948,7 @@ const pr = (e) => {
|
|
|
2946
2948
|
...e,
|
|
2947
2949
|
input: se["datetime-local"](
|
|
2948
2950
|
le(e),
|
|
2949
|
-
s.value(
|
|
2951
|
+
s.value(m.map(t, (c) => c?.toJSON())),
|
|
2950
2952
|
s.class("bc-input"),
|
|
2951
2953
|
n != null ? $.blur(W(n)) : R,
|
|
2952
2954
|
a != null ? $.change(
|
|
@@ -2969,7 +2971,7 @@ const pr = (e) => {
|
|
|
2969
2971
|
input: se["datetime-local"](
|
|
2970
2972
|
le(e),
|
|
2971
2973
|
s.value(
|
|
2972
|
-
|
|
2974
|
+
m.map(t, (l) => oa(Number(l.epochMilliseconds)))
|
|
2973
2975
|
),
|
|
2974
2976
|
s.class("bc-input"),
|
|
2975
2977
|
n != null ? $.blur(W(n)) : R,
|
|
@@ -2992,7 +2994,7 @@ const pr = (e) => {
|
|
|
2992
2994
|
input: se["datetime-local"](
|
|
2993
2995
|
le(e),
|
|
2994
2996
|
s.value(
|
|
2995
|
-
|
|
2997
|
+
m.map(
|
|
2996
2998
|
t,
|
|
2997
2999
|
(c) => c == null ? null : ia(Number(c.epochMilliseconds))
|
|
2998
3000
|
)
|
|
@@ -3015,12 +3017,12 @@ const pr = (e) => {
|
|
|
3015
3017
|
...e,
|
|
3016
3018
|
input: se["datetime-local"](
|
|
3017
3019
|
le(e),
|
|
3018
|
-
s.value(
|
|
3020
|
+
s.value(m.map(t, (l) => l.toJSON())),
|
|
3019
3021
|
s.class("bc-input"),
|
|
3020
3022
|
n != null ? $.blur(W(n)) : R,
|
|
3021
3023
|
a != null ? $.change(
|
|
3022
3024
|
W((l) => {
|
|
3023
|
-
const i = r.PlainDateTime.from(l), u =
|
|
3025
|
+
const i = r.PlainDateTime.from(l), u = m.get(e.placeholder) ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
3024
3026
|
return a(r.ZonedDateTime.from({ ...i, timeZone: u }));
|
|
3025
3027
|
})
|
|
3026
3028
|
) : R
|
|
@@ -3034,14 +3036,14 @@ const pr = (e) => {
|
|
|
3034
3036
|
...e,
|
|
3035
3037
|
input: se["datetime-local"](
|
|
3036
3038
|
le(e),
|
|
3037
|
-
s.value(
|
|
3039
|
+
s.value(m.map(t, (c) => c?.toJSON())),
|
|
3038
3040
|
s.class("bc-input"),
|
|
3039
3041
|
n != null ? $.blur(W(n)) : R,
|
|
3040
3042
|
a != null ? $.change(
|
|
3041
3043
|
W((c) => {
|
|
3042
3044
|
if (c === "") return a(null);
|
|
3043
|
-
const o = u.PlainDateTime.from(c),
|
|
3044
|
-
return a(u.ZonedDateTime.from({ ...o, timeZone:
|
|
3045
|
+
const o = u.PlainDateTime.from(c), p = m.get(e.placeholder) ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
3046
|
+
return a(u.ZonedDateTime.from({ ...o, timeZone: p }));
|
|
3045
3047
|
})
|
|
3046
3048
|
) : R
|
|
3047
3049
|
),
|
|
@@ -3055,7 +3057,7 @@ const pr = (e) => {
|
|
|
3055
3057
|
...e,
|
|
3056
3058
|
input: se.month(
|
|
3057
3059
|
le(e),
|
|
3058
|
-
s.value(
|
|
3060
|
+
s.value(m.map(t, (l) => l.toString())),
|
|
3059
3061
|
s.class("bc-input"),
|
|
3060
3062
|
n != null ? $.blur(W(n)) : R,
|
|
3061
3063
|
a != null ? $.change(W((l) => a(r.PlainYearMonth.from(l)))) : R
|
|
@@ -3069,7 +3071,7 @@ const pr = (e) => {
|
|
|
3069
3071
|
...e,
|
|
3070
3072
|
input: se.month(
|
|
3071
3073
|
le(e),
|
|
3072
|
-
s.value(
|
|
3074
|
+
s.value(m.map(t, (c) => c?.toString())),
|
|
3073
3075
|
s.class("bc-input"),
|
|
3074
3076
|
n != null ? $.blur(W(n)) : R,
|
|
3075
3077
|
a != null ? $.change(
|
|
@@ -3087,7 +3089,7 @@ const pr = (e) => {
|
|
|
3087
3089
|
(a) => Le({
|
|
3088
3090
|
...e,
|
|
3089
3091
|
// Map Temporal value to MM-DD string
|
|
3090
|
-
value:
|
|
3092
|
+
value: m.map(t, (r) => r.toString()),
|
|
3091
3093
|
onChange: n != null ? (r) => n(a.PlainMonthDay.from(`--${r}`)) : void 0,
|
|
3092
3094
|
onInput: void 0,
|
|
3093
3095
|
mask: "99-99",
|
|
@@ -3099,7 +3101,7 @@ const pr = (e) => {
|
|
|
3099
3101
|
return ie(
|
|
3100
3102
|
(i) => Le({
|
|
3101
3103
|
...e,
|
|
3102
|
-
value:
|
|
3104
|
+
value: m.map(t, (u) => u?.toString() ?? ""),
|
|
3103
3105
|
onChange: n != null ? (u) => n(u === "" ? null : i.PlainMonthDay.from(`--${u}`)) : void 0,
|
|
3104
3106
|
onInput: void 0,
|
|
3105
3107
|
mask: "99-99",
|
|
@@ -3112,7 +3114,7 @@ const pr = (e) => {
|
|
|
3112
3114
|
return ie(
|
|
3113
3115
|
(a) => Le({
|
|
3114
3116
|
...e,
|
|
3115
|
-
value:
|
|
3117
|
+
value: m.map(t, (r) => r.toString()),
|
|
3116
3118
|
onChange: n ? (r) => n(a.Duration.from(r)) : void 0,
|
|
3117
3119
|
onInput: void 0,
|
|
3118
3120
|
...Tn(a.Duration.from),
|
|
@@ -3268,7 +3270,7 @@ function Fr({
|
|
|
3268
3270
|
title: a.$.locale
|
|
3269
3271
|
}),
|
|
3270
3272
|
Ut({
|
|
3271
|
-
options:
|
|
3273
|
+
options: m.map(
|
|
3272
3274
|
e,
|
|
3273
3275
|
(i) => i.map((u) => {
|
|
3274
3276
|
let c = u.name;
|
|
@@ -3309,41 +3311,41 @@ function pa({
|
|
|
3309
3311
|
onClose: u,
|
|
3310
3312
|
class: c
|
|
3311
3313
|
} = {}, ...o) {
|
|
3312
|
-
const
|
|
3313
|
-
return
|
|
3314
|
-
Y(() =>
|
|
3314
|
+
const p = m.map(i, (g) => g != null);
|
|
3315
|
+
return f.section(
|
|
3316
|
+
Y(() => m.dispose(p)),
|
|
3315
3317
|
s.class(
|
|
3316
|
-
|
|
3318
|
+
S(
|
|
3317
3319
|
n,
|
|
3318
|
-
|
|
3320
|
+
p,
|
|
3319
3321
|
t,
|
|
3320
3322
|
e,
|
|
3321
3323
|
c
|
|
3322
3324
|
)(
|
|
3323
|
-
(
|
|
3325
|
+
(g, x, h, v, d) => [
|
|
3324
3326
|
da(
|
|
3325
|
-
|
|
3327
|
+
g,
|
|
3326
3328
|
x,
|
|
3329
|
+
h,
|
|
3327
3330
|
v,
|
|
3328
|
-
|
|
3329
|
-
m
|
|
3331
|
+
d
|
|
3330
3332
|
)
|
|
3331
3333
|
].join(" ")
|
|
3332
3334
|
)
|
|
3333
3335
|
),
|
|
3334
3336
|
s.style(
|
|
3335
|
-
|
|
3337
|
+
S(
|
|
3336
3338
|
a,
|
|
3337
3339
|
r
|
|
3338
3340
|
)(
|
|
3339
|
-
(
|
|
3341
|
+
(g, x) => fa(g, x)
|
|
3340
3342
|
)
|
|
3341
3343
|
),
|
|
3342
3344
|
B.live("polite"),
|
|
3343
3345
|
B.busy(e),
|
|
3344
3346
|
J(
|
|
3345
3347
|
e,
|
|
3346
|
-
() =>
|
|
3348
|
+
() => f.div(
|
|
3347
3349
|
s.class("bc-notification__visual bc-notification__loader"),
|
|
3348
3350
|
ee({
|
|
3349
3351
|
icon: "line-md:loading-twotone-loop",
|
|
@@ -3353,25 +3355,25 @@ function pa({
|
|
|
3353
3355
|
})
|
|
3354
3356
|
),
|
|
3355
3357
|
() => J(
|
|
3356
|
-
|
|
3357
|
-
() =>
|
|
3358
|
+
p,
|
|
3359
|
+
() => f.div(
|
|
3358
3360
|
s.class("bc-notification__visual bc-notification__icon"),
|
|
3359
3361
|
ee({ icon: i, size: "lg", color: a })
|
|
3360
3362
|
),
|
|
3361
|
-
() =>
|
|
3363
|
+
() => f.div(
|
|
3362
3364
|
s.class("bc-notification__visual bc-notification__accent"),
|
|
3363
3365
|
B.hidden(!0)
|
|
3364
3366
|
)
|
|
3365
3367
|
)
|
|
3366
3368
|
),
|
|
3367
|
-
|
|
3369
|
+
f.div(
|
|
3368
3370
|
s.class("bc-notification__body"),
|
|
3369
|
-
l != null ?
|
|
3370
|
-
|
|
3371
|
+
l != null ? f.div(s.class("bc-notification__title"), l) : null,
|
|
3372
|
+
f.div(s.class("bc-notification__content"), ...o)
|
|
3371
3373
|
),
|
|
3372
3374
|
J(
|
|
3373
3375
|
t,
|
|
3374
|
-
() =>
|
|
3376
|
+
() => f.div(
|
|
3375
3377
|
s.class("bc-notification__meta"),
|
|
3376
3378
|
qe({
|
|
3377
3379
|
size: "sm",
|
|
@@ -3416,26 +3418,26 @@ const ga = new ba(), an = {
|
|
|
3416
3418
|
o >= 0 && n.splice(o, 1);
|
|
3417
3419
|
};
|
|
3418
3420
|
}
|
|
3419
|
-
const r = [], l = ({ dismissAfter: c, onClose: o, animation:
|
|
3420
|
-
t.update((
|
|
3421
|
-
const
|
|
3422
|
-
animation:
|
|
3423
|
-
class:
|
|
3424
|
-
loading:
|
|
3425
|
-
withCloseButton:
|
|
3426
|
-
|
|
3421
|
+
const r = [], l = ({ dismissAfter: c, onClose: o, animation: p = { fade: !0 }, ...g }, ...x) => {
|
|
3422
|
+
t.update((d) => d + 1);
|
|
3423
|
+
const h = c != null ? typeof c == "number" ? Dn(c * 1e3) : c : void 0, v = {
|
|
3424
|
+
animation: p,
|
|
3425
|
+
class: m.toSignal(g.class),
|
|
3426
|
+
loading: m.toSignal(g.loading ?? !1),
|
|
3427
|
+
withCloseButton: m.toSignal(
|
|
3428
|
+
g.withCloseButton == null && c == null ? !0 : g.withCloseButton ?? !0
|
|
3427
3429
|
),
|
|
3428
|
-
withBorder:
|
|
3429
|
-
color:
|
|
3430
|
-
radius:
|
|
3431
|
-
title:
|
|
3432
|
-
icon:
|
|
3430
|
+
withBorder: m.toSignal(g.withBorder ?? !1),
|
|
3431
|
+
color: m.toSignal(g.color ?? "primary"),
|
|
3432
|
+
radius: m.toSignal(g.radius ?? "md"),
|
|
3433
|
+
title: g.title ?? R,
|
|
3434
|
+
icon: m.toSignal(g.icon),
|
|
3433
3435
|
children: x,
|
|
3434
|
-
listenRequestClose: (
|
|
3436
|
+
listenRequestClose: (d) => (r.push(d), o?.(), () => {
|
|
3435
3437
|
}),
|
|
3436
|
-
delayedClose:
|
|
3438
|
+
delayedClose: h
|
|
3437
3439
|
};
|
|
3438
|
-
n.forEach((
|
|
3440
|
+
n.forEach((d) => d(v));
|
|
3439
3441
|
}, i = () => {
|
|
3440
3442
|
r.forEach((c) => c()), r.length = 0;
|
|
3441
3443
|
}, u = ga.attach({ show: l, clear: i });
|
|
@@ -3454,13 +3456,13 @@ const ga = new ba(), an = {
|
|
|
3454
3456
|
}
|
|
3455
3457
|
};
|
|
3456
3458
|
function ma() {
|
|
3457
|
-
return ne(an, ({ listenOnShow: e, position: t }) =>
|
|
3459
|
+
return ne(an, ({ listenOnShow: e, position: t }) => f.div(
|
|
3458
3460
|
s.class("bc-notification-viewport"),
|
|
3459
3461
|
s.class(`bc-notification-viewport--${t}`),
|
|
3460
3462
|
un(
|
|
3461
3463
|
(n) => Y(
|
|
3462
3464
|
e((a) => {
|
|
3463
|
-
const r = [], l =
|
|
3465
|
+
const r = [], l = f.div(
|
|
3464
3466
|
wn(
|
|
3465
3467
|
{
|
|
3466
3468
|
animation: a.animation,
|
|
@@ -3511,7 +3513,7 @@ function Ur({
|
|
|
3511
3513
|
);
|
|
3512
3514
|
return e ? pn(
|
|
3513
3515
|
() => import("./translations-BaKCl3Vc.js"),
|
|
3514
|
-
({ AuthI18n:
|
|
3516
|
+
({ AuthI18n: p }) => Lt(p, {}, () => o)
|
|
3515
3517
|
) : o;
|
|
3516
3518
|
});
|
|
3517
3519
|
}
|
|
@@ -3526,32 +3528,32 @@ function jr({
|
|
|
3526
3528
|
navpanes: u = !0,
|
|
3527
3529
|
search: c,
|
|
3528
3530
|
nameddest: o,
|
|
3529
|
-
viewrect:
|
|
3530
|
-
highlight:
|
|
3531
|
+
viewrect: p,
|
|
3532
|
+
highlight: g,
|
|
3531
3533
|
allowfullscreen: x = !1
|
|
3532
3534
|
}) {
|
|
3533
|
-
const
|
|
3535
|
+
const h = m.toSignal(
|
|
3534
3536
|
e
|
|
3535
|
-
).mapAsync(async (
|
|
3536
|
-
if (
|
|
3537
|
-
const
|
|
3538
|
-
return URL.createObjectURL(
|
|
3537
|
+
).mapAsync(async (d) => {
|
|
3538
|
+
if (d instanceof Blob) {
|
|
3539
|
+
const y = await d.arrayBuffer(), w = new Blob([y], { type: "application/pdf" });
|
|
3540
|
+
return URL.createObjectURL(w);
|
|
3539
3541
|
} else {
|
|
3540
|
-
if (
|
|
3542
|
+
if (d instanceof ArrayBuffer)
|
|
3541
3543
|
return URL.createObjectURL(
|
|
3542
|
-
new Blob([
|
|
3544
|
+
new Blob([d], { type: "application/pdf" })
|
|
3543
3545
|
);
|
|
3544
|
-
if (
|
|
3546
|
+
if (d instanceof Uint8Array)
|
|
3545
3547
|
return URL.createObjectURL(
|
|
3546
|
-
new Blob([new Uint8Array(
|
|
3548
|
+
new Blob([new Uint8Array(d)], { type: "application/pdf" })
|
|
3547
3549
|
);
|
|
3548
|
-
if (typeof
|
|
3549
|
-
const
|
|
3550
|
-
return URL.createObjectURL(
|
|
3550
|
+
if (typeof d == "string") {
|
|
3551
|
+
const w = await (await fetch(d)).arrayBuffer(), b = new Blob([w], { type: "application/pdf" });
|
|
3552
|
+
return URL.createObjectURL(b);
|
|
3551
3553
|
}
|
|
3552
3554
|
}
|
|
3553
|
-
}, null),
|
|
3554
|
-
|
|
3555
|
+
}, null), v = S(
|
|
3556
|
+
h,
|
|
3555
3557
|
t,
|
|
3556
3558
|
n,
|
|
3557
3559
|
a,
|
|
@@ -3561,42 +3563,42 @@ function jr({
|
|
|
3561
3563
|
u,
|
|
3562
3564
|
c,
|
|
3563
3565
|
o,
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
)((
|
|
3567
|
-
if (
|
|
3566
|
+
p,
|
|
3567
|
+
g
|
|
3568
|
+
)((d, y, w, b, C, _, L, V, P, I, M, F) => {
|
|
3569
|
+
if (d == null) return null;
|
|
3568
3570
|
const O = [];
|
|
3569
|
-
|
|
3571
|
+
y === !1 && O.push("toolbar=0"), w != null && w > 0 && O.push(`page=${w}`), b != null && b > 0 && O.push(`zoom=${b}`), C != null && O.push(`view=${C}`), _ != null && O.push(`pagemode=${_}`), 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)}`);
|
|
3570
3572
|
const H = O.join("&");
|
|
3571
|
-
return H ? `${
|
|
3573
|
+
return H ? `${d}#${H}` : d;
|
|
3572
3574
|
});
|
|
3573
|
-
return
|
|
3575
|
+
return f.div(
|
|
3574
3576
|
Y(
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3577
|
+
v,
|
|
3578
|
+
h.on((d, y) => {
|
|
3579
|
+
y != null && URL.revokeObjectURL(y);
|
|
3578
3580
|
}),
|
|
3579
3581
|
() => {
|
|
3580
|
-
const
|
|
3581
|
-
|
|
3582
|
+
const d = h.value;
|
|
3583
|
+
d != null && URL.revokeObjectURL(d);
|
|
3582
3584
|
}
|
|
3583
3585
|
),
|
|
3584
3586
|
s.class("h-full w-full"),
|
|
3585
3587
|
// could also use embed or object. IFrame seems to work on Safari.
|
|
3586
|
-
|
|
3588
|
+
f.iframe(
|
|
3587
3589
|
s.class("h-full w-full"),
|
|
3588
3590
|
s.allowfullscreen(x),
|
|
3589
3591
|
s.title("PDF Preview"),
|
|
3590
3592
|
s.loading("lazy"),
|
|
3591
3593
|
// Force iframe reload when URL changes (including fragment changes)
|
|
3592
3594
|
// by manually updating src instead of using attr.src
|
|
3593
|
-
ae((
|
|
3594
|
-
const
|
|
3595
|
-
let
|
|
3595
|
+
ae((d) => {
|
|
3596
|
+
const y = d;
|
|
3597
|
+
let w = !0;
|
|
3596
3598
|
return Y(
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3599
|
+
v.on((b) => {
|
|
3600
|
+
b != null && (w ? (y.src = b, w = !1) : (y.src = "about:blank", setTimeout(() => {
|
|
3601
|
+
y.src = b;
|
|
3600
3602
|
}, 50)));
|
|
3601
3603
|
})
|
|
3602
3604
|
);
|
|
@@ -3615,29 +3617,29 @@ function Hr({
|
|
|
3615
3617
|
sidebarViewOnLoad: u,
|
|
3616
3618
|
scrollModeOnLoad: c,
|
|
3617
3619
|
spreadModeOnLoad: o,
|
|
3618
|
-
enableScripting:
|
|
3619
|
-
enablePrinting:
|
|
3620
|
+
enableScripting: p,
|
|
3621
|
+
enablePrinting: g,
|
|
3620
3622
|
viewerUrl: x = null,
|
|
3621
|
-
allowfullscreen:
|
|
3622
|
-
class:
|
|
3623
|
+
allowfullscreen: h = !0,
|
|
3624
|
+
class: v = null
|
|
3623
3625
|
}) {
|
|
3624
|
-
const
|
|
3626
|
+
const d = m.toSignal(
|
|
3625
3627
|
e
|
|
3626
|
-
).mapAsync(async (
|
|
3627
|
-
if (
|
|
3628
|
-
return URL.createObjectURL(
|
|
3629
|
-
if (
|
|
3628
|
+
).mapAsync(async (w) => {
|
|
3629
|
+
if (w instanceof Blob)
|
|
3630
|
+
return URL.createObjectURL(w);
|
|
3631
|
+
if (w instanceof ArrayBuffer)
|
|
3630
3632
|
return URL.createObjectURL(
|
|
3631
|
-
new Blob([
|
|
3633
|
+
new Blob([w], { type: "application/pdf" })
|
|
3632
3634
|
);
|
|
3633
|
-
if (
|
|
3635
|
+
if (w instanceof Uint8Array)
|
|
3634
3636
|
return URL.createObjectURL(
|
|
3635
|
-
new Blob([new Uint8Array(
|
|
3637
|
+
new Blob([new Uint8Array(w)], { type: "application/pdf" })
|
|
3636
3638
|
);
|
|
3637
|
-
if (typeof
|
|
3638
|
-
return
|
|
3639
|
-
}, null),
|
|
3640
|
-
|
|
3639
|
+
if (typeof w == "string")
|
|
3640
|
+
return w;
|
|
3641
|
+
}, null), y = S(
|
|
3642
|
+
d,
|
|
3641
3643
|
x,
|
|
3642
3644
|
t,
|
|
3643
3645
|
n,
|
|
@@ -3648,50 +3650,50 @@ function Hr({
|
|
|
3648
3650
|
u,
|
|
3649
3651
|
c,
|
|
3650
3652
|
o,
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
)((
|
|
3654
|
-
if (
|
|
3655
|
-
const Q =
|
|
3656
|
-
U.set("file", encodeURIComponent(
|
|
3653
|
+
p,
|
|
3654
|
+
g
|
|
3655
|
+
)((w, b, C, _, L, V, P, I, M, F, O, H, oe) => {
|
|
3656
|
+
if (w == null) return null;
|
|
3657
|
+
const Q = b ?? "https://mozilla.github.io/pdf.js/web/viewer.html", U = new URLSearchParams();
|
|
3658
|
+
U.set("file", encodeURIComponent(w));
|
|
3657
3659
|
const X = [];
|
|
3658
|
-
|
|
3660
|
+
C != null && C > 0 && X.push(`page=${C}`), _ != null && (typeof _ == "string" ? X.push(`zoom=${_}`) : X.push(`zoom=${_}`)), 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"}`);
|
|
3659
3661
|
const pe = X.length > 0 ? `#${X.join("&")}` : "";
|
|
3660
3662
|
return `${Q}?${U.toString()}${pe}`;
|
|
3661
3663
|
});
|
|
3662
|
-
return
|
|
3664
|
+
return f.div(
|
|
3663
3665
|
Y(
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3666
|
+
y,
|
|
3667
|
+
d.on((w, b) => {
|
|
3668
|
+
b != null && b.startsWith("blob:") && URL.revokeObjectURL(b);
|
|
3667
3669
|
}),
|
|
3668
3670
|
() => {
|
|
3669
|
-
const
|
|
3670
|
-
|
|
3671
|
+
const w = d.value;
|
|
3672
|
+
w != null && w.startsWith("blob:") && URL.revokeObjectURL(w);
|
|
3671
3673
|
}
|
|
3672
3674
|
),
|
|
3673
3675
|
s.class("bc-pdfjs-preview h-full w-full"),
|
|
3674
|
-
s.class(
|
|
3675
|
-
|
|
3676
|
+
s.class(v),
|
|
3677
|
+
f.iframe(
|
|
3676
3678
|
s.class("h-full w-full"),
|
|
3677
|
-
s.allowfullscreen(
|
|
3679
|
+
s.allowfullscreen(h),
|
|
3678
3680
|
s.title("PDF Preview"),
|
|
3679
3681
|
s.loading("lazy"),
|
|
3680
|
-
s.src(
|
|
3682
|
+
s.src(y)
|
|
3681
3683
|
)
|
|
3682
3684
|
);
|
|
3683
3685
|
}
|
|
3684
|
-
const zr = ({ id: e, css: t }) => at("head",
|
|
3686
|
+
const zr = ({ id: e, css: t }) => at("head", f.style(s.id(e), s.innerHTML(t)));
|
|
3685
3687
|
function ge(e, t) {
|
|
3686
|
-
return t == null ? null :
|
|
3688
|
+
return t == null ? null : f.meta(
|
|
3687
3689
|
s.name(e),
|
|
3688
|
-
s.content(
|
|
3690
|
+
s.content(m.map(t, (n) => String(n)))
|
|
3689
3691
|
);
|
|
3690
3692
|
}
|
|
3691
3693
|
function q(e, t) {
|
|
3692
|
-
return t == null ? null :
|
|
3694
|
+
return t == null ? null : f.meta(
|
|
3693
3695
|
s.property(e),
|
|
3694
|
-
s.content(
|
|
3696
|
+
s.content(m.map(t, (n) => String(n)))
|
|
3695
3697
|
);
|
|
3696
3698
|
}
|
|
3697
3699
|
function He(e, t) {
|
|
@@ -3699,7 +3701,7 @@ function He(e, t) {
|
|
|
3699
3701
|
}
|
|
3700
3702
|
function ha(e, t) {
|
|
3701
3703
|
return t == null ? null : J(
|
|
3702
|
-
|
|
3704
|
+
m.map(t, (n) => Array.isArray(n)),
|
|
3703
3705
|
() => He(e, t),
|
|
3704
3706
|
() => q(e, t)
|
|
3705
3707
|
);
|
|
@@ -3732,7 +3734,7 @@ const Wr = (e) => {
|
|
|
3732
3734
|
"twitter:image:alt",
|
|
3733
3735
|
Te(e.twitterImageAlt, e.imageAlt)
|
|
3734
3736
|
)
|
|
3735
|
-
), e.canonical != null &&
|
|
3737
|
+
), e.canonical != null && m.get(e.canonical) != null && t.push(f.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());
|
|
3736
3738
|
}, it = ({
|
|
3737
3739
|
viewTransition: e,
|
|
3738
3740
|
state: t,
|
|
@@ -3781,23 +3783,23 @@ function va({
|
|
|
3781
3783
|
scroll: u,
|
|
3782
3784
|
replace: c,
|
|
3783
3785
|
target: o,
|
|
3784
|
-
rel:
|
|
3785
|
-
}, ...
|
|
3786
|
+
rel: p
|
|
3787
|
+
}, ...g) {
|
|
3786
3788
|
return J(
|
|
3787
3789
|
r,
|
|
3788
|
-
() =>
|
|
3790
|
+
() => f.span(
|
|
3789
3791
|
s.class(
|
|
3790
|
-
|
|
3792
|
+
S(
|
|
3791
3793
|
t,
|
|
3792
3794
|
r
|
|
3793
|
-
)((x,
|
|
3795
|
+
)((x, h) => It(x, h))
|
|
3794
3796
|
),
|
|
3795
3797
|
s.style(
|
|
3796
|
-
|
|
3798
|
+
S(a)(
|
|
3797
3799
|
(x) => $t(x ?? "base")
|
|
3798
3800
|
)
|
|
3799
3801
|
),
|
|
3800
|
-
...
|
|
3802
|
+
...g
|
|
3801
3803
|
),
|
|
3802
3804
|
() => rt(
|
|
3803
3805
|
{
|
|
@@ -3810,17 +3812,17 @@ function va({
|
|
|
3810
3812
|
})
|
|
3811
3813
|
},
|
|
3812
3814
|
s.class(
|
|
3813
|
-
|
|
3815
|
+
S(
|
|
3814
3816
|
t,
|
|
3815
3817
|
r
|
|
3816
|
-
)((x,
|
|
3818
|
+
)((x, h) => It(x, h))
|
|
3817
3819
|
),
|
|
3818
3820
|
s.style(
|
|
3819
|
-
|
|
3821
|
+
S(n)((x) => $t(x ?? "primary"))
|
|
3820
3822
|
),
|
|
3821
3823
|
o ? s.target(o) : null,
|
|
3822
|
-
|
|
3823
|
-
...
|
|
3824
|
+
p ? s.rel(p) : null,
|
|
3825
|
+
...g
|
|
3824
3826
|
)
|
|
3825
3827
|
);
|
|
3826
3828
|
}
|
|
@@ -3846,10 +3848,10 @@ function xa(e, t, n) {
|
|
|
3846
3848
|
return !1;
|
|
3847
3849
|
const o = Array.from(
|
|
3848
3850
|
new URLSearchParams(c.search).entries()
|
|
3849
|
-
).sort(),
|
|
3850
|
-
return o.length !==
|
|
3851
|
-
const [
|
|
3852
|
-
return
|
|
3851
|
+
).sort(), p = Array.from(a.entries()).sort();
|
|
3852
|
+
return o.length !== p.length ? !1 : o.every(([g, x], h) => {
|
|
3853
|
+
const [v, d] = p[h];
|
|
3854
|
+
return g === v && x === d;
|
|
3853
3855
|
});
|
|
3854
3856
|
} catch {
|
|
3855
3857
|
return e.pathname === t;
|
|
@@ -3859,7 +3861,7 @@ function xa(e, t, n) {
|
|
|
3859
3861
|
}
|
|
3860
3862
|
}
|
|
3861
3863
|
function ct(e, t) {
|
|
3862
|
-
return t === "exact" ?
|
|
3864
|
+
return t === "exact" ? S(e)((n) => n) : S(e)(
|
|
3863
3865
|
(n) => (a) => xa(a, n, t)
|
|
3864
3866
|
);
|
|
3865
3867
|
}
|
|
@@ -3872,7 +3874,7 @@ function Yr({
|
|
|
3872
3874
|
return ne(Ve, (l) => {
|
|
3873
3875
|
const i = l.matchSignal(
|
|
3874
3876
|
ct(e, t)
|
|
3875
|
-
), u =
|
|
3877
|
+
), u = S(
|
|
3876
3878
|
i,
|
|
3877
3879
|
n
|
|
3878
3880
|
)((c, o) => o ?? !0 ? c : !1);
|
|
@@ -3897,19 +3899,19 @@ function qr({
|
|
|
3897
3899
|
matchMode: u,
|
|
3898
3900
|
disableWhenActive: c,
|
|
3899
3901
|
variant: o = "filled",
|
|
3900
|
-
size:
|
|
3901
|
-
color:
|
|
3902
|
+
size: p = "md",
|
|
3903
|
+
color: g = "base",
|
|
3902
3904
|
roundedness: x = "sm",
|
|
3903
|
-
disabled:
|
|
3904
|
-
}, ...
|
|
3905
|
-
return u !== void 0 || c !== void 0 ? ne(Ve, (
|
|
3906
|
-
const
|
|
3907
|
-
|
|
3905
|
+
disabled: h = !1
|
|
3906
|
+
}, ...v) {
|
|
3907
|
+
return u !== void 0 || c !== void 0 ? ne(Ve, (d) => {
|
|
3908
|
+
const y = u !== void 0 ? d.matchSignal(ct(e, u)) : S(d.location)(() => !1), w = S(
|
|
3909
|
+
y,
|
|
3908
3910
|
c
|
|
3909
|
-
)((
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
)((
|
|
3911
|
+
)((C, _) => !(_ ?? !0) || !u ? !1 : C), b = S(
|
|
3912
|
+
h,
|
|
3913
|
+
w
|
|
3914
|
+
)((C, _) => C || _);
|
|
3913
3915
|
return Tt(
|
|
3914
3916
|
{
|
|
3915
3917
|
href: e,
|
|
@@ -3920,12 +3922,12 @@ function qr({
|
|
|
3920
3922
|
target: l,
|
|
3921
3923
|
rel: i,
|
|
3922
3924
|
variant: o,
|
|
3923
|
-
size:
|
|
3924
|
-
color:
|
|
3925
|
+
size: p,
|
|
3926
|
+
color: g,
|
|
3925
3927
|
roundedness: x,
|
|
3926
|
-
disabled:
|
|
3928
|
+
disabled: b
|
|
3927
3929
|
},
|
|
3928
|
-
...
|
|
3930
|
+
...v
|
|
3929
3931
|
);
|
|
3930
3932
|
}) : Tt(
|
|
3931
3933
|
{
|
|
@@ -3937,12 +3939,12 @@ function qr({
|
|
|
3937
3939
|
target: l,
|
|
3938
3940
|
rel: i,
|
|
3939
3941
|
variant: o,
|
|
3940
|
-
size:
|
|
3941
|
-
color:
|
|
3942
|
+
size: p,
|
|
3943
|
+
color: g,
|
|
3942
3944
|
roundedness: x,
|
|
3943
|
-
disabled:
|
|
3945
|
+
disabled: h
|
|
3944
3946
|
},
|
|
3945
|
-
...
|
|
3947
|
+
...v
|
|
3946
3948
|
);
|
|
3947
3949
|
}
|
|
3948
3950
|
function Tt({
|
|
@@ -3956,36 +3958,36 @@ function Tt({
|
|
|
3956
3958
|
variant: u = "default",
|
|
3957
3959
|
size: c = "md",
|
|
3958
3960
|
color: o = "base",
|
|
3959
|
-
roundedness:
|
|
3960
|
-
disabled:
|
|
3961
|
+
roundedness: p = "sm",
|
|
3962
|
+
disabled: g = !1,
|
|
3961
3963
|
fullWidth: x = !1,
|
|
3962
|
-
loading:
|
|
3963
|
-
}, ...
|
|
3964
|
+
loading: h = !1
|
|
3965
|
+
}, ...v) {
|
|
3964
3966
|
return J(
|
|
3965
|
-
|
|
3966
|
-
() =>
|
|
3967
|
+
g ?? !1,
|
|
3968
|
+
() => f.span(
|
|
3967
3969
|
s.class(
|
|
3968
|
-
|
|
3970
|
+
S(
|
|
3969
3971
|
c,
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
+
p,
|
|
3973
|
+
h,
|
|
3972
3974
|
x
|
|
3973
3975
|
)(bt)
|
|
3974
3976
|
),
|
|
3975
3977
|
s.style(
|
|
3976
|
-
|
|
3978
|
+
S(
|
|
3977
3979
|
u,
|
|
3978
3980
|
o,
|
|
3979
|
-
|
|
3981
|
+
g
|
|
3980
3982
|
)(
|
|
3981
|
-
(
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3983
|
+
(d, y, w) => gt(
|
|
3984
|
+
d ?? "filled",
|
|
3985
|
+
y ?? "base",
|
|
3986
|
+
w
|
|
3985
3987
|
)
|
|
3986
3988
|
)
|
|
3987
3989
|
),
|
|
3988
|
-
...
|
|
3990
|
+
...v
|
|
3989
3991
|
),
|
|
3990
3992
|
() => rt(
|
|
3991
3993
|
{
|
|
@@ -3998,29 +4000,29 @@ function Tt({
|
|
|
3998
4000
|
})
|
|
3999
4001
|
},
|
|
4000
4002
|
s.class(
|
|
4001
|
-
|
|
4003
|
+
S(
|
|
4002
4004
|
c,
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
+
p,
|
|
4006
|
+
h,
|
|
4005
4007
|
x
|
|
4006
4008
|
)(bt)
|
|
4007
4009
|
),
|
|
4008
4010
|
s.style(
|
|
4009
|
-
|
|
4011
|
+
S(
|
|
4010
4012
|
u,
|
|
4011
4013
|
o,
|
|
4012
|
-
|
|
4014
|
+
g
|
|
4013
4015
|
)(
|
|
4014
|
-
(
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4016
|
+
(d, y, w) => gt(
|
|
4017
|
+
d ?? "filled",
|
|
4018
|
+
y ?? "base",
|
|
4019
|
+
w
|
|
4018
4020
|
)
|
|
4019
4021
|
)
|
|
4020
4022
|
),
|
|
4021
4023
|
l ? s.target(l) : null,
|
|
4022
4024
|
i ? s.rel(i) : null,
|
|
4023
|
-
...
|
|
4025
|
+
...v
|
|
4024
4026
|
)
|
|
4025
4027
|
);
|
|
4026
4028
|
}
|
|
@@ -4037,16 +4039,16 @@ const ka = {
|
|
|
4037
4039
|
function Zr({ backgroundMode: e = "light" }, ...t) {
|
|
4038
4040
|
return Lt(
|
|
4039
4041
|
ka,
|
|
4040
|
-
|
|
4042
|
+
m.map(
|
|
4041
4043
|
e,
|
|
4042
4044
|
(n) => ({
|
|
4043
4045
|
backgroundMode: n
|
|
4044
4046
|
})
|
|
4045
4047
|
),
|
|
4046
|
-
() =>
|
|
4048
|
+
() => f.div(
|
|
4047
4049
|
s.class("bc-sidebar"),
|
|
4048
4050
|
s.class(
|
|
4049
|
-
|
|
4051
|
+
m.map(
|
|
4050
4052
|
e,
|
|
4051
4053
|
(n) => n === "dark" ? "bc-sidebar--dark-bg" : ""
|
|
4052
4054
|
)
|
|
@@ -4057,10 +4059,10 @@ function Zr({ backgroundMode: e = "light" }, ...t) {
|
|
|
4057
4059
|
}
|
|
4058
4060
|
function _t({ rail: e, header: t }, ...n) {
|
|
4059
4061
|
return ot(
|
|
4060
|
-
t != null ?
|
|
4061
|
-
|
|
4062
|
+
t != null ? f.div(s.class("bc-sidebar-group__header"), t) : null,
|
|
4063
|
+
f.div(
|
|
4062
4064
|
s.class(
|
|
4063
|
-
|
|
4065
|
+
m.map(
|
|
4064
4066
|
e ?? !1,
|
|
4065
4067
|
(a) => a ? "bc-sidebar-group--rail" : ""
|
|
4066
4068
|
)
|
|
@@ -4080,14 +4082,14 @@ function Ca(e, ...t) {
|
|
|
4080
4082
|
return rt({ href: e.href, ...n }, ...t);
|
|
4081
4083
|
}
|
|
4082
4084
|
function Sa(...e) {
|
|
4083
|
-
return
|
|
4085
|
+
return f.span(...e);
|
|
4084
4086
|
}
|
|
4085
4087
|
function Ia(e, ...t) {
|
|
4086
|
-
return
|
|
4088
|
+
return f.button(
|
|
4087
4089
|
s.type("button"),
|
|
4088
4090
|
$.click(e.onClick),
|
|
4089
4091
|
e.ariaExpanded != null ? B.expanded(
|
|
4090
|
-
|
|
4092
|
+
m.map(
|
|
4091
4093
|
e.ariaExpanded,
|
|
4092
4094
|
(n) => n
|
|
4093
4095
|
)
|
|
@@ -4100,16 +4102,16 @@ function Ia(e, ...t) {
|
|
|
4100
4102
|
function $a(e) {
|
|
4101
4103
|
const t = [s.class("bc-sidebar-link")];
|
|
4102
4104
|
return e.icon != null && t.push(
|
|
4103
|
-
|
|
4105
|
+
f.span(
|
|
4104
4106
|
s.class("bc-sidebar-link--icon"),
|
|
4105
4107
|
ee({ icon: e.icon })
|
|
4106
4108
|
)
|
|
4107
4109
|
), t.push(
|
|
4108
|
-
|
|
4110
|
+
f.span(s.class("bc-sidebar-link__content"), e.content)
|
|
4109
4111
|
), e.right != null && t.push(
|
|
4110
|
-
|
|
4112
|
+
f.span(s.class("bc-sidebar-link__right"), e.right)
|
|
4111
4113
|
), e.action != null && t.push(
|
|
4112
|
-
|
|
4114
|
+
f.button(
|
|
4113
4115
|
s.type("button"),
|
|
4114
4116
|
s.class("bc-sidebar-link--action"),
|
|
4115
4117
|
$.click((n, a) => {
|
|
@@ -4138,7 +4140,7 @@ function Gr({
|
|
|
4138
4140
|
header: n,
|
|
4139
4141
|
startOpen: a = !0
|
|
4140
4142
|
}, ...r) {
|
|
4141
|
-
const l =
|
|
4143
|
+
const l = m.deriveProp(a), i = he("sidebar-group"), u = `${i}-content`;
|
|
4142
4144
|
return _t(
|
|
4143
4145
|
{},
|
|
4144
4146
|
s.class("bc-sidebar-group-collapsible"),
|
|
@@ -4156,7 +4158,7 @@ function Gr({
|
|
|
4156
4158
|
// Add ARIA attributes for the toggle button
|
|
4157
4159
|
ariaExpanded: l,
|
|
4158
4160
|
ariaControls: u,
|
|
4159
|
-
right:
|
|
4161
|
+
right: f.span(
|
|
4160
4162
|
s.class("bc-sidebar-group-collapsible-indicator"),
|
|
4161
4163
|
ee({ icon: "lucide:chevron-down", color: "base" })
|
|
4162
4164
|
),
|
|
@@ -4166,7 +4168,7 @@ function Gr({
|
|
|
4166
4168
|
);
|
|
4167
4169
|
}
|
|
4168
4170
|
function Kr() {
|
|
4169
|
-
return
|
|
4171
|
+
return f.hr(s.class("bc-sidebar-separator"));
|
|
4170
4172
|
}
|
|
4171
4173
|
function Ta(e, t, n, a) {
|
|
4172
4174
|
const r = ["bc-tabs", `bc-tabs--${e}`, `bc-tabs--${t}`];
|
|
@@ -4194,7 +4196,7 @@ function Ue(e, t, n) {
|
|
|
4194
4196
|
let l = 0;
|
|
4195
4197
|
for (; l < a; ) {
|
|
4196
4198
|
const i = t[r];
|
|
4197
|
-
if (!
|
|
4199
|
+
if (!m.get(i.disabled ?? !1))
|
|
4198
4200
|
return r;
|
|
4199
4201
|
r += n, r >= a ? r = 0 : r < 0 && (r = a - 1), l++;
|
|
4200
4202
|
}
|
|
@@ -4211,87 +4213,87 @@ function Qr(e) {
|
|
|
4211
4213
|
disabled: u = !1,
|
|
4212
4214
|
orientation: c = "horizontal",
|
|
4213
4215
|
showContent: o = !0,
|
|
4214
|
-
ariaLabel:
|
|
4215
|
-
} = e,
|
|
4216
|
-
if (
|
|
4217
|
-
const
|
|
4218
|
-
let
|
|
4219
|
-
switch (
|
|
4220
|
-
case (
|
|
4221
|
-
|
|
4216
|
+
ariaLabel: p
|
|
4217
|
+
} = e, g = he("tablist"), x = G(-1), h = S(n)((d) => t.find((y) => y.key === d)), v = (d) => {
|
|
4218
|
+
if (m.get(u)) return;
|
|
4219
|
+
const w = x.value, b = m.get(c) === "horizontal";
|
|
4220
|
+
let C = w;
|
|
4221
|
+
switch (d.key) {
|
|
4222
|
+
case (b ? "ArrowRight" : "ArrowDown"):
|
|
4223
|
+
d.preventDefault(), C = Ue(w, t, 1);
|
|
4222
4224
|
break;
|
|
4223
|
-
case (
|
|
4224
|
-
|
|
4225
|
+
case (b ? "ArrowLeft" : "ArrowUp"):
|
|
4226
|
+
d.preventDefault(), C = Ue(w, t, -1);
|
|
4225
4227
|
break;
|
|
4226
4228
|
case "Home":
|
|
4227
|
-
|
|
4229
|
+
d.preventDefault(), C = Ue(-1, t, 1);
|
|
4228
4230
|
break;
|
|
4229
4231
|
case "End":
|
|
4230
|
-
|
|
4232
|
+
d.preventDefault(), C = Ue(t.length, t, -1);
|
|
4231
4233
|
break;
|
|
4232
4234
|
case "Enter":
|
|
4233
4235
|
case " ":
|
|
4234
|
-
if (
|
|
4235
|
-
const _ = t[
|
|
4236
|
-
|
|
4236
|
+
if (d.preventDefault(), w >= 0 && w < t.length) {
|
|
4237
|
+
const _ = t[w];
|
|
4238
|
+
m.get(_.disabled ?? !1) || a?.(_.key);
|
|
4237
4239
|
}
|
|
4238
4240
|
break;
|
|
4239
4241
|
}
|
|
4240
|
-
|
|
4242
|
+
C !== w && C >= 0 && C < t.length && (x.set(C), setTimeout(() => {
|
|
4241
4243
|
const _ = document.querySelector(
|
|
4242
|
-
`[data-tab-index="${
|
|
4244
|
+
`[data-tab-index="${C}"]`
|
|
4243
4245
|
);
|
|
4244
4246
|
_ && _.focus();
|
|
4245
4247
|
}, 0));
|
|
4246
4248
|
};
|
|
4247
|
-
return
|
|
4248
|
-
Y(
|
|
4249
|
+
return f.div(
|
|
4250
|
+
Y(h, x),
|
|
4249
4251
|
s.class(
|
|
4250
|
-
|
|
4252
|
+
S(
|
|
4251
4253
|
r,
|
|
4252
4254
|
c,
|
|
4253
4255
|
u,
|
|
4254
4256
|
l
|
|
4255
4257
|
)(
|
|
4256
|
-
(
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4258
|
+
(d, y, w, b) => Ta(
|
|
4259
|
+
d ?? "md",
|
|
4260
|
+
y ?? "horizontal",
|
|
4261
|
+
w ?? !1,
|
|
4262
|
+
b ?? "default"
|
|
4261
4263
|
)
|
|
4262
4264
|
)
|
|
4263
4265
|
),
|
|
4264
4266
|
s.style(
|
|
4265
|
-
|
|
4267
|
+
S(
|
|
4266
4268
|
l,
|
|
4267
4269
|
i
|
|
4268
4270
|
)(
|
|
4269
|
-
(
|
|
4271
|
+
(d, y) => _a(d ?? "default", y ?? "primary")
|
|
4270
4272
|
)
|
|
4271
4273
|
),
|
|
4272
4274
|
// Tab list
|
|
4273
|
-
|
|
4275
|
+
f.div(
|
|
4274
4276
|
s.class("bc-tabs__list"),
|
|
4275
4277
|
s.role("tablist"),
|
|
4276
|
-
s.id(
|
|
4278
|
+
s.id(g),
|
|
4277
4279
|
B.orientation(
|
|
4278
4280
|
c ?? "horizontal"
|
|
4279
4281
|
),
|
|
4280
|
-
|
|
4281
|
-
$.keydown(
|
|
4282
|
-
...t.map((
|
|
4283
|
-
const
|
|
4282
|
+
p ? B.label(p) : E(),
|
|
4283
|
+
$.keydown(v),
|
|
4284
|
+
...t.map((d, y) => {
|
|
4285
|
+
const w = S(n)((L) => L === d.key), b = S(
|
|
4284
4286
|
u,
|
|
4285
|
-
|
|
4286
|
-
)((L, V) => L || V),
|
|
4287
|
-
return
|
|
4288
|
-
Y(
|
|
4287
|
+
d.disabled
|
|
4288
|
+
)((L, V) => L || V), C = `${g}-tab-${d.key}`, _ = `${g}-panel-${d.key}`;
|
|
4289
|
+
return f.button(
|
|
4290
|
+
Y(w, b),
|
|
4289
4291
|
s.type("button"),
|
|
4290
4292
|
s.class(
|
|
4291
|
-
|
|
4293
|
+
S(
|
|
4292
4294
|
r,
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
+
w,
|
|
4296
|
+
b
|
|
4295
4297
|
)(
|
|
4296
4298
|
(L, V, P) => Da(
|
|
4297
4299
|
L ?? "md",
|
|
@@ -4300,45 +4302,45 @@ function Qr(e) {
|
|
|
4300
4302
|
)
|
|
4301
4303
|
)
|
|
4302
4304
|
),
|
|
4303
|
-
s.id(
|
|
4305
|
+
s.id(C),
|
|
4304
4306
|
s.role("tab"),
|
|
4305
4307
|
s.tabindex(
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
+
S(
|
|
4309
|
+
w,
|
|
4308
4310
|
x
|
|
4309
|
-
)((L, V) => L || V ===
|
|
4311
|
+
)((L, V) => L || V === y ? 0 : -1)
|
|
4310
4312
|
),
|
|
4311
|
-
B.selected(
|
|
4313
|
+
B.selected(w),
|
|
4312
4314
|
B.controls(_),
|
|
4313
|
-
B.disabled(
|
|
4314
|
-
s.disabled(
|
|
4315
|
-
nt["tab-index"](String(
|
|
4316
|
-
|
|
4315
|
+
B.disabled(b),
|
|
4316
|
+
s.disabled(b),
|
|
4317
|
+
nt["tab-index"](String(y)),
|
|
4318
|
+
d.ariaLabel ? B.label(d.ariaLabel) : E(),
|
|
4317
4319
|
$.click((L) => {
|
|
4318
|
-
L.preventDefault(),
|
|
4320
|
+
L.preventDefault(), m.get(d.disabled ?? !1) || m.get(u) || (a?.(d.key), x.set(y));
|
|
4319
4321
|
}),
|
|
4320
4322
|
$.focus(() => {
|
|
4321
|
-
x.set(
|
|
4323
|
+
x.set(y);
|
|
4322
4324
|
}),
|
|
4323
|
-
|
|
4325
|
+
d.label
|
|
4324
4326
|
);
|
|
4325
4327
|
})
|
|
4326
4328
|
),
|
|
4327
4329
|
// Panel
|
|
4328
4330
|
J(
|
|
4329
4331
|
o ?? !0,
|
|
4330
|
-
() => Ye(
|
|
4331
|
-
const
|
|
4332
|
-
return
|
|
4333
|
-
Y(
|
|
4332
|
+
() => Ye(h, (d) => {
|
|
4333
|
+
const y = d.$.key, w = y.map((C) => `${g}-tab-${C}`), b = y.map((C) => `${g}-panel-${C}`);
|
|
4334
|
+
return f.div(
|
|
4335
|
+
Y(y),
|
|
4334
4336
|
s.class("bc-tabs__panels"),
|
|
4335
|
-
|
|
4337
|
+
f.div(
|
|
4336
4338
|
s.class("bc-tabs__panel"),
|
|
4337
|
-
s.id(
|
|
4339
|
+
s.id(b),
|
|
4338
4340
|
s.role("tabpanel"),
|
|
4339
4341
|
s.tabindex(0),
|
|
4340
|
-
B.labelledby(
|
|
4341
|
-
At(
|
|
4342
|
+
B.labelledby(w),
|
|
4343
|
+
At(d, (C) => C.content())
|
|
4342
4344
|
)
|
|
4343
4345
|
);
|
|
4344
4346
|
})
|
|
@@ -4353,23 +4355,23 @@ function Xr(e) {
|
|
|
4353
4355
|
const {
|
|
4354
4356
|
size: c = "md",
|
|
4355
4357
|
side: o = "right",
|
|
4356
|
-
dismissable:
|
|
4357
|
-
showCloseButton:
|
|
4358
|
+
dismissable: p = !0,
|
|
4359
|
+
showCloseButton: g = !0,
|
|
4358
4360
|
onClose: x,
|
|
4359
|
-
overlayEffect:
|
|
4360
|
-
container:
|
|
4361
|
-
header:
|
|
4362
|
-
body:
|
|
4363
|
-
footer:
|
|
4361
|
+
overlayEffect: h = "opaque",
|
|
4362
|
+
container: v = "body",
|
|
4363
|
+
header: d,
|
|
4364
|
+
body: y,
|
|
4365
|
+
footer: w
|
|
4364
4366
|
} = u;
|
|
4365
4367
|
a = n;
|
|
4366
|
-
const
|
|
4367
|
-
|
|
4368
|
-
|
|
4368
|
+
const b = G("capturing");
|
|
4369
|
+
m.on(p, (L) => {
|
|
4370
|
+
b.set(L ? "capturing" : "non-capturing");
|
|
4369
4371
|
});
|
|
4370
|
-
const
|
|
4371
|
-
|
|
4372
|
-
|
|
4372
|
+
const C = S(
|
|
4373
|
+
d != null,
|
|
4374
|
+
g
|
|
4373
4375
|
)((L, V) => L || V), _ = ae((L) => {
|
|
4374
4376
|
const V = Me({
|
|
4375
4377
|
initialStatus: "closed",
|
|
@@ -4380,16 +4382,16 @@ function Xr(e) {
|
|
|
4380
4382
|
}), a = () => {
|
|
4381
4383
|
V.close();
|
|
4382
4384
|
}, We(() => V.open());
|
|
4383
|
-
const I = he("drawer"), M =
|
|
4384
|
-
return
|
|
4385
|
+
const I = he("drawer"), M = d != null ? `${I}-header` : void 0, F = `${I}-body`;
|
|
4386
|
+
return f.div(
|
|
4385
4387
|
Y(V),
|
|
4386
4388
|
s.class(
|
|
4387
|
-
|
|
4389
|
+
S(
|
|
4388
4390
|
c,
|
|
4389
4391
|
o,
|
|
4390
4392
|
V.status
|
|
4391
4393
|
)(
|
|
4392
|
-
(O, H, oe) => `bc-drawer bc-drawer--size-${O} bc-drawer--container-${
|
|
4394
|
+
(O, H, oe) => `bc-drawer bc-drawer--size-${O} bc-drawer--container-${v} bc-drawer--side-${H} bc-drawer--status-${oe}`
|
|
4393
4395
|
)
|
|
4394
4396
|
),
|
|
4395
4397
|
// Essential ARIA attributes for drawer dialog
|
|
@@ -4414,12 +4416,12 @@ function Xr(e) {
|
|
|
4414
4416
|
$.mousedown((O) => O.stopPropagation()),
|
|
4415
4417
|
// Prevent overlay click-outside when clicking drawer content
|
|
4416
4418
|
// Drawer content container
|
|
4417
|
-
At(
|
|
4418
|
-
header:
|
|
4419
|
+
At(C, (O) => kt(O ? {
|
|
4420
|
+
header: f.div(
|
|
4419
4421
|
s.class("bc-drawer__header"),
|
|
4420
|
-
|
|
4422
|
+
f.div(s.id(M), d),
|
|
4421
4423
|
J(
|
|
4422
|
-
|
|
4424
|
+
g,
|
|
4423
4425
|
() => ne(
|
|
4424
4426
|
fe,
|
|
4425
4427
|
(H) => qe({
|
|
@@ -4430,27 +4432,27 @@ function Xr(e) {
|
|
|
4430
4432
|
)
|
|
4431
4433
|
)
|
|
4432
4434
|
),
|
|
4433
|
-
body:
|
|
4435
|
+
body: f.div(
|
|
4434
4436
|
s.class("bc-drawer__body"),
|
|
4435
4437
|
s.id(F),
|
|
4436
|
-
|
|
4438
|
+
y
|
|
4437
4439
|
),
|
|
4438
|
-
footer:
|
|
4440
|
+
footer: w && f.div(s.class("bc-drawer__footer"), w)
|
|
4439
4441
|
} : {
|
|
4440
|
-
body:
|
|
4442
|
+
body: f.div(
|
|
4441
4443
|
s.class("bc-drawer__body"),
|
|
4442
4444
|
s.id(F),
|
|
4443
|
-
|
|
4445
|
+
y
|
|
4444
4446
|
),
|
|
4445
|
-
footer:
|
|
4447
|
+
footer: w && f.div(s.class("bc-drawer__footer"), w)
|
|
4446
4448
|
}))
|
|
4447
4449
|
);
|
|
4448
4450
|
});
|
|
4449
4451
|
t({
|
|
4450
|
-
mode:
|
|
4451
|
-
effect:
|
|
4452
|
-
container:
|
|
4453
|
-
content: E(Y(
|
|
4452
|
+
mode: b,
|
|
4453
|
+
effect: h ?? "opaque",
|
|
4454
|
+
container: v,
|
|
4455
|
+
content: E(Y(b, C), _),
|
|
4454
4456
|
onClickOutside: () => {
|
|
4455
4457
|
x?.(), r();
|
|
4456
4458
|
},
|
|
@@ -4505,18 +4507,18 @@ function Jr(e) {
|
|
|
4505
4507
|
// Override the default dialog role for tooltips
|
|
4506
4508
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4507
4509
|
arrow: (o) => {
|
|
4508
|
-
const
|
|
4510
|
+
const p = o.map(
|
|
4509
4511
|
({
|
|
4510
|
-
placement:
|
|
4511
|
-
}) =>
|
|
4512
|
+
placement: g
|
|
4513
|
+
}) => g.includes("top") ? "down" : g.includes("bottom") ? "up" : g.includes("left") ? "right" : g.includes("right") ? "left" : "up"
|
|
4512
4514
|
);
|
|
4513
4515
|
return E(
|
|
4514
4516
|
s.class("bc-tooltip__arrow"),
|
|
4515
|
-
s.class(
|
|
4517
|
+
s.class(p.map((g) => `bc-tooltip__arrow-${g}`)),
|
|
4516
4518
|
k.transform(
|
|
4517
|
-
o.map(({ x:
|
|
4519
|
+
o.map(({ x: g, y: x }) => g == null && x == null ? "" : g != null ? `translate(${g}px, 0)` : `translate(0, ${x}px)`)
|
|
4518
4520
|
),
|
|
4519
|
-
Pa(
|
|
4521
|
+
Pa(p)
|
|
4520
4522
|
);
|
|
4521
4523
|
}
|
|
4522
4524
|
})
|
|
@@ -4548,11 +4550,11 @@ function es({
|
|
|
4548
4550
|
angle: l = 45,
|
|
4549
4551
|
corner: i = "top-end"
|
|
4550
4552
|
}, ...u) {
|
|
4551
|
-
return
|
|
4553
|
+
return f.div(
|
|
4552
4554
|
s.class("bc-ribbon"),
|
|
4553
4555
|
// Theme styles via CSS variables
|
|
4554
4556
|
s.style(
|
|
4555
|
-
|
|
4557
|
+
S(
|
|
4556
4558
|
e,
|
|
4557
4559
|
n,
|
|
4558
4560
|
a,
|
|
@@ -4579,25 +4581,25 @@ function ts(e, t) {
|
|
|
4579
4581
|
};
|
|
4580
4582
|
return t((x) => {
|
|
4581
4583
|
o = c;
|
|
4582
|
-
const
|
|
4584
|
+
const h = G(
|
|
4583
4585
|
typeof n != "boolean" || n ? "capturing" : "non-capturing"
|
|
4584
4586
|
);
|
|
4585
|
-
let
|
|
4586
|
-
|
|
4587
|
-
|
|
4587
|
+
let v = typeof n == "boolean" ? n : !0;
|
|
4588
|
+
m.on(n, (y) => {
|
|
4589
|
+
v = y, h.set(y ? "capturing" : "non-capturing");
|
|
4588
4590
|
});
|
|
4589
|
-
const
|
|
4591
|
+
const d = f.div(
|
|
4590
4592
|
s.class("bc-lightbox"),
|
|
4591
4593
|
// Close button (top-end)
|
|
4592
4594
|
J(
|
|
4593
4595
|
a,
|
|
4594
4596
|
() => ne(
|
|
4595
4597
|
fe,
|
|
4596
|
-
(
|
|
4598
|
+
(y) => f.div(
|
|
4597
4599
|
s.class("bc-lightbox__close"),
|
|
4598
4600
|
qe({
|
|
4599
4601
|
size: "md",
|
|
4600
|
-
label:
|
|
4602
|
+
label: y.$.closeModal,
|
|
4601
4603
|
onClick: () => {
|
|
4602
4604
|
o(), c();
|
|
4603
4605
|
}
|
|
@@ -4607,28 +4609,28 @@ function ts(e, t) {
|
|
|
4607
4609
|
() => null
|
|
4608
4610
|
),
|
|
4609
4611
|
// Viewport (centering + padding)
|
|
4610
|
-
|
|
4612
|
+
f.div(
|
|
4611
4613
|
s.class("bc-lightbox__viewport"),
|
|
4612
4614
|
// Visual padding applied here
|
|
4613
4615
|
s.style(
|
|
4614
|
-
|
|
4615
|
-
(
|
|
4616
|
+
S(i)(
|
|
4617
|
+
(y) => `padding:${typeof y == "number" ? y + "px" : y}`
|
|
4616
4618
|
)
|
|
4617
4619
|
),
|
|
4618
4620
|
// Content wrapper capped by viewport; overflow is clipped
|
|
4619
|
-
|
|
4621
|
+
f.div(s.class("bc-lightbox__content"), x)
|
|
4620
4622
|
)
|
|
4621
4623
|
);
|
|
4622
4624
|
u({
|
|
4623
|
-
mode:
|
|
4625
|
+
mode: h,
|
|
4624
4626
|
effect: r ?? "opaque",
|
|
4625
4627
|
container: l,
|
|
4626
|
-
content: E(Y(
|
|
4628
|
+
content: E(Y(h), d),
|
|
4627
4629
|
onClickOutside: () => {
|
|
4628
|
-
|
|
4630
|
+
v && (o(), c());
|
|
4629
4631
|
},
|
|
4630
4632
|
onEscape: () => {
|
|
4631
|
-
|
|
4633
|
+
v && (o(), c());
|
|
4632
4634
|
}
|
|
4633
4635
|
});
|
|
4634
4636
|
}, () => {
|
|
@@ -4661,16 +4663,16 @@ function ns(e) {
|
|
|
4661
4663
|
playbackRate: u = 1,
|
|
4662
4664
|
pip: c = !1,
|
|
4663
4665
|
playsinline: o = !0,
|
|
4664
|
-
width:
|
|
4665
|
-
height:
|
|
4666
|
+
width: p,
|
|
4667
|
+
height: g,
|
|
4666
4668
|
progressInterval: x = 1e3,
|
|
4667
|
-
seekTo:
|
|
4668
|
-
config:
|
|
4669
|
-
onReady:
|
|
4670
|
-
onStart:
|
|
4671
|
-
onPlay:
|
|
4672
|
-
onPause:
|
|
4673
|
-
onBuffer:
|
|
4669
|
+
seekTo: h,
|
|
4670
|
+
config: v,
|
|
4671
|
+
onReady: d,
|
|
4672
|
+
onStart: y,
|
|
4673
|
+
onPlay: w,
|
|
4674
|
+
onPause: b,
|
|
4675
|
+
onBuffer: C,
|
|
4674
4676
|
onBufferEnd: _,
|
|
4675
4677
|
onEnded: L,
|
|
4676
4678
|
onError: V,
|
|
@@ -4702,17 +4704,17 @@ function ns(e) {
|
|
|
4702
4704
|
}
|
|
4703
4705
|
const ue = [];
|
|
4704
4706
|
ue.push(
|
|
4705
|
-
|
|
4707
|
+
m.on(t, (T) => {
|
|
4706
4708
|
typeof T == "string" && T.length > 0 && Aa(T) ? Q.value = "youtube" : (Q.value = "file", U && Oe());
|
|
4707
4709
|
})
|
|
4708
4710
|
);
|
|
4709
4711
|
async function Oe() {
|
|
4710
4712
|
const T = U;
|
|
4711
4713
|
if (!T) return;
|
|
4712
|
-
const A =
|
|
4714
|
+
const A = m.get(t);
|
|
4713
4715
|
if (typeof A != "string" || A.length === 0) return;
|
|
4714
4716
|
Ne();
|
|
4715
|
-
const j =
|
|
4717
|
+
const j = v?.file?.forceHLS ?? !1;
|
|
4716
4718
|
if (H(A) || j) {
|
|
4717
4719
|
if (oe(T)) {
|
|
4718
4720
|
T.setAttribute("src", A);
|
|
@@ -4736,7 +4738,7 @@ function ns(e) {
|
|
|
4736
4738
|
T.load();
|
|
4737
4739
|
} catch {
|
|
4738
4740
|
}
|
|
4739
|
-
const Ke = new De(
|
|
4741
|
+
const Ke = new De(v?.hls);
|
|
4740
4742
|
pe = Ke, Ke.attachMedia(T), Ke.loadSource(A);
|
|
4741
4743
|
} else {
|
|
4742
4744
|
T.setAttribute("src", A);
|
|
@@ -4769,7 +4771,7 @@ function ns(e) {
|
|
|
4769
4771
|
}
|
|
4770
4772
|
function Re() {
|
|
4771
4773
|
X?.();
|
|
4772
|
-
const T =
|
|
4774
|
+
const T = m.get(x) ?? 1e3;
|
|
4773
4775
|
X = vt(() => {
|
|
4774
4776
|
const A = U;
|
|
4775
4777
|
if (!A) return;
|
|
@@ -4786,17 +4788,17 @@ function ns(e) {
|
|
|
4786
4788
|
if (T != null)
|
|
4787
4789
|
return typeof T == "number" ? `${T}px` : T;
|
|
4788
4790
|
}
|
|
4789
|
-
const Ae =
|
|
4791
|
+
const Ae = f.video(
|
|
4790
4792
|
ae((T) => {
|
|
4791
|
-
U = T,
|
|
4793
|
+
U = T, d?.();
|
|
4792
4794
|
try {
|
|
4793
|
-
U.playbackRate =
|
|
4795
|
+
U.playbackRate = m.get(u) ?? 1;
|
|
4794
4796
|
} catch {
|
|
4795
4797
|
}
|
|
4796
|
-
U.muted = !!(
|
|
4797
|
-
}),
|
|
4798
|
+
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
|
+
}), y?.());
|
|
4798
4800
|
try {
|
|
4799
|
-
const A = !!(
|
|
4801
|
+
const A = !!(m.get(c) ?? !1), j = document, Z = U;
|
|
4800
4802
|
A ? typeof Z.requestPictureInPicture == "function" && j.pictureInPictureElement !== U && Z.requestPictureInPicture().catch(() => {
|
|
4801
4803
|
}) : j.pictureInPictureElement === U && typeof j.exitPictureInPicture == "function" && j.exitPictureInPicture().catch(() => {
|
|
4802
4804
|
});
|
|
@@ -4806,18 +4808,18 @@ function ns(e) {
|
|
|
4806
4808
|
}),
|
|
4807
4809
|
// size
|
|
4808
4810
|
k.width(
|
|
4809
|
-
|
|
4811
|
+
m.map(p, ke)
|
|
4810
4812
|
),
|
|
4811
4813
|
k.height(
|
|
4812
|
-
|
|
4814
|
+
m.map(g, ke)
|
|
4813
4815
|
),
|
|
4814
4816
|
// Events
|
|
4815
|
-
$.play(() =>
|
|
4817
|
+
$.play(() => w?.()),
|
|
4816
4818
|
$.playing(() => {
|
|
4817
|
-
|
|
4819
|
+
y?.(), _?.();
|
|
4818
4820
|
}),
|
|
4819
|
-
$.pause(() =>
|
|
4820
|
-
$.waiting(() =>
|
|
4821
|
+
$.pause(() => b?.()),
|
|
4822
|
+
$.waiting(() => C?.()),
|
|
4821
4823
|
$.canplay(() => {
|
|
4822
4824
|
const T = U?.duration;
|
|
4823
4825
|
T != null && Number.isFinite(T) && P?.(T);
|
|
@@ -4829,7 +4831,7 @@ function ns(e) {
|
|
|
4829
4831
|
);
|
|
4830
4832
|
let Ce = null, z = null, Se = null;
|
|
4831
4833
|
function Ie() {
|
|
4832
|
-
const T =
|
|
4834
|
+
const T = m.get(t);
|
|
4833
4835
|
!Ce || typeof T != "string" || Ba().then((A) => {
|
|
4834
4836
|
const j = rn(T);
|
|
4835
4837
|
if (j) {
|
|
@@ -4842,18 +4844,18 @@ function ns(e) {
|
|
|
4842
4844
|
playerVars: Va(e),
|
|
4843
4845
|
events: {
|
|
4844
4846
|
onReady: () => {
|
|
4845
|
-
|
|
4847
|
+
d?.(), D(), m.get(n) && y?.(), Ge();
|
|
4846
4848
|
},
|
|
4847
4849
|
onStateChange: (Z) => {
|
|
4848
4850
|
switch (Z.data) {
|
|
4849
4851
|
case A.PlayerState.PLAYING:
|
|
4850
|
-
|
|
4852
|
+
w?.(), _?.();
|
|
4851
4853
|
break;
|
|
4852
4854
|
case A.PlayerState.PAUSED:
|
|
4853
|
-
|
|
4855
|
+
b?.();
|
|
4854
4856
|
break;
|
|
4855
4857
|
case A.PlayerState.BUFFERING:
|
|
4856
|
-
|
|
4858
|
+
C?.();
|
|
4857
4859
|
break;
|
|
4858
4860
|
case A.PlayerState.ENDED:
|
|
4859
4861
|
L?.();
|
|
@@ -4870,7 +4872,7 @@ function ns(e) {
|
|
|
4870
4872
|
}
|
|
4871
4873
|
function Ge() {
|
|
4872
4874
|
Se?.();
|
|
4873
|
-
const T =
|
|
4875
|
+
const T = m.get(x) ?? 1e3;
|
|
4874
4876
|
Se = vt(() => {
|
|
4875
4877
|
if (!z) return;
|
|
4876
4878
|
const A = z.getDuration?.() ?? 0, j = z.getCurrentTime?.() ?? 0, Z = z.getVideoLoadedFraction?.() ?? 0;
|
|
@@ -4885,68 +4887,68 @@ function ns(e) {
|
|
|
4885
4887
|
function D() {
|
|
4886
4888
|
if (!z) return;
|
|
4887
4889
|
try {
|
|
4888
|
-
const j =
|
|
4890
|
+
const j = m.get(u) ?? 1;
|
|
4889
4891
|
z.setPlaybackRate?.(j);
|
|
4890
4892
|
} catch {
|
|
4891
4893
|
}
|
|
4892
4894
|
try {
|
|
4893
4895
|
const j = Math.round(
|
|
4894
|
-
Math.min(Math.max(
|
|
4896
|
+
Math.min(Math.max(m.get(l) ?? 1, 0), 1) * 100
|
|
4895
4897
|
);
|
|
4896
4898
|
z.setVolume?.(j);
|
|
4897
4899
|
} catch {
|
|
4898
4900
|
}
|
|
4899
4901
|
try {
|
|
4900
|
-
|
|
4902
|
+
m.get(i) ?? !1 ? z.mute?.() : z.unMute?.();
|
|
4901
4903
|
} catch {
|
|
4902
4904
|
}
|
|
4903
|
-
|
|
4904
|
-
const A =
|
|
4905
|
+
m.get(n) ?? !1 ? z.playVideo?.() : z.pauseVideo?.();
|
|
4906
|
+
const A = m.get(h);
|
|
4905
4907
|
typeof A == "number" && Number.isFinite(A) && (z.seekTo?.(A, !0), I?.(A));
|
|
4906
4908
|
}
|
|
4907
|
-
const N =
|
|
4909
|
+
const N = f.div(
|
|
4908
4910
|
ae((T) => {
|
|
4909
|
-
Ce = T, Ie(),
|
|
4911
|
+
Ce = T, Ie(), d?.();
|
|
4910
4912
|
})
|
|
4911
4913
|
);
|
|
4912
4914
|
ue.push(
|
|
4913
|
-
|
|
4915
|
+
m.on(t, () => {
|
|
4914
4916
|
Q.value === "youtube" && Ie();
|
|
4915
4917
|
})
|
|
4916
4918
|
), ue.push(
|
|
4917
|
-
|
|
4918
|
-
Q.value === "file" && U ?
|
|
4919
|
-
}) : U.pause?.() : Q.value === "youtube" && z && (
|
|
4919
|
+
m.on(n, () => {
|
|
4920
|
+
Q.value === "file" && U ? m.get(n) ? U.play?.().catch(() => {
|
|
4921
|
+
}) : U.pause?.() : Q.value === "youtube" && z && (m.get(n) ? z.playVideo?.() : z.pauseVideo?.());
|
|
4920
4922
|
})
|
|
4921
4923
|
), ue.push(
|
|
4922
|
-
|
|
4924
|
+
m.on(l, () => {
|
|
4923
4925
|
if (Q.value === "file" && U)
|
|
4924
|
-
U.volume = Math.min(Math.max(
|
|
4926
|
+
U.volume = Math.min(Math.max(m.get(l) ?? 1, 0), 1);
|
|
4925
4927
|
else if (Q.value === "youtube" && z) {
|
|
4926
4928
|
const T = Math.round(
|
|
4927
|
-
Math.min(Math.max(
|
|
4929
|
+
Math.min(Math.max(m.get(l) ?? 1, 0), 1) * 100
|
|
4928
4930
|
);
|
|
4929
4931
|
z.setVolume?.(T);
|
|
4930
4932
|
}
|
|
4931
4933
|
})
|
|
4932
4934
|
), ue.push(
|
|
4933
|
-
|
|
4934
|
-
Q.value === "file" && U ? U.muted = !!
|
|
4935
|
+
m.on(i, () => {
|
|
4936
|
+
Q.value === "file" && U ? U.muted = !!m.get(i) : Q.value === "youtube" && z && (m.get(i) ? z.mute?.() : z.unMute?.());
|
|
4935
4937
|
})
|
|
4936
4938
|
), ue.push(
|
|
4937
|
-
|
|
4939
|
+
m.on(u, () => {
|
|
4938
4940
|
if (Q.value === "file" && U)
|
|
4939
4941
|
try {
|
|
4940
|
-
U.playbackRate =
|
|
4942
|
+
U.playbackRate = m.get(u) ?? 1;
|
|
4941
4943
|
} catch {
|
|
4942
4944
|
}
|
|
4943
|
-
else Q.value === "youtube" && z && z.setPlaybackRate?.(
|
|
4945
|
+
else Q.value === "youtube" && z && z.setPlaybackRate?.(m.get(u) ?? 1);
|
|
4944
4946
|
})
|
|
4945
4947
|
), ue.push(
|
|
4946
|
-
|
|
4948
|
+
m.on(c, async () => {
|
|
4947
4949
|
if (!(Q.value !== "file" || !U))
|
|
4948
4950
|
try {
|
|
4949
|
-
const T = !!(
|
|
4951
|
+
const T = !!(m.get(c) ?? !1), A = document, j = U;
|
|
4950
4952
|
T ? typeof j.requestPictureInPicture == "function" && A.pictureInPictureElement !== U && await j.requestPictureInPicture()?.catch(() => {
|
|
4951
4953
|
}) : A.pictureInPictureElement === U && typeof A.exitPictureInPicture == "function" && await A.exitPictureInPicture()?.catch(() => {
|
|
4952
4954
|
});
|
|
@@ -4954,8 +4956,8 @@ function ns(e) {
|
|
|
4954
4956
|
}
|
|
4955
4957
|
})
|
|
4956
4958
|
), ue.push(
|
|
4957
|
-
|
|
4958
|
-
const T =
|
|
4959
|
+
m.on(h ?? null, () => {
|
|
4960
|
+
const T = m.get(h);
|
|
4959
4961
|
if (T != null)
|
|
4960
4962
|
if (Q.value === "file" && U)
|
|
4961
4963
|
try {
|
|
@@ -4965,16 +4967,16 @@ function ns(e) {
|
|
|
4965
4967
|
else Q.value === "youtube" && z && (z.seekTo?.(T, !0), I?.(T));
|
|
4966
4968
|
})
|
|
4967
4969
|
);
|
|
4968
|
-
const K =
|
|
4970
|
+
const K = f.div(
|
|
4969
4971
|
s.class("bc-base-video"),
|
|
4970
4972
|
k.width(
|
|
4971
|
-
|
|
4973
|
+
m.map(p, ke)
|
|
4972
4974
|
),
|
|
4973
4975
|
k.height(
|
|
4974
|
-
|
|
4976
|
+
m.map(g, ke)
|
|
4975
4977
|
),
|
|
4976
4978
|
J(
|
|
4977
|
-
|
|
4979
|
+
m.map(Q, (T) => T === "youtube"),
|
|
4978
4980
|
() => N,
|
|
4979
4981
|
() => Ae
|
|
4980
4982
|
)
|
|
@@ -4991,12 +4993,12 @@ function rn(e) {
|
|
|
4991
4993
|
}
|
|
4992
4994
|
function Va(e) {
|
|
4993
4995
|
const t = {
|
|
4994
|
-
autoplay:
|
|
4995
|
-
controls:
|
|
4996
|
+
autoplay: m.get(e.playing) ?? !1 ? 1 : 0,
|
|
4997
|
+
controls: m.get(e.controls) ?? !1 ? 1 : 0,
|
|
4996
4998
|
rel: 0,
|
|
4997
|
-
playsinline:
|
|
4999
|
+
playsinline: m.get(e.playsinline) ?? !0 ? 1 : 0,
|
|
4998
5000
|
modestbranding: 1
|
|
4999
|
-
}, n =
|
|
5001
|
+
}, n = m.get(e.loop) ?? !1, a = m.get(e.url), r = typeof a == "string" ? rn(a) : null;
|
|
5000
5002
|
return n && r && (t.loop = 1, t.playlist = r), t;
|
|
5001
5003
|
}
|
|
5002
5004
|
export {
|