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