@tempots/beatui 0.59.0 → 0.60.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{2019-Dks2DDHw.cjs → 2019-CSG1mHKh.cjs} +1 -1
- package/dist/{2019-D8FDunSq.js → 2019-xRoq64Hq.js} +2 -2
- package/dist/{2020-Db2sT3RF.js → 2020-BxLJruSu.js} +2 -2
- package/dist/{2020-C8VDmyg1.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 +173 -0
- package/dist/beatui.tailwind.css +173 -0
- 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-M6PBne67.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-BAa_FdQV.cjs → index-Cok4rljj.cjs} +2 -2
- package/dist/{index-DCOaDJ8f.js → index-D6_EcuJG.js} +1 -1
- package/dist/{index-C86Mq1ak.js → index-DGQhsTxm.js} +6 -6
- package/dist/{index-Do9WmZEc.cjs → index-Duw9TkLf.cjs} +1 -1
- package/dist/{index-BYflP18C.js → index-yhjOw19A.js} +3 -3
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +932 -910
- 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/types/components/media/pdf-page-viewer.d.ts +2 -2
- 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-byyCrT3S.js → utils-CutcxfzK.js} +963 -884
- 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 +2 -2
- package/dist/translations-t-neYabN.cjs +0 -1
- package/dist/utils-sDRkbnf9.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
|
);
|
|
@@ -328,72 +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
|
|
342
|
+
return y.div(
|
|
343
343
|
l.class(
|
|
344
|
-
|
|
344
|
+
B(
|
|
345
345
|
n,
|
|
346
346
|
r
|
|
347
347
|
)(
|
|
348
|
-
(u,
|
|
348
|
+
(u, d) => Ve(u ?? "md", d ?? !1)
|
|
349
349
|
)
|
|
350
350
|
),
|
|
351
|
-
|
|
351
|
+
y.div(
|
|
352
352
|
l.class("bc-segmented-input__container"),
|
|
353
|
-
|
|
353
|
+
y.div(
|
|
354
354
|
l.class("bc-segmented-input__indicator"),
|
|
355
|
-
|
|
356
|
-
|
|
355
|
+
ht.width(
|
|
356
|
+
B(
|
|
357
357
|
e,
|
|
358
358
|
o
|
|
359
|
-
)((u,
|
|
360
|
-
const { width:
|
|
361
|
-
return `${
|
|
359
|
+
)((u, d) => {
|
|
360
|
+
const { width: b } = d[i[u] ?? 0];
|
|
361
|
+
return `${b}px`;
|
|
362
362
|
})
|
|
363
363
|
),
|
|
364
|
-
|
|
365
|
-
|
|
364
|
+
ht.left(
|
|
365
|
+
B(
|
|
366
366
|
e,
|
|
367
367
|
o
|
|
368
|
-
)((u,
|
|
369
|
-
const { left:
|
|
370
|
-
return `${
|
|
368
|
+
)((u, d) => {
|
|
369
|
+
const { left: b } = d[i[u] ?? 0];
|
|
370
|
+
return `${b}px`;
|
|
371
371
|
})
|
|
372
372
|
)
|
|
373
373
|
),
|
|
374
374
|
// clickable buttons
|
|
375
|
-
a.map(({ label: u, key:
|
|
375
|
+
a.map(({ label: u, key: d }, b) => y.button(
|
|
376
376
|
l.type("button"),
|
|
377
|
-
|
|
378
|
-
|
|
377
|
+
I.click((g) => {
|
|
378
|
+
g.preventDefault(), p.get(r) || s?.(d);
|
|
379
379
|
}),
|
|
380
380
|
l.disabled(r),
|
|
381
381
|
l.class("bc-segmented-input__segment"),
|
|
382
382
|
l.class(
|
|
383
|
-
p.map(e, (
|
|
383
|
+
p.map(e, (g) => g === d ? "bc-segmented-input__segment--active" : "bc-segmented-input__segment--inactive")
|
|
384
384
|
),
|
|
385
|
-
|
|
386
|
-
function
|
|
387
|
-
o.update((
|
|
388
|
-
const
|
|
389
|
-
return
|
|
390
|
-
width:
|
|
391
|
-
left:
|
|
392
|
-
},
|
|
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
|
+
}, $;
|
|
393
393
|
});
|
|
394
394
|
}
|
|
395
|
-
const
|
|
396
|
-
return X(
|
|
395
|
+
const w = le(f);
|
|
396
|
+
return X(w, g.on(f));
|
|
397
397
|
}),
|
|
398
398
|
u
|
|
399
399
|
))
|
|
@@ -410,8 +410,8 @@ function Le(t) {
|
|
|
410
410
|
const e = t.type.toLowerCase();
|
|
411
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";
|
|
412
412
|
}
|
|
413
|
-
function
|
|
414
|
-
return
|
|
413
|
+
function yt(t) {
|
|
414
|
+
return L(
|
|
415
415
|
t.map(Be),
|
|
416
416
|
() => {
|
|
417
417
|
const e = tt(null);
|
|
@@ -419,22 +419,22 @@ function Et(t) {
|
|
|
419
419
|
e.value && URL.revokeObjectURL(e.value);
|
|
420
420
|
const n = URL.createObjectURL(s);
|
|
421
421
|
e.value = n;
|
|
422
|
-
}),
|
|
422
|
+
}), y.div(
|
|
423
423
|
X(() => {
|
|
424
424
|
e.value && URL.revokeObjectURL(e.value);
|
|
425
425
|
}),
|
|
426
426
|
l.class("bc-file-input__thumbnail-container"),
|
|
427
|
-
|
|
427
|
+
y.img(
|
|
428
428
|
l.src(e),
|
|
429
429
|
l.alt(t.map((s) => s.name)),
|
|
430
430
|
l.class("bc-file-input__thumbnail")
|
|
431
431
|
)
|
|
432
432
|
);
|
|
433
433
|
},
|
|
434
|
-
() =>
|
|
434
|
+
() => U({ icon: t.map(Le) })
|
|
435
435
|
);
|
|
436
436
|
}
|
|
437
|
-
const
|
|
437
|
+
const ze = (t, ...e) => {
|
|
438
438
|
const {
|
|
439
439
|
value: s = tt([]),
|
|
440
440
|
accept: n = "*/*",
|
|
@@ -444,194 +444,273 @@ const Ee = (t, ...e) => {
|
|
|
444
444
|
onBlur: i,
|
|
445
445
|
disabled: o,
|
|
446
446
|
hasError: u,
|
|
447
|
-
mode:
|
|
448
|
-
showFileList:
|
|
449
|
-
...
|
|
450
|
-
} = t,
|
|
451
|
-
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;
|
|
452
452
|
if (r != null) {
|
|
453
|
-
const
|
|
454
|
-
|
|
453
|
+
const k = p.get(r);
|
|
454
|
+
h = h.slice(0, k);
|
|
455
455
|
}
|
|
456
456
|
if (c) {
|
|
457
|
-
const
|
|
458
|
-
|
|
457
|
+
const k = p.get(c);
|
|
458
|
+
h = h.filter((T) => T.size <= k);
|
|
459
459
|
}
|
|
460
|
-
a?.(
|
|
461
|
-
},
|
|
462
|
-
const
|
|
463
|
-
a?.(
|
|
464
|
-
},
|
|
460
|
+
a?.(h);
|
|
461
|
+
}, x = (v) => {
|
|
462
|
+
const k = f.value.filter((T, A) => A !== v);
|
|
463
|
+
a?.(k);
|
|
464
|
+
}, m = () => {
|
|
465
465
|
a?.([]);
|
|
466
|
-
},
|
|
467
|
-
files:
|
|
468
|
-
clear:
|
|
469
|
-
change:
|
|
470
|
-
}) =>
|
|
466
|
+
}, M = ({
|
|
467
|
+
files: v,
|
|
468
|
+
clear: h,
|
|
469
|
+
change: k
|
|
470
|
+
}) => P(
|
|
471
471
|
W,
|
|
472
|
-
(
|
|
472
|
+
(T) => y.div(
|
|
473
473
|
l.class("bc-file-input__drop-zone"),
|
|
474
|
-
|
|
474
|
+
y.div(
|
|
475
475
|
l.class(
|
|
476
476
|
"bc-file-input__drop-zone-content bc-file-input__drop-zone-content--empty"
|
|
477
477
|
),
|
|
478
|
-
|
|
479
|
-
|
|
478
|
+
U({ icon: "mdi:cloud-upload-outline", size: "xl" }),
|
|
479
|
+
y.div(
|
|
480
480
|
l.class("bc-file-input__drop-zone-text"),
|
|
481
|
-
|
|
481
|
+
ft(T.$.filesInputInstructions)(
|
|
482
482
|
r,
|
|
483
483
|
c,
|
|
484
|
-
|
|
484
|
+
T.$.fileSizeUnits.value
|
|
485
485
|
)
|
|
486
486
|
)
|
|
487
487
|
)
|
|
488
488
|
)
|
|
489
|
-
),
|
|
490
|
-
files:
|
|
491
|
-
}) =>
|
|
489
|
+
), D = ({
|
|
490
|
+
files: v
|
|
491
|
+
}) => P(
|
|
492
492
|
W,
|
|
493
|
-
(
|
|
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(
|
|
494
558
|
l.class("bc-file-input__compact-input"),
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
() =>
|
|
559
|
+
L(
|
|
560
|
+
v.map((k) => k.length > 0),
|
|
561
|
+
() => y.span(
|
|
498
562
|
l.class("bc-file-input__compact-value"),
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
(
|
|
563
|
+
ot(
|
|
564
|
+
v,
|
|
565
|
+
(k) => y.span(
|
|
502
566
|
l.class("bc-file-input__compact-value-item"),
|
|
503
|
-
|
|
504
|
-
|
|
567
|
+
yt(k),
|
|
568
|
+
y.span(
|
|
505
569
|
l.class("bc-file-input__compact-value-item-name"),
|
|
506
|
-
|
|
570
|
+
k.$.name
|
|
507
571
|
)
|
|
508
572
|
)
|
|
509
573
|
)
|
|
510
574
|
),
|
|
511
|
-
() =>
|
|
575
|
+
() => y.span(
|
|
512
576
|
l.class("bc-file-input__compact-placeholder"),
|
|
513
|
-
|
|
577
|
+
U({ icon: "mdi:cloud-upload-outline", size: "md" }),
|
|
514
578
|
" ",
|
|
515
|
-
|
|
579
|
+
ft(h.$.filesInputInstructions)(
|
|
516
580
|
r,
|
|
517
581
|
c,
|
|
518
|
-
|
|
582
|
+
h.$.fileSizeUnits.value
|
|
519
583
|
)
|
|
520
584
|
)
|
|
521
585
|
)
|
|
522
586
|
)
|
|
523
587
|
);
|
|
524
|
-
return
|
|
588
|
+
return P(
|
|
525
589
|
W,
|
|
526
|
-
(
|
|
590
|
+
(v) => O(
|
|
527
591
|
{
|
|
528
|
-
baseContainer: p.map(
|
|
592
|
+
baseContainer: p.map(w, (h) => !h),
|
|
529
593
|
disabled: o,
|
|
530
594
|
hasError: u,
|
|
531
|
-
after:
|
|
532
|
-
|
|
533
|
-
() =>
|
|
534
|
-
|
|
535
|
-
() =>
|
|
595
|
+
after: L(
|
|
596
|
+
w,
|
|
597
|
+
() => L(
|
|
598
|
+
f.map(({ length: h }) => h > 0),
|
|
599
|
+
() => mt(
|
|
536
600
|
{
|
|
537
601
|
size: "sm",
|
|
538
|
-
label:
|
|
602
|
+
label: v.$.clearAllFiles,
|
|
539
603
|
disabled: o,
|
|
540
|
-
onClick:
|
|
604
|
+
onClick: m
|
|
541
605
|
},
|
|
542
606
|
l.class("bc-file-input__compact-clear")
|
|
543
607
|
)
|
|
544
608
|
)
|
|
545
609
|
),
|
|
546
|
-
...
|
|
547
|
-
input:
|
|
548
|
-
|
|
549
|
-
() =>
|
|
550
|
-
l.class("bc-file-input bc-file-input--
|
|
551
|
-
|
|
552
|
-
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,
|
|
553
617
|
accept: n,
|
|
554
618
|
enableClick: !0,
|
|
555
|
-
allowMultiple: p.map(r ?? 1 / 0, (
|
|
619
|
+
allowMultiple: p.map(r ?? 1 / 0, (h) => h > 1),
|
|
556
620
|
disabled: o,
|
|
557
|
-
onChange:
|
|
558
|
-
content:
|
|
621
|
+
onChange: $,
|
|
622
|
+
content: S
|
|
559
623
|
})
|
|
560
624
|
),
|
|
561
|
-
() =>
|
|
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
|
-
|
|
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)
|
|
593
664
|
),
|
|
594
|
-
|
|
595
|
-
l.class("bc-file-input__file-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
(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
|
|
601
671
|
),
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
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")
|
|
607
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"
|
|
608
704
|
),
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
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
|
+
})
|
|
617
713
|
)
|
|
618
|
-
);
|
|
619
|
-
})
|
|
620
|
-
),
|
|
621
|
-
E(
|
|
622
|
-
d.map(({ length: $ }) => $ > 1),
|
|
623
|
-
() => I.div(
|
|
624
|
-
l.class(
|
|
625
|
-
"bc-file-input__clear-all-button-container"
|
|
626
|
-
),
|
|
627
|
-
I.button(
|
|
628
|
-
l.type("button"),
|
|
629
|
-
l.class("bc-file-input__clear-all-button"),
|
|
630
|
-
l.disabled(o),
|
|
631
|
-
k.$.clearAllFiles,
|
|
632
|
-
C.click(($) => {
|
|
633
|
-
$.preventDefault(), $.stopPropagation(), b();
|
|
634
|
-
})
|
|
635
714
|
)
|
|
636
715
|
)
|
|
637
716
|
)
|
|
@@ -645,7 +724,7 @@ const Ee = (t, ...e) => {
|
|
|
645
724
|
)
|
|
646
725
|
);
|
|
647
726
|
};
|
|
648
|
-
async function
|
|
727
|
+
async function Ee(t) {
|
|
649
728
|
return new Promise((e, s) => {
|
|
650
729
|
const n = new FileReader();
|
|
651
730
|
n.readAsDataURL(t), n.onload = () => {
|
|
@@ -654,8 +733,8 @@ async function Re(t) {
|
|
|
654
733
|
}, n.onerror = (r) => s(r);
|
|
655
734
|
});
|
|
656
735
|
}
|
|
657
|
-
function
|
|
658
|
-
return Promise.all(t.map(
|
|
736
|
+
function Re(t) {
|
|
737
|
+
return Promise.all(t.map(Ee));
|
|
659
738
|
}
|
|
660
739
|
function Ue(t) {
|
|
661
740
|
if (t.length >= 4) {
|
|
@@ -684,20 +763,20 @@ function Oe(t) {
|
|
|
684
763
|
onChange: s,
|
|
685
764
|
onInput: n,
|
|
686
765
|
...r
|
|
687
|
-
} = t, c = /* @__PURE__ */ new Map(), a = p.toSignal(e).map((
|
|
688
|
-
const
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
), m = new Blob([
|
|
692
|
-
return new File([m],
|
|
693
|
-
})), i = (
|
|
694
|
-
|
|
695
|
-
for (const [
|
|
696
|
-
c.set(
|
|
697
|
-
|
|
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);
|
|
698
777
|
});
|
|
699
778
|
}, o = i(s), u = i(n);
|
|
700
|
-
return
|
|
779
|
+
return ze({
|
|
701
780
|
...r,
|
|
702
781
|
value: a,
|
|
703
782
|
onChange: o,
|
|
@@ -725,117 +804,117 @@ function yn(t) {
|
|
|
725
804
|
}
|
|
726
805
|
function Pe(t, e) {
|
|
727
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 = [];
|
|
728
|
-
for (let
|
|
729
|
-
const
|
|
730
|
-
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 });
|
|
731
810
|
}
|
|
732
|
-
const
|
|
733
|
-
let
|
|
734
|
-
for (let
|
|
735
|
-
const
|
|
736
|
-
|
|
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)}`;
|
|
737
816
|
}
|
|
738
|
-
return
|
|
817
|
+
return g += " Z", g;
|
|
739
818
|
}
|
|
740
819
|
const kn = (t) => {
|
|
741
|
-
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(
|
|
742
821
|
u,
|
|
743
|
-
([v,
|
|
744
|
-
),
|
|
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(
|
|
745
824
|
t.colorTextFormat ?? "rgb",
|
|
746
825
|
(v) => v
|
|
747
|
-
),
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
826
|
+
), _ = B(
|
|
827
|
+
d,
|
|
828
|
+
g,
|
|
829
|
+
w,
|
|
830
|
+
f
|
|
752
831
|
)(
|
|
753
|
-
([v,
|
|
754
|
-
),
|
|
832
|
+
([v, h, k], T, A, C) => at(v, h, k, T ?? 1, lt(A, C), C)
|
|
833
|
+
), $ = p.map(
|
|
755
834
|
t.colorTextFormat ?? "hex",
|
|
756
835
|
(v) => v
|
|
757
|
-
),
|
|
758
|
-
|
|
836
|
+
), x = p.map(o, (v) => `${-v / 2} ${-v / 2} ${v} ${v}`), m = B(
|
|
837
|
+
d,
|
|
759
838
|
o
|
|
760
|
-
)((v,
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
839
|
+
)((v, h) => Pe(v, h / 2)), M = B(
|
|
840
|
+
d,
|
|
841
|
+
g,
|
|
842
|
+
f
|
|
764
843
|
)(
|
|
765
|
-
([v,
|
|
766
|
-
),
|
|
844
|
+
([v, h, k], T, A) => A || T < 1 ? ye(v, h, k, T) : Ct(v, h, k)
|
|
845
|
+
), D = y.div(
|
|
767
846
|
l.class("bc-color-swatch-input__control"),
|
|
768
847
|
l.class(
|
|
769
848
|
p.map(
|
|
770
|
-
|
|
849
|
+
f,
|
|
771
850
|
(v) => v ? "bc-color-swatch-input__control--alpha" : ""
|
|
772
851
|
)
|
|
773
852
|
),
|
|
774
853
|
l.style(
|
|
775
|
-
|
|
854
|
+
B(o)((v) => `min-width:${v + 2}px;height:${v + 2}px`)
|
|
776
855
|
),
|
|
777
856
|
// The SVG blob preview
|
|
778
|
-
|
|
857
|
+
At.svg(
|
|
779
858
|
l.class("bc-color-swatch-input__svg"),
|
|
780
|
-
|
|
781
|
-
|
|
859
|
+
bt.viewBox(x),
|
|
860
|
+
At.path(bt.d(m), bt.fill(M))
|
|
782
861
|
),
|
|
783
862
|
// Invisible native input overlays the blob for picker and accessibility
|
|
784
|
-
|
|
863
|
+
y.input(
|
|
785
864
|
l.type("color"),
|
|
786
|
-
|
|
865
|
+
H(t),
|
|
787
866
|
// Native color input needs hex without alpha
|
|
788
|
-
l.value(p.map(
|
|
867
|
+
l.value(p.map(d, ([v, h, k]) => Ct(v, h, k))),
|
|
789
868
|
l.class(
|
|
790
869
|
"bc-input bc-color-swatch-input bc-color-swatch-input__native"
|
|
791
870
|
),
|
|
792
|
-
s != null ?
|
|
793
|
-
n != null ?
|
|
794
|
-
const
|
|
871
|
+
s != null ? I.blur(s) : F,
|
|
872
|
+
n != null ? I.change((v) => {
|
|
873
|
+
const h = v.target.value;
|
|
795
874
|
if (!n) return;
|
|
796
|
-
const { r:
|
|
797
|
-
p.get(
|
|
798
|
-
p.get(
|
|
799
|
-
),
|
|
800
|
-
n(
|
|
801
|
-
}) :
|
|
802
|
-
r != null ?
|
|
803
|
-
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;
|
|
804
883
|
if (!r) return;
|
|
805
|
-
const { r:
|
|
806
|
-
p.get(
|
|
807
|
-
p.get(
|
|
808
|
-
),
|
|
809
|
-
r(
|
|
810
|
-
}) :
|
|
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
|
|
811
890
|
)
|
|
812
|
-
),
|
|
813
|
-
|
|
814
|
-
() =>
|
|
891
|
+
), S = L(
|
|
892
|
+
f,
|
|
893
|
+
() => y.input(
|
|
815
894
|
l.type("range"),
|
|
816
895
|
l.class("bc-color-swatch-input__alpha"),
|
|
817
896
|
l.min(0),
|
|
818
897
|
l.max(1),
|
|
819
898
|
l.step(0.01),
|
|
820
|
-
l.value(p.map(
|
|
899
|
+
l.value(p.map(g, (v) => String(v ?? 1))),
|
|
821
900
|
l.disabled(t.disabled),
|
|
822
|
-
|
|
823
|
-
const
|
|
824
|
-
|
|
825
|
-
const [
|
|
826
|
-
p.get(
|
|
827
|
-
p.get(
|
|
828
|
-
),
|
|
829
|
-
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);
|
|
830
909
|
}),
|
|
831
|
-
|
|
832
|
-
const
|
|
833
|
-
|
|
834
|
-
const [
|
|
835
|
-
p.get(
|
|
836
|
-
p.get(
|
|
837
|
-
),
|
|
838
|
-
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);
|
|
839
918
|
})
|
|
840
919
|
)
|
|
841
920
|
);
|
|
@@ -844,27 +923,27 @@ const kn = (t) => {
|
|
|
844
923
|
...t,
|
|
845
924
|
// ensure our control does not try to grow
|
|
846
925
|
growInput: !1,
|
|
847
|
-
input:
|
|
926
|
+
input: D,
|
|
848
927
|
// If caller provided an `after`, append RGB before it
|
|
849
|
-
after:
|
|
850
|
-
|
|
928
|
+
after: z(
|
|
929
|
+
L(
|
|
851
930
|
c ?? !1,
|
|
852
|
-
() =>
|
|
931
|
+
() => y.span(l.class("bc-color-swatch-input__rgb"), _)
|
|
853
932
|
),
|
|
854
|
-
|
|
933
|
+
S,
|
|
855
934
|
t.after
|
|
856
935
|
)
|
|
857
936
|
});
|
|
858
|
-
},
|
|
859
|
-
const n = `${
|
|
937
|
+
}, St = "$$tts-exp-", je = (t, e) => ut((s) => {
|
|
938
|
+
const n = `${St}${t}`;
|
|
860
939
|
return X(p.on(e, (r) => Reflect.set(s, n, r)));
|
|
861
940
|
}), In = (t, e) => {
|
|
862
|
-
const s = `${
|
|
941
|
+
const s = `${St}${t}`;
|
|
863
942
|
return (n) => {
|
|
864
943
|
e(Reflect.get(n.target, s));
|
|
865
944
|
};
|
|
866
945
|
}, He = (t, e) => {
|
|
867
|
-
const s = `${
|
|
946
|
+
const s = `${St}${t}`;
|
|
868
947
|
return (n) => {
|
|
869
948
|
const r = n.target, c = r.selectedIndex, a = r.options[c];
|
|
870
949
|
e(Reflect.get(a, s));
|
|
@@ -875,9 +954,9 @@ function We(t, e, s) {
|
|
|
875
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(" ");
|
|
876
955
|
}
|
|
877
956
|
function Cn({ variant: t = "default", size: e = "md", roundedness: s = "lg" } = {}, ...n) {
|
|
878
|
-
return
|
|
957
|
+
return y.div(
|
|
879
958
|
l.class(
|
|
880
|
-
|
|
959
|
+
B(
|
|
881
960
|
t,
|
|
882
961
|
e,
|
|
883
962
|
s
|
|
@@ -892,8 +971,8 @@ function Cn({ variant: t = "default", size: e = "md", roundedness: s = "lg" } =
|
|
|
892
971
|
...n
|
|
893
972
|
);
|
|
894
973
|
}
|
|
895
|
-
function
|
|
896
|
-
return
|
|
974
|
+
function dt(...t) {
|
|
975
|
+
return y.div(l.class("bc-group"), ...t);
|
|
897
976
|
}
|
|
898
977
|
const Mn = ({
|
|
899
978
|
startEditing: t,
|
|
@@ -903,7 +982,7 @@ const Mn = ({
|
|
|
903
982
|
disabled: r
|
|
904
983
|
}) => {
|
|
905
984
|
const c = p.deriveProp(t ?? !1), a = tt(!1), i = p.map(r ?? !1, (o) => o);
|
|
906
|
-
return
|
|
985
|
+
return y.div(
|
|
907
986
|
l.class("bc-editable-text"),
|
|
908
987
|
l.class(
|
|
909
988
|
p.map(
|
|
@@ -911,19 +990,19 @@ const Mn = ({
|
|
|
911
990
|
(o) => o ? "bc-editable-text--disabled" : ""
|
|
912
991
|
)
|
|
913
992
|
),
|
|
914
|
-
|
|
915
|
-
|
|
993
|
+
R.disabled(i),
|
|
994
|
+
L(
|
|
916
995
|
c,
|
|
917
|
-
() =>
|
|
996
|
+
() => y.input(
|
|
918
997
|
l.placeholder(n),
|
|
919
998
|
l.value(e),
|
|
920
999
|
l.class("bc-editable-text__input"),
|
|
921
|
-
|
|
922
|
-
|
|
1000
|
+
oe(),
|
|
1001
|
+
I.keydown((o) => {
|
|
923
1002
|
o.key === "Enter" ? c.set(!1) : o.key === "Escape" && (a.set(!0), c.set(!1));
|
|
924
1003
|
}),
|
|
925
|
-
|
|
926
|
-
|
|
1004
|
+
I.blur(
|
|
1005
|
+
j((o) => {
|
|
927
1006
|
if (c.set(!1), a.value) {
|
|
928
1007
|
a.set(!1);
|
|
929
1008
|
return;
|
|
@@ -932,58 +1011,58 @@ const Mn = ({
|
|
|
932
1011
|
})
|
|
933
1012
|
)
|
|
934
1013
|
),
|
|
935
|
-
() =>
|
|
936
|
-
|
|
1014
|
+
() => y.span(
|
|
1015
|
+
I.click(() => {
|
|
937
1016
|
p.get(i) || c.set(!0);
|
|
938
1017
|
}),
|
|
939
1018
|
l.class("bc-editable-text__display"),
|
|
940
|
-
|
|
1019
|
+
L(
|
|
941
1020
|
p.map(e, (o) => o != null && o.trim() !== ""),
|
|
942
|
-
() =>
|
|
943
|
-
() =>
|
|
1021
|
+
() => y.span(l.class("bc-editable-text__text"), e),
|
|
1022
|
+
() => y.span(
|
|
944
1023
|
l.class("bc-editable-text__placeholder"),
|
|
945
1024
|
n
|
|
946
1025
|
)
|
|
947
1026
|
),
|
|
948
|
-
|
|
1027
|
+
L(
|
|
949
1028
|
p.map(i, (o) => !o),
|
|
950
|
-
() =>
|
|
1029
|
+
() => y.button(
|
|
951
1030
|
l.type("button"),
|
|
952
1031
|
l.class("bc-editable-text__edit-button"),
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
1032
|
+
P(W, (o) => R.label(o.$.editLabel)),
|
|
1033
|
+
I.click(() => c.set(!0)),
|
|
1034
|
+
U({ icon: "line-md/pencil", color: "neutral" })
|
|
956
1035
|
)
|
|
957
1036
|
)
|
|
958
1037
|
)
|
|
959
1038
|
)
|
|
960
1039
|
);
|
|
961
|
-
},
|
|
1040
|
+
}, Xt = (t, e, s) => te(
|
|
962
1041
|
t,
|
|
963
|
-
(n) =>
|
|
1042
|
+
(n) => ee(n, {
|
|
964
1043
|
value: (r) => {
|
|
965
|
-
const c =
|
|
1044
|
+
const c = B(
|
|
966
1045
|
r,
|
|
967
1046
|
s
|
|
968
1047
|
)((a, i) => e(a.value, i));
|
|
969
|
-
return
|
|
1048
|
+
return y.option(
|
|
970
1049
|
l.selected(c),
|
|
971
1050
|
je("value", r.$.value),
|
|
972
1051
|
r.$.label
|
|
973
1052
|
);
|
|
974
1053
|
},
|
|
975
|
-
group: (r) =>
|
|
1054
|
+
group: (r) => y.optgroup(
|
|
976
1055
|
l.label(r.$.group),
|
|
977
|
-
|
|
1056
|
+
ot(
|
|
978
1057
|
r.$.options,
|
|
979
|
-
(c) =>
|
|
1058
|
+
(c) => Xt(
|
|
980
1059
|
c,
|
|
981
1060
|
e,
|
|
982
1061
|
s
|
|
983
1062
|
)
|
|
984
1063
|
)
|
|
985
1064
|
),
|
|
986
|
-
break: () =>
|
|
1065
|
+
break: () => y.hr()
|
|
987
1066
|
})
|
|
988
1067
|
), Ze = (t) => {
|
|
989
1068
|
const {
|
|
@@ -992,14 +1071,14 @@ const Mn = ({
|
|
|
992
1071
|
onChange: n,
|
|
993
1072
|
options: r,
|
|
994
1073
|
unselectedLabel: c,
|
|
995
|
-
equality: a = (u,
|
|
1074
|
+
equality: a = (u, d) => u === d,
|
|
996
1075
|
after: i
|
|
997
1076
|
} = t;
|
|
998
1077
|
let o;
|
|
999
1078
|
return O(
|
|
1000
1079
|
{
|
|
1001
1080
|
...t,
|
|
1002
|
-
after:
|
|
1081
|
+
after: z(
|
|
1003
1082
|
ce({
|
|
1004
1083
|
icon: "ph:caret-down-bold",
|
|
1005
1084
|
color: "neutral",
|
|
@@ -1007,30 +1086,30 @@ const Mn = ({
|
|
|
1007
1086
|
}),
|
|
1008
1087
|
i
|
|
1009
1088
|
),
|
|
1010
|
-
input:
|
|
1011
|
-
|
|
1089
|
+
input: y.select(
|
|
1090
|
+
ut((u) => {
|
|
1012
1091
|
o = u;
|
|
1013
|
-
const
|
|
1014
|
-
const { removedNodes:
|
|
1015
|
-
|
|
1092
|
+
const d = new MutationObserver((b) => {
|
|
1093
|
+
const { removedNodes: g } = b[0];
|
|
1094
|
+
g.length > 0 && (o.selectedIndex = 0);
|
|
1016
1095
|
});
|
|
1017
|
-
return
|
|
1096
|
+
return d.observe(u, { childList: !0 }), X(() => d.disconnect());
|
|
1018
1097
|
}),
|
|
1019
|
-
|
|
1098
|
+
H(t),
|
|
1020
1099
|
l.class("bc-native-select bc-input"),
|
|
1021
|
-
|
|
1100
|
+
P(
|
|
1022
1101
|
W,
|
|
1023
|
-
(u) =>
|
|
1102
|
+
(u) => y.option(
|
|
1024
1103
|
l.hidden("hidden"),
|
|
1025
|
-
|
|
1104
|
+
Kt(c, u.$.selectOne)
|
|
1026
1105
|
)
|
|
1027
1106
|
),
|
|
1028
|
-
|
|
1029
|
-
s != null ?
|
|
1030
|
-
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
|
|
1031
1110
|
)
|
|
1032
1111
|
},
|
|
1033
|
-
|
|
1112
|
+
I.click(() => {
|
|
1034
1113
|
o?.focus(), typeof o?.showPicker == "function" && o.showPicker();
|
|
1035
1114
|
})
|
|
1036
1115
|
);
|
|
@@ -1041,23 +1120,23 @@ function Ye(t) {
|
|
|
1041
1120
|
...r,
|
|
1042
1121
|
value: e.signal,
|
|
1043
1122
|
onChange: me(e, s),
|
|
1044
|
-
onBlur:
|
|
1123
|
+
onBlur: fe(e, n)
|
|
1045
1124
|
});
|
|
1046
1125
|
}
|
|
1047
1126
|
function Dn(t) {
|
|
1048
|
-
return
|
|
1127
|
+
return Wt({
|
|
1049
1128
|
...t,
|
|
1050
1129
|
content: Ye(t)
|
|
1051
1130
|
});
|
|
1052
1131
|
}
|
|
1053
1132
|
function Xe(t, e, s) {
|
|
1054
1133
|
const n = t.length.map((r) => r);
|
|
1055
|
-
return
|
|
1056
|
-
|
|
1134
|
+
return z(
|
|
1135
|
+
jt(
|
|
1057
1136
|
n,
|
|
1058
1137
|
(r) => {
|
|
1059
1138
|
const c = t.item(r.index), a = [];
|
|
1060
|
-
return
|
|
1139
|
+
return z(
|
|
1061
1140
|
X(() => {
|
|
1062
1141
|
a.forEach((i) => i());
|
|
1063
1142
|
}),
|
|
@@ -1087,7 +1166,7 @@ function Xe(t, e, s) {
|
|
|
1087
1166
|
const o = (() => {
|
|
1088
1167
|
switch (i) {
|
|
1089
1168
|
case "up":
|
|
1090
|
-
return
|
|
1169
|
+
return Vt(r.index > 0);
|
|
1091
1170
|
case "down":
|
|
1092
1171
|
return t.length.map((u) => r.index < u - 1);
|
|
1093
1172
|
}
|
|
@@ -1098,7 +1177,7 @@ function Xe(t, e, s) {
|
|
|
1098
1177
|
const o = (() => {
|
|
1099
1178
|
switch (i) {
|
|
1100
1179
|
case "up":
|
|
1101
|
-
return
|
|
1180
|
+
return Vt(r.index === 0);
|
|
1102
1181
|
case "down":
|
|
1103
1182
|
return t.length.map((u) => r.index === u - 1);
|
|
1104
1183
|
}
|
|
@@ -1117,7 +1196,7 @@ const Rt = {
|
|
|
1117
1196
|
A: { pattern: /^[A-Za-z]$/, transform: (t) => t.toUpperCase() },
|
|
1118
1197
|
"*": { pattern: /^.$/ }
|
|
1119
1198
|
}, qe = (t) => t instanceof RegExp;
|
|
1120
|
-
function
|
|
1199
|
+
function qt(t, e, s) {
|
|
1121
1200
|
if (t == null) return [];
|
|
1122
1201
|
const n = s ? { ...Rt, ...e } : e ?? Rt, r = (a, i) => {
|
|
1123
1202
|
const o = n[i];
|
|
@@ -1150,64 +1229,64 @@ function Ge(t, e) {
|
|
|
1150
1229
|
}
|
|
1151
1230
|
};
|
|
1152
1231
|
}
|
|
1153
|
-
function
|
|
1232
|
+
function Ut(t, e, s, n, r, c) {
|
|
1154
1233
|
const a = {
|
|
1155
1234
|
raw: t,
|
|
1156
1235
|
previousConformed: e,
|
|
1157
1236
|
cursor: r ?? t.length,
|
|
1158
1237
|
completed: !1
|
|
1159
|
-
}, 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(
|
|
1160
1239
|
o,
|
|
1161
1240
|
i,
|
|
1162
1241
|
n.useDefaultDefinitions ?? !0
|
|
1163
|
-
),
|
|
1164
|
-
for (const
|
|
1165
|
-
if (n.prefix) for (const
|
|
1166
|
-
if (n.suffix) for (const
|
|
1167
|
-
const
|
|
1168
|
-
if (
|
|
1169
|
-
const
|
|
1170
|
-
let
|
|
1171
|
-
for (const
|
|
1172
|
-
if (
|
|
1173
|
-
|
|
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 });
|
|
1174
1253
|
continue;
|
|
1175
1254
|
}
|
|
1176
|
-
|
|
1177
|
-
const
|
|
1178
|
-
if (
|
|
1255
|
+
$ += C.optional ? 0 : 1;
|
|
1256
|
+
const V = g[_];
|
|
1257
|
+
if (V == null)
|
|
1179
1258
|
break;
|
|
1180
|
-
if (
|
|
1181
|
-
|
|
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, _++;
|
|
1182
1261
|
continue;
|
|
1183
1262
|
}
|
|
1184
|
-
if (
|
|
1185
|
-
if (
|
|
1186
|
-
|
|
1187
|
-
const
|
|
1188
|
-
|
|
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, _++;
|
|
1189
1268
|
} else {
|
|
1190
|
-
|
|
1269
|
+
_++;
|
|
1191
1270
|
continue;
|
|
1192
1271
|
}
|
|
1193
1272
|
}
|
|
1194
|
-
const M =
|
|
1273
|
+
const M = f.join(""), D = (n.prefix ?? "") + M + (n.suffix ?? "");
|
|
1195
1274
|
let v = (n.prefix ?? "").length;
|
|
1196
1275
|
if (m >= 0) {
|
|
1197
|
-
let
|
|
1276
|
+
let C = m + 1;
|
|
1198
1277
|
if ((c?.policy ?? "smart") !== "sticky")
|
|
1199
|
-
for (;
|
|
1200
|
-
v +=
|
|
1278
|
+
for (; C < w.length && w[C].kind === "literal"; ) C++;
|
|
1279
|
+
v += C;
|
|
1201
1280
|
}
|
|
1202
|
-
const
|
|
1203
|
-
let
|
|
1204
|
-
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 };
|
|
1205
1284
|
}
|
|
1206
1285
|
function Qe(t, e) {
|
|
1207
1286
|
const s = e?.strategy ?? "none";
|
|
1208
1287
|
return s === "custom" && e?.unmask ? e.unmask(t) : s === "strip" ? t.replace(/[^A-Za-z0-9]/g, "") : t;
|
|
1209
1288
|
}
|
|
1210
|
-
const
|
|
1289
|
+
const Gt = (t) => {
|
|
1211
1290
|
const {
|
|
1212
1291
|
value: e,
|
|
1213
1292
|
onBlur: s,
|
|
@@ -1218,141 +1297,141 @@ const qt = (t) => {
|
|
|
1218
1297
|
mask: i,
|
|
1219
1298
|
definitions: o,
|
|
1220
1299
|
useDefaultDefinitions: u,
|
|
1221
|
-
extraLiterals:
|
|
1222
|
-
prefix:
|
|
1223
|
-
suffix:
|
|
1224
|
-
autofix:
|
|
1225
|
-
pipe:
|
|
1226
|
-
completion:
|
|
1227
|
-
unmask:
|
|
1228
|
-
allowMode:
|
|
1300
|
+
extraLiterals: d,
|
|
1301
|
+
prefix: b,
|
|
1302
|
+
suffix: g,
|
|
1303
|
+
autofix: f,
|
|
1304
|
+
pipe: w,
|
|
1305
|
+
completion: _,
|
|
1306
|
+
unmask: $,
|
|
1307
|
+
allowMode: x,
|
|
1229
1308
|
allow: m,
|
|
1230
1309
|
placeholder: M,
|
|
1231
|
-
placeholderOptions:
|
|
1232
|
-
} = t,
|
|
1310
|
+
placeholderOptions: D
|
|
1311
|
+
} = t, S = B(
|
|
1233
1312
|
e,
|
|
1234
1313
|
i,
|
|
1235
1314
|
o,
|
|
1236
1315
|
u,
|
|
1237
|
-
f,
|
|
1238
|
-
g,
|
|
1239
|
-
h,
|
|
1240
1316
|
d,
|
|
1241
|
-
w,
|
|
1242
|
-
_,
|
|
1243
1317
|
b,
|
|
1318
|
+
g,
|
|
1319
|
+
f,
|
|
1320
|
+
_,
|
|
1321
|
+
$,
|
|
1322
|
+
x,
|
|
1244
1323
|
M,
|
|
1245
|
-
|
|
1246
|
-
)((
|
|
1247
|
-
definitions:
|
|
1324
|
+
D
|
|
1325
|
+
)((h, k, T, A, C, V, N, nt, st, K, q, pt, Z) => k ? Ut(h ?? "", "", k, {
|
|
1326
|
+
definitions: T ?? {},
|
|
1248
1327
|
useDefaultDefinitions: A ?? !0,
|
|
1249
|
-
extraLiterals:
|
|
1328
|
+
extraLiterals: C ?? [],
|
|
1250
1329
|
autofix: nt ?? "none",
|
|
1251
1330
|
completion: st ?? { mode: "mask" },
|
|
1252
|
-
pipe:
|
|
1331
|
+
pipe: w ?? ((E) => E),
|
|
1253
1332
|
unmask: K ?? { strategy: "none" },
|
|
1254
1333
|
allowMode: q ?? "all",
|
|
1255
1334
|
allow: m,
|
|
1256
|
-
prefix:
|
|
1257
|
-
suffix:
|
|
1258
|
-
}).value :
|
|
1259
|
-
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, {
|
|
1260
1339
|
value: G,
|
|
1261
|
-
cursor:
|
|
1262
|
-
completed:
|
|
1263
|
-
} =
|
|
1264
|
-
|
|
1340
|
+
cursor: gt,
|
|
1341
|
+
completed: Tt
|
|
1342
|
+
} = C ? Ut(
|
|
1343
|
+
T,
|
|
1265
1344
|
A,
|
|
1266
|
-
|
|
1345
|
+
C,
|
|
1267
1346
|
{
|
|
1268
|
-
definitions:
|
|
1269
|
-
useDefaultDefinitions:
|
|
1347
|
+
definitions: V ?? {},
|
|
1348
|
+
useDefaultDefinitions: N ?? !0,
|
|
1270
1349
|
extraLiterals: nt ?? [],
|
|
1271
1350
|
autofix: st ?? "none",
|
|
1272
1351
|
completion: K ?? { mode: "mask" },
|
|
1273
|
-
pipe:
|
|
1352
|
+
pipe: w ?? ((Qt) => Qt),
|
|
1274
1353
|
unmask: q ?? { strategy: "none" },
|
|
1275
|
-
allowMode:
|
|
1354
|
+
allowMode: pt ?? "all",
|
|
1276
1355
|
allow: m,
|
|
1277
1356
|
prefix: Z,
|
|
1278
|
-
suffix:
|
|
1357
|
+
suffix: E
|
|
1279
1358
|
},
|
|
1280
|
-
|
|
1359
|
+
h.selectionStart ?? T.length,
|
|
1281
1360
|
t.cursor ? p.get(t.cursor) : void 0
|
|
1282
|
-
) : { value:
|
|
1283
|
-
if (G !==
|
|
1284
|
-
|
|
1361
|
+
) : { value: T, cursor: T.length, completed: !0 };
|
|
1362
|
+
if (G !== T) {
|
|
1363
|
+
h.value = G;
|
|
1285
1364
|
try {
|
|
1286
|
-
|
|
1365
|
+
h.setSelectionRange(gt, gt);
|
|
1287
1366
|
} catch {
|
|
1288
1367
|
}
|
|
1289
1368
|
}
|
|
1290
|
-
const
|
|
1369
|
+
const Ft = Qe(G, q);
|
|
1291
1370
|
c?.({
|
|
1292
|
-
raw:
|
|
1371
|
+
raw: Ft,
|
|
1293
1372
|
conformed: G,
|
|
1294
|
-
completed:
|
|
1295
|
-
cursor:
|
|
1296
|
-
}),
|
|
1373
|
+
completed: Tt,
|
|
1374
|
+
cursor: gt
|
|
1375
|
+
}), k === "input" ? r?.(G) : (n?.(G), Tt && a?.({ raw: Ft, conformed: G }));
|
|
1297
1376
|
};
|
|
1298
|
-
return
|
|
1377
|
+
return z(
|
|
1299
1378
|
O({
|
|
1300
1379
|
...t,
|
|
1301
1380
|
input: Q.text(
|
|
1302
|
-
|
|
1303
|
-
l.value(
|
|
1381
|
+
H(t),
|
|
1382
|
+
l.value(S),
|
|
1304
1383
|
l.class("bc-input"),
|
|
1305
|
-
s != null ?
|
|
1306
|
-
|
|
1307
|
-
(
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
if (
|
|
1312
|
-
const A =
|
|
1313
|
-
if (A !==
|
|
1314
|
-
const
|
|
1315
|
-
if (!
|
|
1316
|
-
const nt = o != null ? p.get(o) : void 0, st = u != null ? p.get(u) : !0, K =
|
|
1317
|
-
typeof
|
|
1318
|
-
raw:
|
|
1319
|
-
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,
|
|
1320
1399
|
cursor: A,
|
|
1321
1400
|
completed: !1
|
|
1322
|
-
}) :
|
|
1401
|
+
}) : N,
|
|
1323
1402
|
nt ?? {},
|
|
1324
1403
|
st ?? !0
|
|
1325
1404
|
), Z = /* @__PURE__ */ new Set();
|
|
1326
|
-
for (const
|
|
1327
|
-
|
|
1328
|
-
if (K) for (const
|
|
1329
|
-
if (q) for (const
|
|
1330
|
-
if (Z.has(
|
|
1331
|
-
let
|
|
1332
|
-
for (;
|
|
1333
|
-
|
|
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"));
|
|
1334
1413
|
}
|
|
1335
1414
|
})
|
|
1336
|
-
) :
|
|
1415
|
+
) : F
|
|
1337
1416
|
)
|
|
1338
1417
|
)
|
|
1339
1418
|
})
|
|
1340
1419
|
);
|
|
1341
1420
|
};
|
|
1342
1421
|
function J(t, e, s) {
|
|
1343
|
-
const n = p.map(t, (c) => c != null), r =
|
|
1344
|
-
return
|
|
1422
|
+
const n = p.map(t, (c) => c != null), r = It.clearValue;
|
|
1423
|
+
return z(
|
|
1345
1424
|
X(() => p.dispose(n)),
|
|
1346
|
-
|
|
1425
|
+
L(
|
|
1347
1426
|
n,
|
|
1348
|
-
() =>
|
|
1427
|
+
() => y.button(
|
|
1349
1428
|
l.type("button"),
|
|
1350
1429
|
l.class("bc-input-container__reset"),
|
|
1351
|
-
|
|
1430
|
+
R.label(r),
|
|
1352
1431
|
l.title(r),
|
|
1353
1432
|
l.disabled(e ?? !1),
|
|
1354
|
-
|
|
1355
|
-
|
|
1433
|
+
U({ icon: "mdi:close", size: "sm" }),
|
|
1434
|
+
I.click((c) => {
|
|
1356
1435
|
c.preventDefault(), c.stopPropagation(), s?.(null);
|
|
1357
1436
|
})
|
|
1358
1437
|
)
|
|
@@ -1364,13 +1443,13 @@ const Sn = (t) => {
|
|
|
1364
1443
|
return O({
|
|
1365
1444
|
...t,
|
|
1366
1445
|
input: Q.date(
|
|
1367
|
-
|
|
1446
|
+
H(t),
|
|
1368
1447
|
l.valueAsDate(e),
|
|
1369
1448
|
l.class("bc-input"),
|
|
1370
|
-
s != null ?
|
|
1371
|
-
n != null ?
|
|
1449
|
+
s != null ? I.blur(j(s)) : F,
|
|
1450
|
+
n != null ? I.change(ne(n)) : F
|
|
1372
1451
|
),
|
|
1373
|
-
after: r != null ?
|
|
1452
|
+
after: r != null ? z(a, r) : a
|
|
1374
1453
|
});
|
|
1375
1454
|
}, Je = (t) => {
|
|
1376
1455
|
const e = t.getFullYear(), s = t.getMonth() + 1, n = t.getDate(), r = t.getHours(), c = t.getMinutes(), a = t.getSeconds();
|
|
@@ -1380,15 +1459,15 @@ const Sn = (t) => {
|
|
|
1380
1459
|
return O({
|
|
1381
1460
|
...t,
|
|
1382
1461
|
input: Q["datetime-local"](
|
|
1383
|
-
|
|
1462
|
+
H(t),
|
|
1384
1463
|
l.value(p.map(a, (o) => o ?? null)),
|
|
1385
1464
|
l.class("bc-input"),
|
|
1386
|
-
s != null ?
|
|
1387
|
-
n != null ?
|
|
1465
|
+
s != null ? I.blur(j(s)) : F,
|
|
1466
|
+
n != null ? I.change(se(n)) : F
|
|
1388
1467
|
),
|
|
1389
|
-
after: r != null ?
|
|
1468
|
+
after: r != null ? z(i, r) : i
|
|
1390
1469
|
});
|
|
1391
|
-
},
|
|
1470
|
+
}, Nt = (t) => typeof t == "string" && t.trim() === "" ? null : t, Ke = (t) => t ?? "";
|
|
1392
1471
|
function et(t) {
|
|
1393
1472
|
return (e) => {
|
|
1394
1473
|
const { value: s, onBlur: n, onChange: r, onInput: c, after: a, disabled: i, ...o } = e, u = J(s, i, r);
|
|
@@ -1396,10 +1475,10 @@ function et(t) {
|
|
|
1396
1475
|
...o,
|
|
1397
1476
|
disabled: i,
|
|
1398
1477
|
value: p.map(s, Ke),
|
|
1399
|
-
onChange: r != null ? (
|
|
1400
|
-
onInput: c != null ? (
|
|
1478
|
+
onChange: r != null ? (d) => r(Nt(d)) : void 0,
|
|
1479
|
+
onInput: c != null ? (d) => c(Nt(d)) : void 0,
|
|
1401
1480
|
onBlur: n,
|
|
1402
|
-
after: a != null ?
|
|
1481
|
+
after: a != null ? z(u, a) : u
|
|
1403
1482
|
});
|
|
1404
1483
|
};
|
|
1405
1484
|
}
|
|
@@ -1408,225 +1487,225 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1408
1487
|
return O({
|
|
1409
1488
|
baseContainer: !0,
|
|
1410
1489
|
...t,
|
|
1411
|
-
input:
|
|
1490
|
+
input: y.textarea(
|
|
1412
1491
|
l.class(
|
|
1413
|
-
|
|
1492
|
+
B(t.size ?? "md")(
|
|
1414
1493
|
(a) => ue(
|
|
1415
1494
|
!1,
|
|
1416
1495
|
a ?? "md"
|
|
1417
1496
|
)
|
|
1418
1497
|
)
|
|
1419
1498
|
),
|
|
1420
|
-
|
|
1499
|
+
H(t),
|
|
1421
1500
|
l.rows(c ?? 3),
|
|
1422
1501
|
l.value(e),
|
|
1423
1502
|
l.class("bc-input"),
|
|
1424
|
-
s != null ?
|
|
1425
|
-
n != null ?
|
|
1426
|
-
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
|
|
1427
1506
|
)
|
|
1428
1507
|
});
|
|
1429
1508
|
}, Bn = et(
|
|
1430
1509
|
tn
|
|
1431
1510
|
), Ln = (t) => {
|
|
1432
|
-
const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i, after: o } = t, u = (
|
|
1433
|
-
const
|
|
1434
|
-
return
|
|
1435
|
-
},
|
|
1436
|
-
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(
|
|
1437
1516
|
e,
|
|
1438
1517
|
n
|
|
1439
|
-
)((
|
|
1518
|
+
)((x, m) => m == null ? !0 : (x ?? 0) > m), w = B(
|
|
1440
1519
|
e,
|
|
1441
1520
|
r
|
|
1442
|
-
)((
|
|
1443
|
-
const m = p.get(e) ?? 0, M = p.get(s),
|
|
1444
|
-
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)
|
|
1445
1524
|
return;
|
|
1446
|
-
const
|
|
1447
|
-
|
|
1448
|
-
},
|
|
1449
|
-
const m = p.get(e) ?? 0, M = p.get(s),
|
|
1450
|
-
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)
|
|
1451
1530
|
return;
|
|
1452
|
-
const
|
|
1453
|
-
|
|
1531
|
+
const h = u(S);
|
|
1532
|
+
h !== m && a && a(h);
|
|
1454
1533
|
};
|
|
1455
|
-
return
|
|
1534
|
+
return ct(
|
|
1456
1535
|
l.class("bc-number-input-steppers"),
|
|
1457
1536
|
// Increment second
|
|
1458
|
-
|
|
1537
|
+
y.button(
|
|
1459
1538
|
l.type("button"),
|
|
1460
1539
|
l.class(
|
|
1461
1540
|
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
|
|
1462
1541
|
),
|
|
1463
1542
|
l.disabled(
|
|
1464
|
-
|
|
1465
|
-
|
|
1543
|
+
B(
|
|
1544
|
+
w,
|
|
1466
1545
|
t.disabled ?? !1
|
|
1467
|
-
)((
|
|
1546
|
+
)((x, m) => !x || m)
|
|
1468
1547
|
),
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1548
|
+
I.click((x) => $(x)),
|
|
1549
|
+
R.label(g.$.incrementValue),
|
|
1550
|
+
U({ icon: "line-md:plus", size: "xs" })
|
|
1472
1551
|
),
|
|
1473
1552
|
// Decrement first (matches tests expecting first button to be decrement)
|
|
1474
|
-
|
|
1553
|
+
y.button(
|
|
1475
1554
|
l.type("button"),
|
|
1476
1555
|
l.class(
|
|
1477
1556
|
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
|
|
1478
1557
|
),
|
|
1479
1558
|
l.disabled(
|
|
1480
|
-
|
|
1481
|
-
|
|
1559
|
+
B(
|
|
1560
|
+
f,
|
|
1482
1561
|
t.disabled ?? !1
|
|
1483
|
-
)((
|
|
1562
|
+
)((x, m) => !x || m)
|
|
1484
1563
|
),
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1564
|
+
I.click((x) => _(x)),
|
|
1565
|
+
R.label(g.$.decrementValue),
|
|
1566
|
+
U({ icon: "line-md:minus", size: "xs" })
|
|
1488
1567
|
)
|
|
1489
1568
|
);
|
|
1490
|
-
}) : null,
|
|
1569
|
+
}) : null, b = o != null && d != null ? z(d, o) : o ?? d;
|
|
1491
1570
|
return O({
|
|
1492
1571
|
...t,
|
|
1493
1572
|
input: Q.number(
|
|
1494
|
-
n != null ?
|
|
1573
|
+
n != null ? z(
|
|
1495
1574
|
l.min(n),
|
|
1496
1575
|
X(
|
|
1497
|
-
p.on(n, (
|
|
1498
|
-
|
|
1576
|
+
p.on(n, (g) => {
|
|
1577
|
+
g < p.get(e);
|
|
1499
1578
|
})
|
|
1500
1579
|
)
|
|
1501
|
-
) :
|
|
1502
|
-
r != null ?
|
|
1580
|
+
) : F,
|
|
1581
|
+
r != null ? z(
|
|
1503
1582
|
l.max(r),
|
|
1504
1583
|
X(
|
|
1505
|
-
p.on(r, (
|
|
1506
|
-
|
|
1584
|
+
p.on(r, (g) => {
|
|
1585
|
+
g > p.get(e);
|
|
1507
1586
|
})
|
|
1508
1587
|
)
|
|
1509
|
-
) :
|
|
1510
|
-
|
|
1588
|
+
) : F,
|
|
1589
|
+
H(t),
|
|
1511
1590
|
l.valueAsNumber(e),
|
|
1512
1591
|
l.step(s),
|
|
1513
1592
|
l.class("bc-input bc-number-input"),
|
|
1514
|
-
c != null ?
|
|
1515
|
-
a != null ?
|
|
1516
|
-
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,
|
|
1517
1596
|
// Add wheel event support when step is defined
|
|
1518
|
-
s != null ?
|
|
1519
|
-
|
|
1520
|
-
const
|
|
1521
|
-
|
|
1522
|
-
}) :
|
|
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
|
|
1523
1602
|
),
|
|
1524
|
-
after:
|
|
1603
|
+
after: b
|
|
1525
1604
|
});
|
|
1526
|
-
},
|
|
1605
|
+
}, Ot = (t) => {
|
|
1527
1606
|
if (t == null || t === "") return null;
|
|
1528
1607
|
const e = Number(t);
|
|
1529
1608
|
return Number.isNaN(e) ? null : e;
|
|
1530
|
-
},
|
|
1531
|
-
const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i, after: o } = t, u = (
|
|
1532
|
-
const
|
|
1533
|
-
return
|
|
1534
|
-
},
|
|
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 = (() => {
|
|
1535
1614
|
if (s == null) return null;
|
|
1536
|
-
const
|
|
1615
|
+
const f = B(
|
|
1537
1616
|
e,
|
|
1538
1617
|
n
|
|
1539
1618
|
)((m, M) => {
|
|
1540
|
-
const
|
|
1541
|
-
return M == null ? !0 :
|
|
1542
|
-
}),
|
|
1619
|
+
const D = m ?? 0;
|
|
1620
|
+
return M == null ? !0 : D > M;
|
|
1621
|
+
}), w = B(
|
|
1543
1622
|
e,
|
|
1544
1623
|
r
|
|
1545
1624
|
)((m, M) => {
|
|
1546
|
-
const
|
|
1547
|
-
return M == null ? !0 :
|
|
1548
|
-
}),
|
|
1549
|
-
const M = p.get(e) ?? 0,
|
|
1550
|
-
if (
|
|
1551
|
-
const
|
|
1552
|
-
|
|
1553
|
-
},
|
|
1554
|
-
const M = p.get(e) ?? 0,
|
|
1555
|
-
if (
|
|
1556
|
-
const
|
|
1557
|
-
|
|
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);
|
|
1558
1637
|
};
|
|
1559
|
-
return ((m, M) =>
|
|
1638
|
+
return ((m, M) => ct(
|
|
1560
1639
|
l.class("bc-number-input-steppers"),
|
|
1561
|
-
|
|
1640
|
+
y.button(
|
|
1562
1641
|
l.type("button"),
|
|
1563
1642
|
l.class(
|
|
1564
1643
|
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"
|
|
1565
1644
|
),
|
|
1566
1645
|
l.disabled(
|
|
1567
|
-
|
|
1568
|
-
|
|
1646
|
+
B(
|
|
1647
|
+
w,
|
|
1569
1648
|
t.disabled ?? !1
|
|
1570
|
-
)((
|
|
1649
|
+
)((D, S) => !D || S)
|
|
1571
1650
|
),
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1651
|
+
I.click((D) => $(D)),
|
|
1652
|
+
R.label(m),
|
|
1653
|
+
U({ icon: "line-md:plus", size: "xs" })
|
|
1575
1654
|
),
|
|
1576
|
-
|
|
1655
|
+
y.button(
|
|
1577
1656
|
l.type("button"),
|
|
1578
1657
|
l.class(
|
|
1579
1658
|
"bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"
|
|
1580
1659
|
),
|
|
1581
1660
|
l.disabled(
|
|
1582
|
-
|
|
1583
|
-
|
|
1661
|
+
B(
|
|
1662
|
+
f,
|
|
1584
1663
|
t.disabled ?? !1
|
|
1585
|
-
)((
|
|
1664
|
+
)((D, S) => !D || S)
|
|
1586
1665
|
),
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1666
|
+
I.click((D) => _(D)),
|
|
1667
|
+
R.label(M),
|
|
1668
|
+
U({ icon: "line-md:minus", size: "xs" })
|
|
1590
1669
|
)
|
|
1591
1670
|
))(
|
|
1592
|
-
|
|
1593
|
-
|
|
1671
|
+
It.incrementValue,
|
|
1672
|
+
It.decrementValue
|
|
1594
1673
|
);
|
|
1595
|
-
})(),
|
|
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;
|
|
1596
1675
|
return O({
|
|
1597
1676
|
...t,
|
|
1598
1677
|
input: Q.number(
|
|
1599
1678
|
// min/max attributes and reactive watchers (no forced correction)
|
|
1600
|
-
n != null ? l.min(n) :
|
|
1601
|
-
r != null ? l.max(r) :
|
|
1602
|
-
|
|
1679
|
+
n != null ? l.min(n) : F,
|
|
1680
|
+
r != null ? l.max(r) : F,
|
|
1681
|
+
H(t),
|
|
1603
1682
|
// Represent null as empty string so the field can be cleared
|
|
1604
|
-
l.value(p.map(e, (
|
|
1683
|
+
l.value(p.map(e, (f) => f == null ? "" : String(f))),
|
|
1605
1684
|
l.step(s),
|
|
1606
1685
|
l.class("bc-input bc-number-input"),
|
|
1607
|
-
c != null ?
|
|
1608
|
-
a != null ?
|
|
1609
|
-
|
|
1610
|
-
const
|
|
1611
|
-
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);
|
|
1612
1691
|
})
|
|
1613
|
-
) :
|
|
1614
|
-
i != null ?
|
|
1615
|
-
|
|
1616
|
-
const
|
|
1617
|
-
i(
|
|
1692
|
+
) : F,
|
|
1693
|
+
i != null ? I.input(
|
|
1694
|
+
j((f) => {
|
|
1695
|
+
const w = Ot(f);
|
|
1696
|
+
i(w);
|
|
1618
1697
|
})
|
|
1619
|
-
) :
|
|
1698
|
+
) : F,
|
|
1620
1699
|
// Wheel support when step is defined
|
|
1621
|
-
s != null ?
|
|
1622
|
-
|
|
1623
|
-
const
|
|
1624
|
-
m !==
|
|
1625
|
-
}) :
|
|
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
|
|
1626
1705
|
),
|
|
1627
|
-
after:
|
|
1706
|
+
after: g
|
|
1628
1707
|
});
|
|
1629
|
-
},
|
|
1708
|
+
}, En = ({
|
|
1630
1709
|
value: t,
|
|
1631
1710
|
onChange: e,
|
|
1632
1711
|
onInput: s,
|
|
@@ -1637,89 +1716,89 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1637
1716
|
size: i = "md",
|
|
1638
1717
|
id: o,
|
|
1639
1718
|
color: u = "primary",
|
|
1640
|
-
tabIndex:
|
|
1719
|
+
tabIndex: d = 0
|
|
1641
1720
|
}) => {
|
|
1642
|
-
const
|
|
1643
|
-
function
|
|
1721
|
+
const b = o ?? be("switch");
|
|
1722
|
+
function g($, x) {
|
|
1644
1723
|
const m = [
|
|
1645
1724
|
"bc-switch",
|
|
1646
|
-
`bc-switch--size-${
|
|
1647
|
-
`bc-switch--${
|
|
1725
|
+
`bc-switch--size-${x}`,
|
|
1726
|
+
`bc-switch--${x}`
|
|
1648
1727
|
];
|
|
1649
|
-
return
|
|
1728
|
+
return $ && m.push("bc-switch--disabled"), m.join(" ");
|
|
1650
1729
|
}
|
|
1651
|
-
function
|
|
1652
|
-
const
|
|
1653
|
-
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(
|
|
1654
1733
|
"--switch-track-on-border-dark",
|
|
1655
|
-
|
|
1656
|
-
), Array.from(m.entries()).map(([
|
|
1734
|
+
de(x, "dark")
|
|
1735
|
+
), Array.from(m.entries()).map(([S, v]) => `${S}: ${v}`).join("; ");
|
|
1657
1736
|
}
|
|
1658
|
-
const
|
|
1737
|
+
const w = () => {
|
|
1659
1738
|
p.get(a) || (e?.(!p.get(t)), s?.(!p.get(t)));
|
|
1660
|
-
},
|
|
1661
|
-
p.get(a) || (
|
|
1739
|
+
}, _ = ($) => {
|
|
1740
|
+
p.get(a) || ($.key === " " || $.key === "Enter") && ($.preventDefault(), w());
|
|
1662
1741
|
};
|
|
1663
|
-
return
|
|
1742
|
+
return y.div(
|
|
1664
1743
|
l.class(
|
|
1665
|
-
|
|
1744
|
+
B(
|
|
1666
1745
|
a ?? !1,
|
|
1667
1746
|
i
|
|
1668
1747
|
)(
|
|
1669
|
-
(
|
|
1748
|
+
($, x) => g($ ?? !1, x ?? "md")
|
|
1670
1749
|
)
|
|
1671
1750
|
),
|
|
1672
1751
|
l.style(
|
|
1673
|
-
|
|
1674
|
-
(
|
|
1752
|
+
B(u)(
|
|
1753
|
+
($) => f($)
|
|
1675
1754
|
)
|
|
1676
1755
|
),
|
|
1677
|
-
l.id(
|
|
1756
|
+
l.id(b),
|
|
1678
1757
|
l.role("switch"),
|
|
1679
1758
|
l.tabindex(
|
|
1680
|
-
|
|
1759
|
+
B(
|
|
1681
1760
|
a ?? !1,
|
|
1682
|
-
|
|
1683
|
-
)((
|
|
1761
|
+
d
|
|
1762
|
+
)(($, x) => $ ? -1 : x ?? 0)
|
|
1684
1763
|
),
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
n != null ?
|
|
1690
|
-
|
|
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(
|
|
1691
1770
|
l.class("bc-switch__track"),
|
|
1692
1771
|
l.class(
|
|
1693
1772
|
p.map(
|
|
1694
1773
|
t,
|
|
1695
|
-
(
|
|
1774
|
+
($) => $ ? "bc-switch__track--on" : "bc-switch__track--off"
|
|
1696
1775
|
)
|
|
1697
1776
|
),
|
|
1698
|
-
r != null ?
|
|
1699
|
-
|
|
1777
|
+
r != null ? y.div(
|
|
1778
|
+
R.hidden(!0),
|
|
1700
1779
|
l.class("bc-switch__track-label bc-switch__track-label--off"),
|
|
1701
1780
|
l.class(
|
|
1702
1781
|
p.map(
|
|
1703
1782
|
t,
|
|
1704
|
-
(
|
|
1783
|
+
($) => $ ? "bc-switch__track-label--hidden" : "bc-switch__track-label--visible"
|
|
1705
1784
|
)
|
|
1706
1785
|
),
|
|
1707
1786
|
r
|
|
1708
1787
|
) : null,
|
|
1709
|
-
c != null ?
|
|
1788
|
+
c != null ? y.div(
|
|
1710
1789
|
l.class("bc-switch__track-label bc-switch__track-label--on"),
|
|
1711
1790
|
l.class(
|
|
1712
1791
|
p.map(
|
|
1713
1792
|
t,
|
|
1714
|
-
(
|
|
1793
|
+
($) => $ ? "bc-switch__track-label--visible" : "bc-switch__track-label--hidden"
|
|
1715
1794
|
)
|
|
1716
1795
|
),
|
|
1717
1796
|
c
|
|
1718
1797
|
) : null,
|
|
1719
|
-
|
|
1720
|
-
(
|
|
1798
|
+
Ht(
|
|
1799
|
+
($) => P(
|
|
1721
1800
|
pe,
|
|
1722
|
-
({ direction:
|
|
1801
|
+
({ direction: x }) => y.div(
|
|
1723
1802
|
l.class("bc-switch__thumb"),
|
|
1724
1803
|
l.class(
|
|
1725
1804
|
p.map(
|
|
@@ -1727,15 +1806,15 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1727
1806
|
(m) => m ? "bc-switch__thumb--on" : "bc-switch__thumb--off"
|
|
1728
1807
|
)
|
|
1729
1808
|
),
|
|
1730
|
-
|
|
1731
|
-
|
|
1809
|
+
ht.transform(
|
|
1810
|
+
B(
|
|
1732
1811
|
t,
|
|
1733
|
-
|
|
1812
|
+
$,
|
|
1734
1813
|
i,
|
|
1735
|
-
|
|
1736
|
-
)((m, { width: M },
|
|
1814
|
+
x
|
|
1815
|
+
)((m, { width: M }, D, S) => {
|
|
1737
1816
|
const v = (() => {
|
|
1738
|
-
switch (
|
|
1817
|
+
switch (D) {
|
|
1739
1818
|
case "xs":
|
|
1740
1819
|
return 5;
|
|
1741
1820
|
case "sm":
|
|
@@ -1747,8 +1826,8 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1747
1826
|
case "xl":
|
|
1748
1827
|
return 8;
|
|
1749
1828
|
}
|
|
1750
|
-
})(),
|
|
1751
|
-
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)";
|
|
1752
1831
|
})
|
|
1753
1832
|
)
|
|
1754
1833
|
)
|
|
@@ -1762,7 +1841,7 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1762
1841
|
pattern: /[0-9A-Fa-f]/,
|
|
1763
1842
|
transform: (n) => n.toLowerCase()
|
|
1764
1843
|
};
|
|
1765
|
-
return
|
|
1844
|
+
return Gt({
|
|
1766
1845
|
...t,
|
|
1767
1846
|
mask: [
|
|
1768
1847
|
e,
|
|
@@ -1805,7 +1884,7 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1805
1884
|
// Sensible default placeholder; can be overridden via options.placeholder
|
|
1806
1885
|
placeholder: t.placeholder ?? "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
1807
1886
|
});
|
|
1808
|
-
},
|
|
1887
|
+
}, Rn = et(en), nn = "line-md:star-alt-filled", sn = "line-md:star-alt", rn = (t) => {
|
|
1809
1888
|
const {
|
|
1810
1889
|
value: e,
|
|
1811
1890
|
onChange: s,
|
|
@@ -1816,42 +1895,42 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1816
1895
|
fullIcon: i = nn,
|
|
1817
1896
|
emptyIcon: o = sn,
|
|
1818
1897
|
size: u = "md",
|
|
1819
|
-
onBlur:
|
|
1820
|
-
rounding:
|
|
1821
|
-
} = t,
|
|
1822
|
-
const m = p.get(
|
|
1898
|
+
onBlur: d,
|
|
1899
|
+
rounding: b = 1
|
|
1900
|
+
} = t, g = () => {
|
|
1901
|
+
const m = p.get(b);
|
|
1823
1902
|
return m > 0 ? m : 1;
|
|
1824
|
-
},
|
|
1903
|
+
}, f = (m) => Math.min(Math.max(m, 0), p.get(r)), w = (m, M) => {
|
|
1825
1904
|
if (p.get(n ?? !1)) return;
|
|
1826
|
-
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);
|
|
1827
1906
|
s?.(A);
|
|
1828
|
-
},
|
|
1907
|
+
}, _ = (m) => {
|
|
1829
1908
|
if (p.get(n ?? !1)) return;
|
|
1830
|
-
const M =
|
|
1831
|
-
let
|
|
1909
|
+
const M = g(), D = p.get(e) ?? 0;
|
|
1910
|
+
let S;
|
|
1832
1911
|
switch (m.key) {
|
|
1833
1912
|
case "ArrowRight":
|
|
1834
1913
|
case "ArrowUp":
|
|
1835
|
-
|
|
1914
|
+
S = f(D + M);
|
|
1836
1915
|
break;
|
|
1837
1916
|
case "ArrowLeft":
|
|
1838
1917
|
case "ArrowDown":
|
|
1839
|
-
|
|
1918
|
+
S = f(D - M);
|
|
1840
1919
|
break;
|
|
1841
1920
|
case "Home":
|
|
1842
|
-
|
|
1921
|
+
S = 0;
|
|
1843
1922
|
break;
|
|
1844
1923
|
case "End":
|
|
1845
|
-
|
|
1924
|
+
S = p.get(r);
|
|
1846
1925
|
break;
|
|
1847
1926
|
default:
|
|
1848
1927
|
return;
|
|
1849
1928
|
}
|
|
1850
|
-
m.preventDefault(), s?.(
|
|
1851
|
-
},
|
|
1929
|
+
m.preventDefault(), s?.(S);
|
|
1930
|
+
}, $ = p.map(u, (m) => `bc-icon--${m}`), x = ({ index: m, counter: M }) => y.span(
|
|
1852
1931
|
l.class("bc-rating-input__icon-container"),
|
|
1853
|
-
l.class(
|
|
1854
|
-
|
|
1932
|
+
l.class($),
|
|
1933
|
+
U(
|
|
1855
1934
|
{
|
|
1856
1935
|
icon: o,
|
|
1857
1936
|
size: u,
|
|
@@ -1860,16 +1939,16 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1860
1939
|
},
|
|
1861
1940
|
l.class("bc-rating-input__icon-empty")
|
|
1862
1941
|
),
|
|
1863
|
-
|
|
1942
|
+
y.span(
|
|
1864
1943
|
l.class("bc-rating-input__icon-clipper"),
|
|
1865
|
-
l.class(
|
|
1866
|
-
|
|
1867
|
-
p.map(e, (
|
|
1868
|
-
const
|
|
1869
|
-
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}%`;
|
|
1870
1949
|
})
|
|
1871
1950
|
),
|
|
1872
|
-
|
|
1951
|
+
U(
|
|
1873
1952
|
{
|
|
1874
1953
|
icon: i,
|
|
1875
1954
|
size: u,
|
|
@@ -1879,8 +1958,8 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1879
1958
|
l.class("bc-rating-input__icon-full")
|
|
1880
1959
|
)
|
|
1881
1960
|
),
|
|
1882
|
-
|
|
1883
|
-
|
|
1961
|
+
I.click(
|
|
1962
|
+
re((D) => w(D, M), {
|
|
1884
1963
|
preventDefault: !0,
|
|
1885
1964
|
stopPropagation: !0
|
|
1886
1965
|
})
|
|
@@ -1891,30 +1970,30 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1891
1970
|
growInput: !1,
|
|
1892
1971
|
focusableSelector: '[role="slider"]',
|
|
1893
1972
|
...t,
|
|
1894
|
-
input:
|
|
1973
|
+
input: y.div(
|
|
1895
1974
|
// Common input attributes (id, required, invalid, custom classes, etc.)
|
|
1896
|
-
|
|
1975
|
+
H(t),
|
|
1897
1976
|
l.class("bc-rating-input"),
|
|
1898
1977
|
// ARIA slider semantics
|
|
1899
1978
|
l.role("slider"),
|
|
1900
1979
|
l.tabindex(p.map(n ?? !1, (m) => m ? -1 : 0)),
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
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(
|
|
1907
1986
|
e,
|
|
1908
1987
|
r
|
|
1909
1988
|
)((m, M) => {
|
|
1910
|
-
const
|
|
1911
|
-
return `${String(
|
|
1989
|
+
const D = m ?? 0, S = M ?? 0;
|
|
1990
|
+
return `${String(D)} / ${String(S)}`;
|
|
1912
1991
|
})
|
|
1913
1992
|
),
|
|
1914
1993
|
// Keyboard & focus handlers
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1994
|
+
I.keydown(_),
|
|
1995
|
+
d != null ? I.blur(d) : null,
|
|
1996
|
+
jt(r, x)
|
|
1918
1997
|
)
|
|
1919
1998
|
});
|
|
1920
1999
|
}, Un = (t) => {
|
|
@@ -1926,7 +2005,7 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1926
2005
|
// Pass through numeric changes; clear button will call onChange(null)
|
|
1927
2006
|
onChange: s,
|
|
1928
2007
|
onBlur: n,
|
|
1929
|
-
after: r != null ?
|
|
2008
|
+
after: r != null ? z(i, r) : i
|
|
1930
2009
|
});
|
|
1931
2010
|
}, Nn = (t) => {
|
|
1932
2011
|
const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i } = t;
|
|
@@ -1934,71 +2013,71 @@ const Fn = et(he), An = et(ie), Vn = et(ge), tn = (t) => {
|
|
|
1934
2013
|
...t,
|
|
1935
2014
|
// Make sure clicks anywhere focus the range input
|
|
1936
2015
|
focusableSelector: 'input[type="range"]',
|
|
1937
|
-
input:
|
|
2016
|
+
input: y.input(
|
|
1938
2017
|
l.type("range"),
|
|
1939
|
-
|
|
2018
|
+
H(t),
|
|
1940
2019
|
l.min(n),
|
|
1941
2020
|
l.max(r),
|
|
1942
2021
|
l.step(s),
|
|
1943
2022
|
// Using value as number to keep it in sync
|
|
1944
2023
|
l.valueAsNumber(e),
|
|
1945
2024
|
l.class("bc-input bc-slider-input"),
|
|
1946
|
-
c != null ?
|
|
1947
|
-
a != null ?
|
|
1948
|
-
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
|
|
1949
2028
|
)
|
|
1950
2029
|
});
|
|
1951
2030
|
}, On = (t) => {
|
|
1952
|
-
const { value: e, step: s, min: n, max: r, onBlur: c, onChange: a, onInput: i } = t, o = p.map(e, (
|
|
1953
|
-
if (
|
|
1954
|
-
const
|
|
1955
|
-
return typeof
|
|
1956
|
-
}), u = J(e, t.disabled, (
|
|
1957
|
-
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);
|
|
1958
2037
|
});
|
|
1959
2038
|
return O(
|
|
1960
2039
|
{
|
|
1961
2040
|
...t,
|
|
1962
2041
|
focusableSelector: 'input[type="range"]',
|
|
1963
2042
|
after: u,
|
|
1964
|
-
input:
|
|
2043
|
+
input: y.input(
|
|
1965
2044
|
l.type("range"),
|
|
1966
|
-
|
|
2045
|
+
H(t),
|
|
1967
2046
|
l.min(n),
|
|
1968
2047
|
l.max(r),
|
|
1969
2048
|
l.step(s),
|
|
1970
2049
|
l.valueAsNumber(o),
|
|
1971
2050
|
l.class("bc-input bc-slider-input"),
|
|
1972
|
-
c != null ?
|
|
1973
|
-
a != null ?
|
|
1974
|
-
Y((
|
|
1975
|
-
a(
|
|
2051
|
+
c != null ? I.blur(Y(c)) : F,
|
|
2052
|
+
a != null ? I.change(
|
|
2053
|
+
Y((d) => {
|
|
2054
|
+
a(d);
|
|
1976
2055
|
})
|
|
1977
|
-
) :
|
|
1978
|
-
i != null ?
|
|
1979
|
-
Y((
|
|
1980
|
-
i(
|
|
2056
|
+
) : F,
|
|
2057
|
+
i != null ? I.input(
|
|
2058
|
+
Y((d) => {
|
|
2059
|
+
i(d);
|
|
1981
2060
|
})
|
|
1982
|
-
) :
|
|
2061
|
+
) : F
|
|
1983
2062
|
)
|
|
1984
2063
|
},
|
|
1985
2064
|
// Ensure container grows input naturally
|
|
1986
|
-
|
|
2065
|
+
z()
|
|
1987
2066
|
);
|
|
1988
2067
|
};
|
|
1989
|
-
let
|
|
1990
|
-
async function
|
|
2068
|
+
let kt = null;
|
|
2069
|
+
async function Dt() {
|
|
1991
2070
|
const t = globalThis;
|
|
1992
|
-
return t.Temporal ? t.Temporal : (
|
|
2071
|
+
return t.Temporal ? t.Temporal : (kt || (kt = import("./index.esm-DPNh6inz.js").then((e) => {
|
|
1993
2072
|
const s = e.Temporal;
|
|
1994
2073
|
return t.Temporal || (t.Temporal = s), s;
|
|
1995
|
-
})),
|
|
2074
|
+
})), kt);
|
|
1996
2075
|
}
|
|
1997
|
-
const an = (t, e) => e ?
|
|
2076
|
+
const an = (t, e) => e ? Bt(Dt, {
|
|
1998
2077
|
then: t,
|
|
1999
2078
|
pending: e.pending,
|
|
2000
2079
|
error: e.error
|
|
2001
|
-
}) :
|
|
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;
|
|
2002
2081
|
function cn(t) {
|
|
2003
2082
|
return {
|
|
2004
2083
|
mask: null,
|
|
@@ -2022,7 +2101,7 @@ function cn(t) {
|
|
|
2022
2101
|
}
|
|
2023
2102
|
};
|
|
2024
2103
|
}
|
|
2025
|
-
const
|
|
2104
|
+
const Pt = (t, e) => {
|
|
2026
2105
|
if (t == null) return null;
|
|
2027
2106
|
try {
|
|
2028
2107
|
return t.Duration.from(e);
|
|
@@ -2032,13 +2111,13 @@ const Ot = (t, e) => {
|
|
|
2032
2111
|
}, Pn = (t) => {
|
|
2033
2112
|
const { value: e, onChange: s, after: n, disabled: r, onBlur: c } = t, a = () => {
|
|
2034
2113
|
const u = J(e, r, s);
|
|
2035
|
-
return n != null ?
|
|
2036
|
-
}, i = t.placeholder != null ?
|
|
2114
|
+
return n != null ? z(u, n) : u;
|
|
2115
|
+
}, i = t.placeholder != null ? F : l.placeholder("P0DT0H0M0S");
|
|
2037
2116
|
return an(
|
|
2038
|
-
(u) =>
|
|
2117
|
+
(u) => Gt({
|
|
2039
2118
|
...t,
|
|
2040
|
-
value: p.map(e, (
|
|
2041
|
-
onChange: s ? (
|
|
2119
|
+
value: p.map(e, (d) => d?.toString() ?? ""),
|
|
2120
|
+
onChange: s ? (d) => s(d === "" ? null : u.Duration.from(d)) : void 0,
|
|
2042
2121
|
onInput: void 0,
|
|
2043
2122
|
...cn(u.Duration.from),
|
|
2044
2123
|
placeholder: "P0DT0H0M0S",
|
|
@@ -2047,28 +2126,28 @@ const Ot = (t, e) => {
|
|
|
2047
2126
|
{ pending: () => O({
|
|
2048
2127
|
...t,
|
|
2049
2128
|
input: Q.text(
|
|
2050
|
-
|
|
2129
|
+
H(t),
|
|
2051
2130
|
l.value(p.map(e, (u) => u?.toString() ?? "")),
|
|
2052
2131
|
l.class("bc-input"),
|
|
2053
2132
|
i,
|
|
2054
|
-
c != null ?
|
|
2055
|
-
s != null ?
|
|
2056
|
-
const
|
|
2057
|
-
if (
|
|
2133
|
+
c != null ? I.blur(() => c()) : F,
|
|
2134
|
+
s != null ? I.change((u) => {
|
|
2135
|
+
const b = u.currentTarget?.value ?? "";
|
|
2136
|
+
if (b === "") {
|
|
2058
2137
|
s(null);
|
|
2059
2138
|
return;
|
|
2060
2139
|
}
|
|
2061
|
-
const
|
|
2062
|
-
if (
|
|
2063
|
-
s(
|
|
2140
|
+
const g = globalThis.Temporal, f = Pt(g, b);
|
|
2141
|
+
if (f != null) {
|
|
2142
|
+
s(f);
|
|
2064
2143
|
return;
|
|
2065
2144
|
}
|
|
2066
|
-
|
|
2067
|
-
const
|
|
2068
|
-
|
|
2145
|
+
Dt().then((w) => {
|
|
2146
|
+
const _ = Pt(w, b);
|
|
2147
|
+
_ != null && s(_);
|
|
2069
2148
|
}).catch(() => {
|
|
2070
2149
|
});
|
|
2071
|
-
}) :
|
|
2150
|
+
}) : F
|
|
2072
2151
|
),
|
|
2073
2152
|
after: a()
|
|
2074
2153
|
}) }
|
|
@@ -2078,12 +2157,12 @@ const Ot = (t, e) => {
|
|
|
2078
2157
|
return O({
|
|
2079
2158
|
...t,
|
|
2080
2159
|
input: Q.url(
|
|
2081
|
-
|
|
2160
|
+
H(t),
|
|
2082
2161
|
l.value(e),
|
|
2083
2162
|
l.class("bc-input"),
|
|
2084
|
-
s != null ?
|
|
2085
|
-
n != null ?
|
|
2086
|
-
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
|
|
2087
2166
|
)
|
|
2088
2167
|
});
|
|
2089
2168
|
}, jn = et(un), pn = (t) => {
|
|
@@ -2097,46 +2176,46 @@ const Ot = (t, e) => {
|
|
|
2097
2176
|
createItem: i,
|
|
2098
2177
|
addLabel: o,
|
|
2099
2178
|
controlsLayout: u = "aside",
|
|
2100
|
-
removeDisabled:
|
|
2101
|
-
addDisabled:
|
|
2102
|
-
} = t,
|
|
2103
|
-
const
|
|
2179
|
+
removeDisabled: d,
|
|
2180
|
+
addDisabled: b
|
|
2181
|
+
} = t, g = p.toSignal(u).map((_) => _ === "aside"), f = (_) => {
|
|
2182
|
+
const $ = L(
|
|
2104
2183
|
r ?? !1,
|
|
2105
|
-
() =>
|
|
2184
|
+
() => y.div(
|
|
2106
2185
|
l.class("bc-group--align-center"),
|
|
2107
2186
|
l.class(
|
|
2108
|
-
|
|
2187
|
+
g.map(
|
|
2109
2188
|
(m) => m ? "bc-group--direction-column bc-group--gap-1" : "bc-group--direction-row bc-group--gap-1"
|
|
2110
2189
|
)
|
|
2111
2190
|
),
|
|
2112
|
-
|
|
2191
|
+
vt(
|
|
2113
2192
|
{
|
|
2114
2193
|
size: "xs",
|
|
2115
2194
|
roundedness: "full",
|
|
2116
2195
|
variant: "text",
|
|
2117
|
-
onClick: () =>
|
|
2118
|
-
disabled:
|
|
2196
|
+
onClick: () => _.move("up"),
|
|
2197
|
+
disabled: _.cannotMove("up")
|
|
2119
2198
|
},
|
|
2120
|
-
|
|
2199
|
+
P(
|
|
2121
2200
|
W,
|
|
2122
|
-
(m) =>
|
|
2201
|
+
(m) => U({
|
|
2123
2202
|
size: "xs",
|
|
2124
2203
|
icon: "line-md:arrow-up",
|
|
2125
2204
|
title: m.$.incrementValue
|
|
2126
2205
|
})
|
|
2127
2206
|
)
|
|
2128
2207
|
),
|
|
2129
|
-
|
|
2208
|
+
vt(
|
|
2130
2209
|
{
|
|
2131
2210
|
size: "xs",
|
|
2132
2211
|
roundedness: "full",
|
|
2133
2212
|
variant: "text",
|
|
2134
|
-
onClick: () =>
|
|
2135
|
-
disabled:
|
|
2213
|
+
onClick: () => _.move("down"),
|
|
2214
|
+
disabled: _.cannotMove("down")
|
|
2136
2215
|
},
|
|
2137
|
-
|
|
2216
|
+
P(
|
|
2138
2217
|
W,
|
|
2139
|
-
(m) =>
|
|
2218
|
+
(m) => U({
|
|
2140
2219
|
size: "xs",
|
|
2141
2220
|
icon: "line-md:arrow-down",
|
|
2142
2221
|
title: m.$.decrementValue
|
|
@@ -2144,84 +2223,84 @@ const Ot = (t, e) => {
|
|
|
2144
2223
|
)
|
|
2145
2224
|
)
|
|
2146
2225
|
)
|
|
2147
|
-
),
|
|
2226
|
+
), x = L(
|
|
2148
2227
|
c,
|
|
2149
|
-
() =>
|
|
2228
|
+
() => P(
|
|
2150
2229
|
W,
|
|
2151
|
-
(m) =>
|
|
2230
|
+
(m) => mt({
|
|
2152
2231
|
size: "xs",
|
|
2153
2232
|
// Use a lowercase label to satisfy tests that query with [aria-label*="remove"]
|
|
2154
2233
|
label: p.map(m.$.removeItem, (M) => M.toLowerCase()),
|
|
2155
2234
|
color: "danger",
|
|
2156
|
-
disabled:
|
|
2157
|
-
onClick:
|
|
2235
|
+
disabled: d,
|
|
2236
|
+
onClick: _.remove
|
|
2158
2237
|
})
|
|
2159
2238
|
)
|
|
2160
2239
|
);
|
|
2161
|
-
return (m) =>
|
|
2162
|
-
|
|
2163
|
-
() =>
|
|
2240
|
+
return (m) => L(
|
|
2241
|
+
g,
|
|
2242
|
+
() => dt(
|
|
2164
2243
|
l.class("bc-group--gap-1 bc-group--align-center"),
|
|
2165
|
-
|
|
2166
|
-
|
|
2244
|
+
ct(l.class("bc-stack--grow"), m),
|
|
2245
|
+
ct(
|
|
2167
2246
|
l.class("bc-stack--align-center"),
|
|
2168
|
-
|
|
2247
|
+
L(
|
|
2169
2248
|
e.signal.map((M) => M.length > 1),
|
|
2170
|
-
() =>
|
|
2249
|
+
() => $
|
|
2171
2250
|
),
|
|
2172
|
-
|
|
2251
|
+
x
|
|
2173
2252
|
)
|
|
2174
2253
|
),
|
|
2175
|
-
() =>
|
|
2254
|
+
() => ct(
|
|
2176
2255
|
l.class("bc-stack--gap-2"),
|
|
2177
2256
|
m,
|
|
2178
|
-
|
|
2257
|
+
dt(
|
|
2179
2258
|
l.class("bc-group--gap-2 bc-group--justify-between"),
|
|
2180
|
-
|
|
2259
|
+
L(
|
|
2181
2260
|
e.signal.map((M) => M.length > 1),
|
|
2182
|
-
() =>
|
|
2183
|
-
() =>
|
|
2261
|
+
() => $,
|
|
2262
|
+
() => y.div()
|
|
2184
2263
|
),
|
|
2185
|
-
|
|
2264
|
+
x
|
|
2186
2265
|
)
|
|
2187
2266
|
)
|
|
2188
2267
|
);
|
|
2189
|
-
},
|
|
2190
|
-
|
|
2191
|
-
() =>
|
|
2268
|
+
}, w = L(
|
|
2269
|
+
B(a, i)((_, $) => _ && $ != null),
|
|
2270
|
+
() => dt(
|
|
2192
2271
|
l.class(
|
|
2193
2272
|
"bc-group--gap-2 bc-group--align-center bc-group--justify-center"
|
|
2194
2273
|
),
|
|
2195
|
-
|
|
2274
|
+
vt(
|
|
2196
2275
|
{
|
|
2197
2276
|
size: "sm",
|
|
2198
2277
|
variant: "filled",
|
|
2199
2278
|
onClick: () => e.push(i()),
|
|
2200
|
-
disabled:
|
|
2279
|
+
disabled: B(
|
|
2201
2280
|
e.disabled,
|
|
2202
|
-
|
|
2281
|
+
b ?? !1
|
|
2203
2282
|
)(
|
|
2204
|
-
(
|
|
2283
|
+
(_, $) => _ || $
|
|
2205
2284
|
)
|
|
2206
2285
|
},
|
|
2207
|
-
|
|
2286
|
+
P(
|
|
2208
2287
|
W,
|
|
2209
|
-
(
|
|
2288
|
+
(_) => dt(
|
|
2210
2289
|
l.class("bc-group--gap-2"),
|
|
2211
|
-
|
|
2212
|
-
o ??
|
|
2290
|
+
U({ icon: "line-md:plus" }),
|
|
2291
|
+
o ?? _.$.addLabel
|
|
2213
2292
|
)
|
|
2214
2293
|
)
|
|
2215
2294
|
)
|
|
2216
2295
|
)
|
|
2217
2296
|
);
|
|
2218
|
-
return
|
|
2297
|
+
return z(
|
|
2219
2298
|
Xe(
|
|
2220
2299
|
e,
|
|
2221
|
-
(
|
|
2300
|
+
(_) => f(_)(s(_)),
|
|
2222
2301
|
n
|
|
2223
2302
|
),
|
|
2224
|
-
|
|
2303
|
+
w
|
|
2225
2304
|
);
|
|
2226
2305
|
}, Hn = (t, ...e) => {
|
|
2227
2306
|
const {
|
|
@@ -2233,14 +2312,14 @@ const Ot = (t, e) => {
|
|
|
2233
2312
|
showAdd: i,
|
|
2234
2313
|
createItem: o,
|
|
2235
2314
|
addLabel: u,
|
|
2236
|
-
controlsLayout:
|
|
2237
|
-
removeDisabled:
|
|
2238
|
-
addDisabled:
|
|
2239
|
-
...
|
|
2315
|
+
controlsLayout: d,
|
|
2316
|
+
removeDisabled: b,
|
|
2317
|
+
addDisabled: g,
|
|
2318
|
+
...f
|
|
2240
2319
|
} = t;
|
|
2241
|
-
return
|
|
2320
|
+
return Wt(
|
|
2242
2321
|
{
|
|
2243
|
-
...
|
|
2322
|
+
...f,
|
|
2244
2323
|
content: pn({
|
|
2245
2324
|
controller: s,
|
|
2246
2325
|
element: n,
|
|
@@ -2250,58 +2329,58 @@ const Ot = (t, e) => {
|
|
|
2250
2329
|
showAdd: i,
|
|
2251
2330
|
createItem: o,
|
|
2252
2331
|
addLabel: u,
|
|
2253
|
-
controlsLayout:
|
|
2254
|
-
removeDisabled:
|
|
2255
|
-
addDisabled:
|
|
2332
|
+
controlsLayout: d,
|
|
2333
|
+
removeDisabled: b,
|
|
2334
|
+
addDisabled: g
|
|
2256
2335
|
})
|
|
2257
2336
|
},
|
|
2258
2337
|
...e
|
|
2259
2338
|
);
|
|
2260
2339
|
};
|
|
2261
|
-
class Wn extends
|
|
2340
|
+
class Wn extends xt {
|
|
2262
2341
|
branches;
|
|
2263
2342
|
activeBranch;
|
|
2264
2343
|
#e;
|
|
2265
2344
|
#t = /* @__PURE__ */ new Map();
|
|
2266
2345
|
constructor(e, s, n, r, c, a, i = rt) {
|
|
2267
2346
|
super(e, s, n, r, c, i), this.branches = a;
|
|
2268
|
-
const o = (
|
|
2269
|
-
for (const
|
|
2270
|
-
if (
|
|
2271
|
-
return
|
|
2347
|
+
const o = (d) => {
|
|
2348
|
+
for (const b of a)
|
|
2349
|
+
if (b.detect(d))
|
|
2350
|
+
return b.key;
|
|
2272
2351
|
return a[0]?.key ?? "unknown";
|
|
2273
2352
|
};
|
|
2274
2353
|
this.activeBranch = n.map(o, rt);
|
|
2275
|
-
const u = (
|
|
2276
|
-
if (this.#t.has(
|
|
2277
|
-
return this.#t.get(
|
|
2278
|
-
const
|
|
2279
|
-
if (!
|
|
2280
|
-
throw new Error(`Unknown branch: ${
|
|
2281
|
-
const
|
|
2282
|
-
[...e,
|
|
2283
|
-
(
|
|
2284
|
-
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);
|
|
2285
2364
|
},
|
|
2286
2365
|
this.signal.map(
|
|
2287
|
-
(
|
|
2366
|
+
(f) => b.detect(f) ? f : b.defaultValue(),
|
|
2288
2367
|
i
|
|
2289
2368
|
),
|
|
2290
|
-
r.map(
|
|
2369
|
+
r.map(Et([d])),
|
|
2291
2370
|
{
|
|
2292
2371
|
disabled: this.disabled,
|
|
2293
2372
|
validationMode: this.parent.validationMode
|
|
2294
2373
|
},
|
|
2295
2374
|
i
|
|
2296
2375
|
);
|
|
2297
|
-
return this.#t.set(
|
|
2376
|
+
return this.#t.set(d, g), g;
|
|
2298
2377
|
};
|
|
2299
2378
|
this.#e = this.activeBranch.map(
|
|
2300
|
-
(
|
|
2379
|
+
(d) => u(d),
|
|
2301
2380
|
rt
|
|
2302
2381
|
), this.onDispose(() => {
|
|
2303
|
-
for (const
|
|
2304
|
-
|
|
2382
|
+
for (const d of this.#t.values())
|
|
2383
|
+
d.dispose();
|
|
2305
2384
|
this.#t.clear(), this.activeBranch.dispose(), this.#e.dispose();
|
|
2306
2385
|
});
|
|
2307
2386
|
}
|
|
@@ -2320,7 +2399,7 @@ class Wn extends bt {
|
|
|
2320
2399
|
throw new Error(`Unknown branch: ${e}`);
|
|
2321
2400
|
if (this.#t.has(e))
|
|
2322
2401
|
return this.#t.get(e);
|
|
2323
|
-
const n = new
|
|
2402
|
+
const n = new xt(
|
|
2324
2403
|
[...this.path, e],
|
|
2325
2404
|
(r) => {
|
|
2326
2405
|
this.change(r);
|
|
@@ -2329,7 +2408,7 @@ class Wn extends bt {
|
|
|
2329
2408
|
(r) => s.detect(r) ? r : s.defaultValue(),
|
|
2330
2409
|
rt
|
|
2331
2410
|
),
|
|
2332
|
-
this.status.map(
|
|
2411
|
+
this.status.map(Et([e])),
|
|
2333
2412
|
{
|
|
2334
2413
|
disabled: this.disabled,
|
|
2335
2414
|
validationMode: this.parent.validationMode
|
|
@@ -2388,19 +2467,19 @@ function Xn(t) {
|
|
|
2388
2467
|
}
|
|
2389
2468
|
export {
|
|
2390
2469
|
we as $,
|
|
2391
|
-
|
|
2470
|
+
En as A,
|
|
2392
2471
|
pn as B,
|
|
2393
2472
|
kn as C,
|
|
2394
2473
|
en as D,
|
|
2395
2474
|
je as E,
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2475
|
+
ze as F,
|
|
2476
|
+
dt as G,
|
|
2477
|
+
Rn as H,
|
|
2399
2478
|
Un as I,
|
|
2400
2479
|
Nn as J,
|
|
2401
2480
|
On as K,
|
|
2402
2481
|
Hn as L,
|
|
2403
|
-
|
|
2482
|
+
Gt as M,
|
|
2404
2483
|
Ze as N,
|
|
2405
2484
|
Pn as O,
|
|
2406
2485
|
un as P,
|
|
@@ -2408,43 +2487,43 @@ export {
|
|
|
2408
2487
|
rn as R,
|
|
2409
2488
|
$n as S,
|
|
2410
2489
|
tn as T,
|
|
2411
|
-
|
|
2490
|
+
$t as U,
|
|
2412
2491
|
Cn as V,
|
|
2413
2492
|
an as W,
|
|
2414
2493
|
In as X,
|
|
2415
2494
|
He as Y,
|
|
2416
|
-
|
|
2417
|
-
|
|
2495
|
+
ve as Z,
|
|
2496
|
+
xe as _,
|
|
2418
2497
|
J as a,
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2498
|
+
Ct as a0,
|
|
2499
|
+
it as a1,
|
|
2500
|
+
xn as a2,
|
|
2422
2501
|
$e as a3,
|
|
2423
2502
|
ye as a4,
|
|
2424
2503
|
ke as a5,
|
|
2425
|
-
|
|
2504
|
+
Yt as a6,
|
|
2426
2505
|
Ie as a7,
|
|
2427
|
-
|
|
2506
|
+
Mt as a8,
|
|
2428
2507
|
Ce as a9,
|
|
2429
|
-
|
|
2430
|
-
|
|
2508
|
+
wt as aa,
|
|
2509
|
+
_t as ab,
|
|
2431
2510
|
Me as ac,
|
|
2432
2511
|
De as ad,
|
|
2433
2512
|
at as ae,
|
|
2434
2513
|
lt as af,
|
|
2435
|
-
|
|
2514
|
+
Dt as ag,
|
|
2436
2515
|
_n as ah,
|
|
2437
2516
|
wn as ai,
|
|
2438
|
-
|
|
2517
|
+
Zt as b,
|
|
2439
2518
|
_e as c,
|
|
2440
2519
|
cn as d,
|
|
2441
|
-
|
|
2520
|
+
Nt as e,
|
|
2442
2521
|
Wn as f,
|
|
2443
2522
|
Yn as g,
|
|
2444
2523
|
Xn as h,
|
|
2445
|
-
|
|
2524
|
+
vn as i,
|
|
2446
2525
|
yn as j,
|
|
2447
|
-
|
|
2526
|
+
Ee as k,
|
|
2448
2527
|
Oe as l,
|
|
2449
2528
|
Mn as m,
|
|
2450
2529
|
Ke as n,
|
|
@@ -2459,5 +2538,5 @@ export {
|
|
|
2459
2538
|
Bn as w,
|
|
2460
2539
|
An as x,
|
|
2461
2540
|
Ln as y,
|
|
2462
|
-
|
|
2541
|
+
zn as z
|
|
2463
2542
|
};
|