granat2.0-react 0.1.0 → 0.1.2
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/granat-ui.cjs +2 -2
- package/dist/granat-ui.es.js +610 -572
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/granat-ui.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as u, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
function
|
|
1
|
+
import { jsx as u, jsxs as q, Fragment as At } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Ke, useMemo as $, useState as W, useEffect as ae, useRef as se, useLayoutEffect as xt, isValidElement as Oe, cloneElement as Et } from "react";
|
|
3
|
+
function D(...e) {
|
|
4
4
|
const t = [];
|
|
5
5
|
for (const i of e)
|
|
6
6
|
if (i) {
|
|
@@ -14,11 +14,11 @@ function I(...e) {
|
|
|
14
14
|
}
|
|
15
15
|
return t.join(" ");
|
|
16
16
|
}
|
|
17
|
-
const
|
|
17
|
+
const St = {
|
|
18
18
|
16: "gr-spinner--16",
|
|
19
19
|
24: "gr-spinner--24",
|
|
20
20
|
44: "gr-spinner--44"
|
|
21
|
-
},
|
|
21
|
+
}, Ft = {
|
|
22
22
|
default: "gr-spinner--default",
|
|
23
23
|
inverted: "gr-spinner--inverted",
|
|
24
24
|
accent: "gr-spinner--accent",
|
|
@@ -27,12 +27,12 @@ const Ct = {
|
|
|
27
27
|
"always-black": "gr-spinner--always-black",
|
|
28
28
|
"ghost-primary": "gr-spinner--ghost-primary",
|
|
29
29
|
"ghost-secondary": "gr-spinner--ghost-secondary"
|
|
30
|
-
},
|
|
30
|
+
}, It = {
|
|
31
31
|
slow: "gr-spinner--slow",
|
|
32
32
|
normal: "gr-spinner--normal",
|
|
33
33
|
fast: "gr-spinner--fast"
|
|
34
34
|
};
|
|
35
|
-
function
|
|
35
|
+
function Ye({
|
|
36
36
|
size: e = 24,
|
|
37
37
|
variant: t = "default",
|
|
38
38
|
speed: i = "normal",
|
|
@@ -45,24 +45,24 @@ function je({
|
|
|
45
45
|
{
|
|
46
46
|
role: "status",
|
|
47
47
|
"aria-label": s,
|
|
48
|
-
className:
|
|
48
|
+
className: D(
|
|
49
49
|
"gr-spinner",
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
St[e],
|
|
51
|
+
Ft[t],
|
|
52
|
+
It[i],
|
|
53
53
|
l
|
|
54
54
|
),
|
|
55
55
|
...n
|
|
56
56
|
}
|
|
57
57
|
);
|
|
58
58
|
}
|
|
59
|
-
const
|
|
59
|
+
const Dt = 52, Bt = "primary", Tt = {
|
|
60
60
|
24: "gr-button--24",
|
|
61
61
|
32: "gr-button--32",
|
|
62
62
|
44: "gr-button--44",
|
|
63
63
|
52: "gr-button--52",
|
|
64
64
|
72: "gr-button--72"
|
|
65
|
-
},
|
|
65
|
+
}, Mt = {
|
|
66
66
|
primary: "gr-button--primary",
|
|
67
67
|
"primary-alternate": "gr-button--primary-alternate",
|
|
68
68
|
"always-white": "gr-button--always-white",
|
|
@@ -73,13 +73,13 @@ const xt = 52, St = "primary", Ft = {
|
|
|
73
73
|
ghost: "gr-button--ghost",
|
|
74
74
|
blur: "gr-button--blur",
|
|
75
75
|
disabled: "gr-button--disabled"
|
|
76
|
-
},
|
|
76
|
+
}, Vt = {
|
|
77
77
|
24: 16,
|
|
78
78
|
32: 16,
|
|
79
79
|
44: 24,
|
|
80
80
|
52: 24,
|
|
81
81
|
72: 24
|
|
82
|
-
},
|
|
82
|
+
}, Lt = {
|
|
83
83
|
primary: "always-white",
|
|
84
84
|
"primary-alternate": "inverted",
|
|
85
85
|
"always-white": "always-black",
|
|
@@ -90,12 +90,12 @@ const xt = 52, St = "primary", Ft = {
|
|
|
90
90
|
ghost: "default",
|
|
91
91
|
blur: "always-white",
|
|
92
92
|
disabled: "default"
|
|
93
|
-
},
|
|
93
|
+
}, Rt = Ke(
|
|
94
94
|
({
|
|
95
95
|
label: e,
|
|
96
96
|
children: t,
|
|
97
|
-
size: i =
|
|
98
|
-
variant: s =
|
|
97
|
+
size: i = Dt,
|
|
98
|
+
variant: s = Bt,
|
|
99
99
|
icon: l,
|
|
100
100
|
showIcon: n,
|
|
101
101
|
iconPosition: o = "left",
|
|
@@ -103,51 +103,51 @@ const xt = 52, St = "primary", Ft = {
|
|
|
103
103
|
loading: r = !1,
|
|
104
104
|
fluid: c = !1,
|
|
105
105
|
className: d,
|
|
106
|
-
type:
|
|
107
|
-
disabled:
|
|
106
|
+
type: h = "button",
|
|
107
|
+
disabled: v,
|
|
108
108
|
...b
|
|
109
109
|
}, k) => {
|
|
110
|
-
const
|
|
110
|
+
const _ = t ?? e, m = n ?? !!l, T = a || m && !_, z = v || s === "disabled", x = r, H = Vt[i], K = Lt[s];
|
|
111
111
|
return /* @__PURE__ */ u(
|
|
112
112
|
"button",
|
|
113
113
|
{
|
|
114
114
|
ref: k,
|
|
115
|
-
type:
|
|
115
|
+
type: h,
|
|
116
116
|
disabled: z,
|
|
117
|
-
"aria-busy":
|
|
118
|
-
"aria-disabled":
|
|
117
|
+
"aria-busy": x || void 0,
|
|
118
|
+
"aria-disabled": x || void 0,
|
|
119
119
|
"aria-label": typeof e == "string" ? e : typeof t == "string" ? t : void 0,
|
|
120
|
-
className:
|
|
120
|
+
className: D(
|
|
121
121
|
"gr-button",
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
Tt[i],
|
|
123
|
+
Mt[s],
|
|
124
124
|
{
|
|
125
|
-
"gr-button--icon-only":
|
|
126
|
-
"gr-button--icon-right":
|
|
127
|
-
"gr-button--has-icon":
|
|
128
|
-
"gr-button--loading":
|
|
125
|
+
"gr-button--icon-only": T,
|
|
126
|
+
"gr-button--icon-right": m && o === "right",
|
|
127
|
+
"gr-button--has-icon": m,
|
|
128
|
+
"gr-button--loading": x,
|
|
129
129
|
"gr-button--fluid": c
|
|
130
130
|
},
|
|
131
131
|
d
|
|
132
132
|
),
|
|
133
133
|
...b,
|
|
134
|
-
children:
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
134
|
+
children: x ? /* @__PURE__ */ u(Ye, { size: H, variant: K }) : /* @__PURE__ */ q(At, { children: [
|
|
135
|
+
m && o === "left" ? /* @__PURE__ */ u("span", { className: "gr-button__icon", children: l }) : null,
|
|
136
|
+
_ ? /* @__PURE__ */ u("span", { className: "gr-button__label", children: _ }) : null,
|
|
137
|
+
m && o === "right" ? /* @__PURE__ */ u("span", { className: "gr-button__icon", children: l }) : null
|
|
138
138
|
] })
|
|
139
139
|
}
|
|
140
140
|
);
|
|
141
141
|
}
|
|
142
142
|
);
|
|
143
|
-
|
|
144
|
-
const
|
|
143
|
+
Rt.displayName = "Button";
|
|
144
|
+
const Ot = 52, Nt = "primary", qt = {
|
|
145
145
|
24: "gr-icon-button--24",
|
|
146
146
|
32: "gr-icon-button--32",
|
|
147
147
|
44: "gr-icon-button--44",
|
|
148
148
|
52: "gr-icon-button--52",
|
|
149
149
|
72: "gr-icon-button--72"
|
|
150
|
-
},
|
|
150
|
+
}, Ut = {
|
|
151
151
|
primary: "gr-icon-button--primary",
|
|
152
152
|
"primary-alternate": "gr-icon-button--primary-alternate",
|
|
153
153
|
"always-white": "gr-icon-button--always-white",
|
|
@@ -161,13 +161,13 @@ const Mt = 52, Vt = "primary", Lt = {
|
|
|
161
161
|
"negative-alternate": "gr-icon-button--negative-alternate",
|
|
162
162
|
disabled: "gr-icon-button--disabled",
|
|
163
163
|
"disabled-ghost": "gr-icon-button--disabled-ghost"
|
|
164
|
-
},
|
|
164
|
+
}, Pt = {
|
|
165
165
|
24: 16,
|
|
166
166
|
32: 16,
|
|
167
167
|
44: 24,
|
|
168
168
|
52: 24,
|
|
169
169
|
72: 24
|
|
170
|
-
},
|
|
170
|
+
}, $t = {
|
|
171
171
|
primary: "always-white",
|
|
172
172
|
"primary-alternate": "always-white",
|
|
173
173
|
"always-white": "always-black",
|
|
@@ -181,19 +181,19 @@ const Mt = 52, Vt = "primary", Lt = {
|
|
|
181
181
|
"negative-alternate": "negative",
|
|
182
182
|
disabled: "default",
|
|
183
183
|
"disabled-ghost": "ghost-secondary"
|
|
184
|
-
},
|
|
184
|
+
}, le = Ke(
|
|
185
185
|
({
|
|
186
186
|
label: e,
|
|
187
187
|
icon: t,
|
|
188
|
-
size: i =
|
|
189
|
-
variant: s =
|
|
188
|
+
size: i = Ot,
|
|
189
|
+
variant: s = Nt,
|
|
190
190
|
loading: l = !1,
|
|
191
191
|
className: n,
|
|
192
192
|
type: o = "button",
|
|
193
193
|
disabled: a,
|
|
194
194
|
...r
|
|
195
195
|
}, c) => {
|
|
196
|
-
const d = a || s === "disabled" || s === "disabled-ghost",
|
|
196
|
+
const d = a || s === "disabled" || s === "disabled-ghost", h = Pt[i], v = $t[s];
|
|
197
197
|
return /* @__PURE__ */ u(
|
|
198
198
|
"button",
|
|
199
199
|
{
|
|
@@ -203,23 +203,23 @@ const Mt = 52, Vt = "primary", Lt = {
|
|
|
203
203
|
"aria-busy": l || void 0,
|
|
204
204
|
"aria-disabled": l || void 0,
|
|
205
205
|
"aria-label": e,
|
|
206
|
-
className:
|
|
206
|
+
className: D(
|
|
207
207
|
"gr-icon-button",
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
qt[i],
|
|
209
|
+
Ut[s],
|
|
210
210
|
{
|
|
211
211
|
"gr-icon-button--loading": l
|
|
212
212
|
},
|
|
213
213
|
n
|
|
214
214
|
),
|
|
215
215
|
...r,
|
|
216
|
-
children: l ? /* @__PURE__ */ u(
|
|
216
|
+
children: l ? /* @__PURE__ */ u(Ye, { size: h, variant: v }) : /* @__PURE__ */ u("span", { className: "gr-icon-button__icon", children: t })
|
|
217
217
|
}
|
|
218
218
|
);
|
|
219
219
|
}
|
|
220
220
|
);
|
|
221
|
-
|
|
222
|
-
const
|
|
221
|
+
le.displayName = "IconButton";
|
|
222
|
+
const jt = 24, Zt = "outline", Ht = "web2", ne = {
|
|
223
223
|
.../* @__PURE__ */ Object.assign({
|
|
224
224
|
"../icons/web2/0-plus/size-16-style-outline.svg": () => import("./size-16-style-outline-C8BcuazD.js").then((e) => e.default),
|
|
225
225
|
"../icons/web2/0-plus/size-24-style-outline.svg": () => import("./size-24-style-outline-D14Kocz8.js").then((e) => e.default),
|
|
@@ -7341,54 +7341,92 @@ const qt = 24, Ut = "outline", Pt = "web2", $t = {
|
|
|
7341
7341
|
"../icons/interface/youth/size-44-style-outline.svg": () => import("./size-44-style-outline-BwhXthMe.js").then((e) => e.default)
|
|
7342
7342
|
}),
|
|
7343
7343
|
.../* @__PURE__ */ Object.assign({})
|
|
7344
|
-
},
|
|
7345
|
-
function
|
|
7346
|
-
if (typeof document > "u" ||
|
|
7347
|
-
let s = document.getElementById(
|
|
7348
|
-
s || (s = document.createElement("style"), s.id =
|
|
7344
|
+
}, re = /* @__PURE__ */ new Map(), ie = /* @__PURE__ */ new Map(), G = /* @__PURE__ */ new Map(), Ne = "granat-icon-styles", qe = /* @__PURE__ */ new Map();
|
|
7345
|
+
function Kt(e, t) {
|
|
7346
|
+
if (typeof document > "u" || qe.get(e) === t) return;
|
|
7347
|
+
let s = document.getElementById(Ne);
|
|
7348
|
+
s || (s = document.createElement("style"), s.id = Ne, document.head.appendChild(s));
|
|
7349
|
+
const l = typeof CSS < "u" && "escape" in CSS ? CSS.escape(e) : e;
|
|
7350
|
+
s.appendChild(
|
|
7349
7351
|
document.createTextNode(
|
|
7350
|
-
`.${
|
|
7352
|
+
`.${l}{-webkit-mask-image:url("${t}");mask-image:url("${t}");}
|
|
7351
7353
|
`
|
|
7352
7354
|
)
|
|
7353
|
-
),
|
|
7355
|
+
), qe.set(e, t);
|
|
7356
|
+
}
|
|
7357
|
+
function Ue(e) {
|
|
7358
|
+
return e.replace(/[^a-z0-9_-]/gi, "_");
|
|
7359
|
+
}
|
|
7360
|
+
function Pe(e, t) {
|
|
7361
|
+
if (!e.length) return null;
|
|
7362
|
+
const i = e.find((o) => o.includes("status-100"));
|
|
7363
|
+
if (i) return i;
|
|
7364
|
+
const s = e.find((o) => o.includes("status-charging"));
|
|
7365
|
+
if (s) return s;
|
|
7366
|
+
const l = [...e].sort((o, a) => o.localeCompare(a));
|
|
7367
|
+
return l.find((o) => o.endsWith(`style-${t}.svg`)) ?? l[0];
|
|
7354
7368
|
}
|
|
7355
|
-
function
|
|
7356
|
-
|
|
7369
|
+
function Yt(e, t, i, s) {
|
|
7370
|
+
const l = `${e}|${t}|${i}|${s}`, n = G.get(l);
|
|
7371
|
+
if (n !== void 0) return n;
|
|
7372
|
+
const o = `../icons/${e}/${t}/size-${i}-style-${s}.svg`;
|
|
7373
|
+
if (o in ne)
|
|
7374
|
+
return G.set(l, o), o;
|
|
7375
|
+
const a = `../icons/${e}/${t}/size-${i}-style-${s}`, r = Object.keys(ne).filter(
|
|
7376
|
+
(m) => m.startsWith(a) && m.endsWith(".svg")
|
|
7377
|
+
), c = Pe(r, s);
|
|
7378
|
+
if (c)
|
|
7379
|
+
return G.set(l, c), c;
|
|
7380
|
+
const h = Object.keys(ne).filter((m) => m.startsWith(`../icons/${e}/${t}/size-`) ? m.includes(`-style-${s}`) && m.endsWith(".svg") : !1).map((m) => {
|
|
7381
|
+
const T = m.match(/\/size-(\d+)-style-/), z = T ? Number(T[1]) : NaN;
|
|
7382
|
+
return { key: m, size: z };
|
|
7383
|
+
}).filter((m) => Number.isFinite(m.size));
|
|
7384
|
+
if (!h.length)
|
|
7385
|
+
return G.set(l, null), null;
|
|
7386
|
+
const v = i;
|
|
7387
|
+
h.sort((m, T) => {
|
|
7388
|
+
const z = Math.abs(m.size - v), x = Math.abs(T.size - v);
|
|
7389
|
+
return z !== x ? z - x : m.size - T.size;
|
|
7390
|
+
});
|
|
7391
|
+
const b = h[0].size, k = h.filter((m) => m.size === b).map((m) => m.key), _ = Pe(k, s);
|
|
7392
|
+
return G.set(l, _), _;
|
|
7357
7393
|
}
|
|
7358
|
-
async function
|
|
7359
|
-
const t =
|
|
7394
|
+
async function Gt(e) {
|
|
7395
|
+
const t = re.get(e);
|
|
7360
7396
|
if (t) return t;
|
|
7361
|
-
const i =
|
|
7397
|
+
const i = ie.get(e);
|
|
7362
7398
|
if (i) return i;
|
|
7363
|
-
const s =
|
|
7399
|
+
const s = ne[e];
|
|
7364
7400
|
if (!s) return null;
|
|
7365
|
-
const l = s().then((n) => (
|
|
7366
|
-
return
|
|
7401
|
+
const l = s().then((n) => (re.set(e, n), ie.delete(e), n)).catch(() => (ie.delete(e), null));
|
|
7402
|
+
return ie.set(e, l), l;
|
|
7367
7403
|
}
|
|
7368
|
-
function
|
|
7404
|
+
function Z({
|
|
7369
7405
|
name: e,
|
|
7370
|
-
pack: t =
|
|
7371
|
-
size: i =
|
|
7372
|
-
variant: s =
|
|
7406
|
+
pack: t = Ht,
|
|
7407
|
+
size: i = jt,
|
|
7408
|
+
variant: s = Zt,
|
|
7373
7409
|
ariaLabel: l,
|
|
7374
7410
|
className: n,
|
|
7375
7411
|
...o
|
|
7376
7412
|
}) {
|
|
7377
|
-
const a =
|
|
7378
|
-
() =>
|
|
7413
|
+
const a = $(
|
|
7414
|
+
() => Yt(t, e, i, s),
|
|
7379
7415
|
[t, e, i, s]
|
|
7380
|
-
), r = `gr-icon--${t}-${e}-${i}-${s}`, [c, d] =
|
|
7381
|
-
return
|
|
7382
|
-
let
|
|
7383
|
-
return d(
|
|
7384
|
-
|
|
7416
|
+
), r = `gr-icon--${Ue(t)}-${Ue(e)}-${i}-${s}`, [c, d] = W(() => a ? re.get(a) ?? null : null);
|
|
7417
|
+
return ae(() => {
|
|
7418
|
+
let h = !0;
|
|
7419
|
+
return d(a ? re.get(a) ?? null : null), a ? (Gt(a).then((v) => {
|
|
7420
|
+
h && d(v);
|
|
7385
7421
|
}), () => {
|
|
7386
|
-
|
|
7422
|
+
h = !1;
|
|
7423
|
+
}) : () => {
|
|
7424
|
+
h = !1;
|
|
7387
7425
|
};
|
|
7388
|
-
}, [a]), c &&
|
|
7426
|
+
}, [a]), c && Kt(r, c), /* @__PURE__ */ u(
|
|
7389
7427
|
"span",
|
|
7390
7428
|
{
|
|
7391
|
-
className:
|
|
7429
|
+
className: D(
|
|
7392
7430
|
"gr-icon",
|
|
7393
7431
|
`gr-icon--${i}`,
|
|
7394
7432
|
c ? r : null,
|
|
@@ -7401,59 +7439,59 @@ function j({
|
|
|
7401
7439
|
}
|
|
7402
7440
|
);
|
|
7403
7441
|
}
|
|
7404
|
-
const
|
|
7442
|
+
const Wt = 24, Xt = "default", Jt = "primary", Qt = "left", ei = {
|
|
7405
7443
|
16: "gr-badge--16",
|
|
7406
7444
|
20: "gr-badge--20",
|
|
7407
7445
|
24: "gr-badge--24",
|
|
7408
7446
|
32: "gr-badge--32"
|
|
7409
|
-
},
|
|
7447
|
+
}, ti = {
|
|
7410
7448
|
default: "gr-badge--default",
|
|
7411
7449
|
custom: "gr-badge--custom"
|
|
7412
|
-
},
|
|
7450
|
+
}, ii = {
|
|
7413
7451
|
primary: "gr-badge--on-primary",
|
|
7414
7452
|
secondary: "gr-badge--on-secondary"
|
|
7415
|
-
},
|
|
7453
|
+
}, ye = (e) => {
|
|
7416
7454
|
if (!e) return;
|
|
7417
7455
|
const t = e.trim();
|
|
7418
7456
|
if (t)
|
|
7419
7457
|
return t.startsWith("var(") ? t : t.startsWith("--") ? `var(${t})` : t;
|
|
7420
7458
|
};
|
|
7421
|
-
function
|
|
7459
|
+
function si({
|
|
7422
7460
|
label: e,
|
|
7423
7461
|
children: t,
|
|
7424
|
-
size: i =
|
|
7425
|
-
variant: s =
|
|
7426
|
-
surface: l =
|
|
7462
|
+
size: i = Wt,
|
|
7463
|
+
variant: s = Xt,
|
|
7464
|
+
surface: l = Jt,
|
|
7427
7465
|
icon: n,
|
|
7428
7466
|
showIcon: o,
|
|
7429
|
-
iconPosition: a =
|
|
7467
|
+
iconPosition: a = Qt,
|
|
7430
7468
|
customBackground: r,
|
|
7431
7469
|
customTextColor: c,
|
|
7432
7470
|
customIconColor: d,
|
|
7433
|
-
className:
|
|
7434
|
-
...
|
|
7471
|
+
className: h,
|
|
7472
|
+
...v
|
|
7435
7473
|
}) {
|
|
7436
|
-
const b = t ?? e, k = o ?? !!n,
|
|
7437
|
-
"--gr-badge-bg":
|
|
7438
|
-
"--gr-badge-text-color":
|
|
7439
|
-
"--gr-badge-icon-color":
|
|
7474
|
+
const b = t ?? e, k = o ?? !!n, _ = k && !b, m = s === "custom" && (r || c || d) ? {
|
|
7475
|
+
"--gr-badge-bg": ye(r),
|
|
7476
|
+
"--gr-badge-text-color": ye(c),
|
|
7477
|
+
"--gr-badge-icon-color": ye(d)
|
|
7440
7478
|
} : void 0;
|
|
7441
|
-
return /* @__PURE__ */
|
|
7479
|
+
return /* @__PURE__ */ q(
|
|
7442
7480
|
"span",
|
|
7443
7481
|
{
|
|
7444
|
-
className:
|
|
7482
|
+
className: D(
|
|
7445
7483
|
"gr-badge",
|
|
7446
|
-
|
|
7447
|
-
|
|
7448
|
-
s === "default" ?
|
|
7484
|
+
ei[i],
|
|
7485
|
+
ti[s],
|
|
7486
|
+
s === "default" ? ii[l] : null,
|
|
7449
7487
|
{
|
|
7450
|
-
"gr-badge--icon-only":
|
|
7488
|
+
"gr-badge--icon-only": _,
|
|
7451
7489
|
"gr-badge--icon-right": k && a === "right"
|
|
7452
7490
|
},
|
|
7453
|
-
|
|
7491
|
+
h
|
|
7454
7492
|
),
|
|
7455
|
-
style:
|
|
7456
|
-
...
|
|
7493
|
+
style: m,
|
|
7494
|
+
...v,
|
|
7457
7495
|
children: [
|
|
7458
7496
|
k && a === "left" ? /* @__PURE__ */ u("span", { className: "gr-badge__icon", children: n }) : null,
|
|
7459
7497
|
b ? /* @__PURE__ */ u("span", { className: "gr-badge__label", children: b }) : null,
|
|
@@ -7462,26 +7500,26 @@ function ei({
|
|
|
7462
7500
|
}
|
|
7463
7501
|
);
|
|
7464
7502
|
}
|
|
7465
|
-
const
|
|
7503
|
+
const li = 24, ni = "primary", oi = "primary", ai = "counter", ri = {
|
|
7466
7504
|
16: "gr-counter--16",
|
|
7467
7505
|
20: "gr-counter--20",
|
|
7468
7506
|
24: "gr-counter--24"
|
|
7469
|
-
},
|
|
7507
|
+
}, ci = {
|
|
7470
7508
|
primary: "gr-counter--primary",
|
|
7471
7509
|
secondary: "gr-counter--secondary",
|
|
7472
7510
|
inverted: "gr-counter--inverted"
|
|
7473
|
-
},
|
|
7511
|
+
}, fi = {
|
|
7474
7512
|
primary: "gr-counter--on-primary",
|
|
7475
7513
|
secondary: "gr-counter--on-secondary"
|
|
7476
7514
|
};
|
|
7477
|
-
function
|
|
7515
|
+
function bs({
|
|
7478
7516
|
value: e = 1,
|
|
7479
7517
|
max: t = 99,
|
|
7480
7518
|
showPlus: i = !0,
|
|
7481
|
-
size: s =
|
|
7482
|
-
type: l =
|
|
7483
|
-
surface: n =
|
|
7484
|
-
kind: o =
|
|
7519
|
+
size: s = li,
|
|
7520
|
+
type: l = ni,
|
|
7521
|
+
surface: n = oi,
|
|
7522
|
+
kind: o = ai,
|
|
7485
7523
|
className: a,
|
|
7486
7524
|
...r
|
|
7487
7525
|
}) {
|
|
@@ -7489,11 +7527,11 @@ function vs({
|
|
|
7489
7527
|
return /* @__PURE__ */ u(
|
|
7490
7528
|
"span",
|
|
7491
7529
|
{
|
|
7492
|
-
className:
|
|
7530
|
+
className: D(
|
|
7493
7531
|
"gr-counter",
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7532
|
+
ri[s],
|
|
7533
|
+
ci[l],
|
|
7534
|
+
fi[n],
|
|
7497
7535
|
{
|
|
7498
7536
|
"gr-counter--notification": c
|
|
7499
7537
|
},
|
|
@@ -7505,7 +7543,7 @@ function vs({
|
|
|
7505
7543
|
}
|
|
7506
7544
|
);
|
|
7507
7545
|
}
|
|
7508
|
-
const
|
|
7546
|
+
const ui = "default", di = "s", hi = 32, pi = "default", mi = {
|
|
7509
7547
|
default: "gr-card--elevated",
|
|
7510
7548
|
"default-no-shadow": "gr-card--secondary-elevated",
|
|
7511
7549
|
grey: "gr-card--secondary",
|
|
@@ -7516,40 +7554,40 @@ const ri = "default", ci = "s", fi = 32, ui = "default", di = {
|
|
|
7516
7554
|
blur: "gr-card--blur",
|
|
7517
7555
|
transparent: "gr-card--transparent",
|
|
7518
7556
|
image: "gr-card--image"
|
|
7519
|
-
},
|
|
7557
|
+
}, gi = {
|
|
7520
7558
|
s: "gr-card--size-s",
|
|
7521
7559
|
m: "gr-card--size-m"
|
|
7522
|
-
},
|
|
7560
|
+
}, vi = {
|
|
7523
7561
|
32: "gr-card--radius-32",
|
|
7524
7562
|
40: "gr-card--radius-40",
|
|
7525
7563
|
48: "gr-card--radius-48",
|
|
7526
7564
|
64: "gr-card--radius-64",
|
|
7527
7565
|
80: "gr-card--radius-80"
|
|
7528
|
-
},
|
|
7566
|
+
}, yi = {
|
|
7529
7567
|
default: "gr-card--state-default",
|
|
7530
7568
|
hover: "gr-card--state-hover",
|
|
7531
7569
|
pressed: "gr-card--state-pressed",
|
|
7532
7570
|
focus: "gr-card--state-focus"
|
|
7533
7571
|
};
|
|
7534
|
-
function
|
|
7535
|
-
variant: e =
|
|
7536
|
-
size: t =
|
|
7572
|
+
function ws({
|
|
7573
|
+
variant: e = ui,
|
|
7574
|
+
size: t = di,
|
|
7537
7575
|
radius: i,
|
|
7538
|
-
state: s =
|
|
7576
|
+
state: s = pi,
|
|
7539
7577
|
className: l,
|
|
7540
7578
|
children: n,
|
|
7541
7579
|
...o
|
|
7542
7580
|
}) {
|
|
7543
|
-
const a = t === "m" ? i ??
|
|
7581
|
+
const a = t === "m" ? i ?? hi : void 0;
|
|
7544
7582
|
return /* @__PURE__ */ u(
|
|
7545
7583
|
"div",
|
|
7546
7584
|
{
|
|
7547
|
-
className:
|
|
7585
|
+
className: D(
|
|
7548
7586
|
"gr-card",
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
a ?
|
|
7552
|
-
|
|
7587
|
+
mi[e],
|
|
7588
|
+
gi[t],
|
|
7589
|
+
a ? vi[a] : null,
|
|
7590
|
+
yi[s],
|
|
7553
7591
|
l
|
|
7554
7592
|
),
|
|
7555
7593
|
...o,
|
|
@@ -7557,33 +7595,33 @@ function ys({
|
|
|
7557
7595
|
}
|
|
7558
7596
|
);
|
|
7559
7597
|
}
|
|
7560
|
-
const
|
|
7598
|
+
const zi = "data:image/svg+xml,%3csvg%20width='80'%20height='80'%20viewBox='0%200%2080%2080'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M72.9264%2071.5725C68.7231%2076.1389%2062.6957%2079%2056%2079H24C17.2093%2079%2011.106%2076.0571%206.89581%2071.3771C9.25041%2069.1973%2012.4414%2068.0046%2016.4656%2066.5006C20.2103%2065.101%2024.6764%2063.4318%2029.8613%2060.4466V55.6814C26.8023%2053.5266%2025.9633%2050.1236%2024.9769%2046.1232C24.9061%2045.8361%2024.8346%2045.546%2024.7615%2045.2531H24.64C24.1543%2045.2531%2023.6686%2044.5238%2023.6686%2043.6729C23.6686%2043.5514%2023.699%2043.4906%2023.7293%2043.4298C23.7597%2043.3691%2023.7901%2043.3083%2023.7901%2043.1867C23.4258%2042.7006%2023.0615%2041.9713%2022.8187%2041.1204C22.7604%2040.9066%2022.6835%2040.6586%2022.5994%2040.3873C22.1576%2038.9623%2021.5169%2036.8955%2022.333%2035.7723C23.3044%2034.9215%2023.7901%2035.8939%2023.7901%2035.8939L23.7717%2035.7967C22.4379%2028.7584%2020.6781%2019.4715%2030.4684%2016.5677C30.4684%2010.4903%2053.5391%2013.1643%2056.2105%2023.1313C57.5461%2027.0208%2055.8462%2035.7723%2055.8462%2035.7723C56.2105%2035.1646%2056.6962%2034.9215%2057.1819%2035.4077C58.3393%2036.1449%2057.3996%2038.9814%2056.8912%2040.5163C56.8129%2040.7527%2056.7448%2040.9582%2056.6962%2041.1204C56.4533%2042.2144%2056.089%2042.8221%2055.7248%2043.4298L55.8462%2043.6729C55.8462%2044.5238%2055.3605%2045.2531%2054.8748%2045.2531C54.2677%2049.1426%2053.1749%2053.5183%2050.1392%2055.5847V60.4466C55.1908%2063.355%2059.5601%2065.0772%2063.2447%2066.5295C67.3042%2068.1296%2070.5326%2069.4021%2072.9264%2071.5725Z'%20fill='white'/%3e%3c/svg%3e", bi = "data:image/svg+xml,%3csvg%20width='80'%20height='80'%20viewBox='0%200%2080%2080'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M72.1881%2072.3384C68.032%2076.4565%2062.313%2079%2056%2079H24C17.6889%2079%2011.9716%2076.4581%207.8158%2072.3423C10.3168%2069.7449%2013.8235%2068.4823%2018.2317%2066.8954L18.2352%2066.8939C18.4965%2066.8001%2018.7624%2066.7054%2019.0325%2066.6091L19.7242%2066.3643C20.1676%2066.2072%2020.6218%2066.0501%2021.0856%2065.8896C21.1518%2065.8667%2021.2182%2065.8438%2021.2848%2065.8207L21.2861%2065.8202C24.3888%2064.7477%2027.9171%2063.528%2031.6251%2061.4325V61.4175V58.4072C31.1203%2058.4184%2030.627%2058.4313%2030.15%2058.446C27.1672%2058.5383%2023.0906%2058.9076%2020.676%2059.1468C19.8704%2059.2265%2019.187%2058.4702%2019.1913%2057.6702C19.1908%2057.5674%2019.2017%2057.4638%2019.2248%2057.3611C19.5252%2056.0358%2019.8563%2054.0167%2019.9887%2051.2181C20.0008%2050.9624%2020.0114%2050.7001%2020.0201%2050.4312C20.0248%2050.2847%2020.029%2050.1362%2020.0327%2049.9857V49.9708C20.0379%2049.7503%2020.0404%2049.5194%2020.0404%2049.2787C20.04%2047.4293%2019.897%2045.0074%2019.7423%2042.389L19.7419%2042.3844C19.7152%2041.9318%2019.6926%2041.4894%2019.6729%2041.0568C19.5739%2038.8966%2019.5641%2036.9799%2019.6701%2035.2569C19.8789%2031.8607%2020.5366%2029.2167%2021.8442%2026.9419C24.3057%2022.6593%2026.9751%2022.0145%2026.9751%2022.0145C26.9751%2022.0145%2026.9751%2015.7279%2037.1015%2013.7417C38.0411%2013.4808%2039.0742%2013.3385%2040.2103%2013.3385L40.3059%2013.3388L40.4016%2013.3385C40.466%2013.3385%2040.5301%2013.3389%2040.5937%2013.3398C40.6436%2013.3391%2040.7005%2013.3387%2040.7469%2013.3385C45.4621%2013.3207%2049.9036%2015.4817%2052.7712%2018.9582C57.3659%2024.529%2059.8461%2030.8222%2060.1742%2036.9526C60.3506%2038.7304%2060.4284%2040.5845%2060.3228%2042.3695V42.3741L60.3225%2042.3797C60.1472%2045.3447%2059.9869%2048.0564%2060.0325%2049.9708C60.1137%2053.4257%2060.4968%2055.8465%2060.8402%2057.3611C61.0434%2058.2574%2060.2931%2059.2213%2059.3887%2059.1318C57.0562%2058.9008%2051.6861%2058.5483%2048.736%2058.4414V61.4325C52.9517%2063.7701%2056.9229%2065.1754%2060.2862%2066.3648L60.3267%2066.3791C60.8224%2066.5546%2061.3049%2066.7254%2061.7728%2066.8939L61.7773%2066.8954L61.7807%2066.8969C66.1842%2068.4824%2069.6883%2069.7449%2072.1881%2072.3384Z'%20fill='white'/%3e%3c/svg%3e", wi = "data:image/svg+xml,%3csvg%20width='80'%20height='80'%20viewBox='0%200%2080%2080'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M73.2978%2071.1591C69.0822%2075.9655%2062.8955%2079%2055.9999%2079H23.9999C17.1061%2079%2010.9206%2075.9669%206.70508%2071.1625C9.29289%2068.6973%2012.8369%2067.4292%2017.2419%2065.853L17.2454%2065.8517C17.7487%2065.6717%2018.268%2065.4891%2018.802%2065.3014C22.5396%2063.9873%2026.9965%2062.4204%2031.7143%2059.7049V58.6845C31.7143%2058.4686%2031.7169%2058.2537%2031.7194%2058.0399C31.734%2056.7926%2031.7482%2055.5873%2031.2567%2054.4959C31.0098%2054.275%2030.7418%2054.0432%2030.4621%2053.8013C29.0706%2052.5977%2027.3918%2051.1456%2026.6086%2049.5581L26.5734%2049.5266C26.5508%2049.4674%2026.5283%2049.4076%2026.5061%2049.3474C25.7516%2047.7756%2025.1677%2046.0779%2024.7417%2044.3618H24.6197C24.0092%2044.3618%2023.643%2043.5009%2023.643%2042.6401V42.2712L23.6428%2042.2709C23.3987%2041.779%2023.0324%2041.0412%2022.7883%2040.0576C22.7567%2039.9701%2022.7226%2039.8768%2022.6866%2039.7788C22.1669%2038.3609%2021.2723%2035.9198%2022.2999%2034.7696C22.3097%2034.7598%2022.3194%2034.7502%2022.3292%2034.7409C22.4081%2034.5544%2022.5185%2034.3971%2022.6665%2034.2778C23.1374%2033.9932%2023.463%2034.0744%2023.7554%2034.4087C23.7481%2033.0859%2023.8529%2029.2402%2025.1502%2025.2279C26.7975%2019.713%2029.124%2013.3384%2040.0033%2013.3384C50.8826%2013.3384%2053.2091%2019.713%2054.8563%2025.2279C56.1535%2029.2402%2056.2585%2033.0859%2056.2513%2034.4087C56.5436%2034.0744%2056.8693%2033.9932%2057.3402%2034.2778C57.4878%2034.3971%2057.5985%2034.5544%2057.6772%2034.7408C57.687%2034.7502%2057.6968%2034.7598%2057.7065%2034.7696C58.7335%2035.919%2057.8405%2038.3577%2057.3211%2039.776L57.3201%2039.7788C57.3125%2039.7994%2057.305%2039.8198%2057.2976%2039.84C57.2697%2039.9158%2057.243%2039.9885%2057.2182%2040.0576C56.9738%2041.0413%2056.6079%2041.7791%2056.3635%2042.271V42.6401C56.3635%2043.5009%2055.9971%2044.3618%2055.3868%2044.3618H55.2648C54.8388%2046.0779%2054.2547%2047.7756%2053.5003%2049.3474C53.4782%2049.4076%2053.4556%2049.4674%2053.4329%2049.5266C53.4266%2049.5322%2053.4205%2049.5377%2053.4144%2049.5433C53.4089%2049.5482%2053.4035%2049.5531%2053.3979%2049.5581C52.6147%2051.1456%2050.9358%2052.5977%2049.5443%2053.8013C49.2647%2054.0432%2048.9967%2054.275%2048.7498%2054.4959C48.2584%2055.5871%2048.2726%2056.7922%2048.2873%2058.0393C48.2898%2058.2532%2048.2923%2058.4684%2048.2923%2058.6845V59.7049C53.0112%2062.421%2057.4687%2063.988%2061.2071%2065.3023C61.7402%2065.4897%2062.2587%2065.672%2062.7613%2065.8517L62.7661%2065.8535C67.1682%2067.4287%2070.7107%2068.6963%2073.2978%2071.1591Z'%20fill='white'/%3e%3c/svg%3e", ki = "data:image/svg+xml,%3csvg%20width='80'%20height='80'%20viewBox='0%200%2080%2080'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M35.7746%2012.4488C35.0835%2012.8054%2034.854%2013.636%2035.0941%2014.3922L36.4178%2018.5633C36.6768%2019.3793%2037.4166%2019.9313%2038.2508%2019.9313H41.2688C42.103%2019.9313%2042.8428%2019.3793%2043.1018%2018.5633L44.4519%2014.3093C44.6783%2013.5957%2044.4862%2012.8096%2043.8441%2012.4532C43.0335%2012.0033%2041.7141%2011.5%2039.8676%2011.5C38.0269%2011.5%2036.6445%2012.0001%2035.7746%2012.4488ZM38.4174%2022.4192C37.5729%2022.4192%2036.8286%2022.98%2036.5876%2023.8128C35.752%2026.6983%2033.8233%2033.5921%2032.5475%2039.9721C31.2458%2046.4816%2030.3493%2053.9273%2030.0186%2056.8794C29.9256%2057.7099%2030.185%2058.5393%2030.7249%2059.1642L37.9262%2067.5011C39.0852%2068.8427%2041.1262%2068.8313%2042.2711%2067.4768L49.2948%2059.1647C49.8235%2058.539%2050.0749%2057.7177%2049.9805%2056.8943C49.6357%2053.8855%2048.6962%2046.1828%2047.4542%2039.9721C46.2391%2033.8956%2044.26%2026.7803%2043.4117%2023.8207C43.1719%2022.9842%2042.4255%2022.4192%2041.5779%2022.4192H38.4174Z'%20fill='white'/%3e%3c/svg%3e", _i = 64, Ci = "empty-man", Ai = {
|
|
7561
7599
|
24: "gr-avatar--24",
|
|
7562
7600
|
32: "gr-avatar--32",
|
|
7563
7601
|
44: "gr-avatar--44",
|
|
7564
7602
|
52: "gr-avatar--52",
|
|
7565
7603
|
64: "gr-avatar--64",
|
|
7566
7604
|
80: "gr-avatar--80"
|
|
7567
|
-
},
|
|
7605
|
+
}, xi = {
|
|
7568
7606
|
"empty-man": "gr-avatar--empty-man",
|
|
7569
7607
|
"empty-woman": "gr-avatar--empty-woman",
|
|
7570
7608
|
"empty-no-gender": "gr-avatar--empty-no-gender",
|
|
7571
7609
|
"empty-business": "gr-avatar--empty-business",
|
|
7572
7610
|
text: "gr-avatar--text",
|
|
7573
7611
|
photo: "gr-avatar--photo"
|
|
7574
|
-
},
|
|
7575
|
-
"empty-man":
|
|
7576
|
-
"empty-woman":
|
|
7577
|
-
"empty-no-gender":
|
|
7578
|
-
"empty-business":
|
|
7579
|
-
},
|
|
7612
|
+
}, $e = {
|
|
7613
|
+
"empty-man": zi,
|
|
7614
|
+
"empty-woman": bi,
|
|
7615
|
+
"empty-no-gender": wi,
|
|
7616
|
+
"empty-business": ki
|
|
7617
|
+
}, Ei = (e) => {
|
|
7580
7618
|
if (!e) return "";
|
|
7581
7619
|
const t = e.trim().split(/\s+/).filter(Boolean);
|
|
7582
7620
|
return t.length ? t.slice(0, 2).map((s) => s[0]).join("").toUpperCase() : "";
|
|
7583
7621
|
};
|
|
7584
|
-
function
|
|
7585
|
-
size: e =
|
|
7586
|
-
type: t =
|
|
7622
|
+
function ks({
|
|
7623
|
+
size: e = _i,
|
|
7624
|
+
type: t = Ci,
|
|
7587
7625
|
src: i,
|
|
7588
7626
|
alt: s,
|
|
7589
7627
|
text: l,
|
|
@@ -7592,14 +7630,14 @@ function zs({
|
|
|
7592
7630
|
className: a,
|
|
7593
7631
|
...r
|
|
7594
7632
|
}) {
|
|
7595
|
-
const c = t === "photo", d = t === "text",
|
|
7633
|
+
const c = t === "photo", d = t === "text", h = (l ?? Ei(s)) || "AA", v = t === "empty-man" || t === "empty-woman" || t === "empty-no-gender" || t === "empty-business" ? $e[t] : void 0, b = $e["empty-man"];
|
|
7596
7634
|
return /* @__PURE__ */ u(
|
|
7597
7635
|
"div",
|
|
7598
7636
|
{
|
|
7599
|
-
className:
|
|
7637
|
+
className: D(
|
|
7600
7638
|
"gr-avatar",
|
|
7601
|
-
|
|
7602
|
-
|
|
7639
|
+
Ai[e],
|
|
7640
|
+
xi[t],
|
|
7603
7641
|
{
|
|
7604
7642
|
"gr-avatar--premium": n,
|
|
7605
7643
|
"gr-avatar--stroke": o
|
|
@@ -7608,85 +7646,85 @@ function zs({
|
|
|
7608
7646
|
),
|
|
7609
7647
|
...!c && {
|
|
7610
7648
|
role: "img",
|
|
7611
|
-
"aria-label": s ??
|
|
7649
|
+
"aria-label": s ?? h
|
|
7612
7650
|
},
|
|
7613
7651
|
...r,
|
|
7614
|
-
children: /* @__PURE__ */ u("span", { className: "gr-avatar__surface", children: c && i ? /* @__PURE__ */ u("img", { className: "gr-avatar__photo", src: i, alt: s ?? "" }) : d ? /* @__PURE__ */ u("span", { className: "gr-avatar__text", children:
|
|
7652
|
+
children: /* @__PURE__ */ u("span", { className: "gr-avatar__surface", children: c && i ? /* @__PURE__ */ u("img", { className: "gr-avatar__photo", src: i, alt: s ?? "" }) : d ? /* @__PURE__ */ u("span", { className: "gr-avatar__text", children: h }) : v ? /* @__PURE__ */ u("img", { className: "gr-avatar__icon", src: v, alt: "", "aria-hidden": "true" }) : c ? /* @__PURE__ */ u("img", { className: "gr-avatar__icon", src: b, alt: "", "aria-hidden": "true" }) : null })
|
|
7615
7653
|
}
|
|
7616
7654
|
);
|
|
7617
7655
|
}
|
|
7618
|
-
const
|
|
7656
|
+
const Si = 16, Fi = "primary", Ii = "none", Di = "right", Bi = {
|
|
7619
7657
|
16: "gr-link--16",
|
|
7620
7658
|
20: "gr-link--20",
|
|
7621
7659
|
24: "gr-link--24"
|
|
7622
|
-
},
|
|
7660
|
+
}, Ti = {
|
|
7623
7661
|
primary: "gr-link--tone-primary",
|
|
7624
7662
|
secondary: "gr-link--tone-secondary",
|
|
7625
7663
|
black: "gr-link--tone-black",
|
|
7626
7664
|
white: "gr-link--tone-white"
|
|
7627
|
-
},
|
|
7665
|
+
}, Mi = {
|
|
7628
7666
|
none: "gr-link--underline-none",
|
|
7629
7667
|
solid: "gr-link--underline-solid",
|
|
7630
7668
|
dotted: "gr-link--underline-dotted"
|
|
7631
7669
|
};
|
|
7632
|
-
function
|
|
7670
|
+
function _s({
|
|
7633
7671
|
label: e,
|
|
7634
7672
|
children: t,
|
|
7635
|
-
size: i =
|
|
7636
|
-
tone: s =
|
|
7637
|
-
underline: l =
|
|
7673
|
+
size: i = Si,
|
|
7674
|
+
tone: s = Fi,
|
|
7675
|
+
underline: l = Ii,
|
|
7638
7676
|
icon: n,
|
|
7639
|
-
iconPosition: o =
|
|
7677
|
+
iconPosition: o = Di,
|
|
7640
7678
|
noVisited: a = !1,
|
|
7641
7679
|
className: r,
|
|
7642
7680
|
...c
|
|
7643
7681
|
}) {
|
|
7644
|
-
const d = t ?? e,
|
|
7645
|
-
return /* @__PURE__ */
|
|
7682
|
+
const d = t ?? e, h = !!n;
|
|
7683
|
+
return /* @__PURE__ */ q(
|
|
7646
7684
|
"a",
|
|
7647
7685
|
{
|
|
7648
|
-
className:
|
|
7686
|
+
className: D(
|
|
7649
7687
|
"gr-link",
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7688
|
+
Bi[i],
|
|
7689
|
+
Ti[s],
|
|
7690
|
+
Mi[l],
|
|
7653
7691
|
{
|
|
7654
|
-
"gr-link--with-icon":
|
|
7655
|
-
"gr-link--icon-left":
|
|
7692
|
+
"gr-link--with-icon": h,
|
|
7693
|
+
"gr-link--icon-left": h && o === "left",
|
|
7656
7694
|
"gr-link--no-visited": a
|
|
7657
7695
|
},
|
|
7658
7696
|
r
|
|
7659
7697
|
),
|
|
7660
7698
|
...c,
|
|
7661
7699
|
children: [
|
|
7662
|
-
|
|
7700
|
+
h && o === "left" ? /* @__PURE__ */ u("span", { className: "gr-link__icon-wrap", "aria-hidden": "true", children: n }) : null,
|
|
7663
7701
|
d ? /* @__PURE__ */ u("span", { className: "gr-link__label", children: d }) : null,
|
|
7664
|
-
|
|
7702
|
+
h && o === "right" ? /* @__PURE__ */ u("span", { className: "gr-link__icon-wrap", "aria-hidden": "true", children: n }) : null
|
|
7665
7703
|
]
|
|
7666
7704
|
}
|
|
7667
7705
|
);
|
|
7668
7706
|
}
|
|
7669
|
-
const
|
|
7670
|
-
function
|
|
7707
|
+
const Vi = "other", Li = "default", Ri = "none", Oi = "on-primary-bg", Ni = "Необязательно";
|
|
7708
|
+
function je({
|
|
7671
7709
|
label: e = "Label",
|
|
7672
7710
|
children: t,
|
|
7673
|
-
size: i =
|
|
7674
|
-
status: s =
|
|
7675
|
-
hint: l =
|
|
7676
|
-
optionalColor: n =
|
|
7711
|
+
size: i = Vi,
|
|
7712
|
+
status: s = Li,
|
|
7713
|
+
hint: l = Ri,
|
|
7714
|
+
optionalColor: n = Oi,
|
|
7677
7715
|
className: o,
|
|
7678
7716
|
...a
|
|
7679
7717
|
}) {
|
|
7680
|
-
const r = t ?? e, c = l === "optional" || l === "optional-info", d = l === "info" || l === "optional-info",
|
|
7718
|
+
const r = t ?? e, c = l === "optional" || l === "optional-info", d = l === "info" || l === "optional-info", v = s === "disabled", b = c, k = n === "on-secondary-bg" ? "--color-background-secondary-elevated" : "--color-background-secondary";
|
|
7681
7719
|
return /* @__PURE__ */ u(
|
|
7682
7720
|
"div",
|
|
7683
7721
|
{
|
|
7684
|
-
className:
|
|
7722
|
+
className: D("gr-label", `gr-label--${i}`, `gr-label--${s}`, o),
|
|
7685
7723
|
...a,
|
|
7686
|
-
children: /* @__PURE__ */
|
|
7724
|
+
children: /* @__PURE__ */ q("div", { className: "gr-label__row", children: [
|
|
7687
7725
|
r ? /* @__PURE__ */ u("span", { className: "gr-label__text", children: r }) : null,
|
|
7688
7726
|
d ? /* @__PURE__ */ u(
|
|
7689
|
-
|
|
7727
|
+
Z,
|
|
7690
7728
|
{
|
|
7691
7729
|
className: "gr-label__icon gr-label__icon--info",
|
|
7692
7730
|
name: "question-circle",
|
|
@@ -7694,8 +7732,8 @@ function qe({
|
|
|
7694
7732
|
variant: "fill"
|
|
7695
7733
|
}
|
|
7696
7734
|
) : null,
|
|
7697
|
-
|
|
7698
|
-
|
|
7735
|
+
v ? /* @__PURE__ */ u(
|
|
7736
|
+
Z,
|
|
7699
7737
|
{
|
|
7700
7738
|
className: "gr-label__icon gr-label__icon--lock",
|
|
7701
7739
|
name: "lock",
|
|
@@ -7704,44 +7742,44 @@ function qe({
|
|
|
7704
7742
|
}
|
|
7705
7743
|
) : null,
|
|
7706
7744
|
b ? /* @__PURE__ */ u(
|
|
7707
|
-
|
|
7745
|
+
si,
|
|
7708
7746
|
{
|
|
7709
7747
|
size: 16,
|
|
7710
7748
|
variant: "custom",
|
|
7711
7749
|
className: "gr-label__badge",
|
|
7712
7750
|
customBackground: k,
|
|
7713
7751
|
customTextColor: "--color-text-secondary",
|
|
7714
|
-
children:
|
|
7752
|
+
children: Ni
|
|
7715
7753
|
}
|
|
7716
7754
|
) : null
|
|
7717
7755
|
] })
|
|
7718
7756
|
}
|
|
7719
7757
|
);
|
|
7720
7758
|
}
|
|
7721
|
-
const
|
|
7759
|
+
const qi = "default", Ui = {
|
|
7722
7760
|
default: "gr-description--default",
|
|
7723
7761
|
error: "gr-description--error",
|
|
7724
7762
|
success: "gr-description--success"
|
|
7725
7763
|
};
|
|
7726
|
-
function
|
|
7764
|
+
function Pi({
|
|
7727
7765
|
text: e = "Description",
|
|
7728
7766
|
children: t,
|
|
7729
|
-
state: i =
|
|
7767
|
+
state: i = qi,
|
|
7730
7768
|
className: s,
|
|
7731
7769
|
...l
|
|
7732
7770
|
}) {
|
|
7733
7771
|
const n = t ?? e;
|
|
7734
|
-
return /* @__PURE__ */ u("p", { className:
|
|
7772
|
+
return /* @__PURE__ */ u("p", { className: D("gr-description", Ui[i], s), ...l, children: n });
|
|
7735
7773
|
}
|
|
7736
|
-
function
|
|
7774
|
+
function N(e) {
|
|
7737
7775
|
return typeof e == "string" || e instanceof String;
|
|
7738
7776
|
}
|
|
7739
|
-
function
|
|
7777
|
+
function Ze(e) {
|
|
7740
7778
|
var t;
|
|
7741
7779
|
return typeof e == "object" && e != null && (e == null || (t = e.constructor) == null ? void 0 : t.name) === "Object";
|
|
7742
7780
|
}
|
|
7743
|
-
function
|
|
7744
|
-
return Array.isArray(t) ?
|
|
7781
|
+
function Ge(e, t) {
|
|
7782
|
+
return Array.isArray(t) ? Ge(e, (i, s) => t.includes(s)) : Object.entries(e).reduce((i, s) => {
|
|
7745
7783
|
let [l, n] = s;
|
|
7746
7784
|
return t(n, l) && (i[l] = n), i;
|
|
7747
7785
|
}, {});
|
|
@@ -7753,7 +7791,7 @@ const f = {
|
|
|
7753
7791
|
RIGHT: "RIGHT",
|
|
7754
7792
|
FORCE_RIGHT: "FORCE_RIGHT"
|
|
7755
7793
|
};
|
|
7756
|
-
function
|
|
7794
|
+
function $i(e) {
|
|
7757
7795
|
switch (e) {
|
|
7758
7796
|
case f.LEFT:
|
|
7759
7797
|
return f.FORCE_LEFT;
|
|
@@ -7763,16 +7801,16 @@ function qi(e) {
|
|
|
7763
7801
|
return e;
|
|
7764
7802
|
}
|
|
7765
7803
|
}
|
|
7766
|
-
function
|
|
7804
|
+
function ze(e) {
|
|
7767
7805
|
return e.replace(/([.*+?^=!:${}()|[\]/\\])/g, "\\$1");
|
|
7768
7806
|
}
|
|
7769
|
-
function
|
|
7807
|
+
function ce(e, t) {
|
|
7770
7808
|
if (t === e) return !0;
|
|
7771
7809
|
const i = Array.isArray(t), s = Array.isArray(e);
|
|
7772
7810
|
let l;
|
|
7773
7811
|
if (i && s) {
|
|
7774
7812
|
if (t.length != e.length) return !1;
|
|
7775
|
-
for (l = 0; l < t.length; l++) if (!
|
|
7813
|
+
for (l = 0; l < t.length; l++) if (!ce(t[l], e[l])) return !1;
|
|
7776
7814
|
return !0;
|
|
7777
7815
|
}
|
|
7778
7816
|
if (i != s) return !1;
|
|
@@ -7785,13 +7823,13 @@ function ae(e, t) {
|
|
|
7785
7823
|
if (a != r) return !1;
|
|
7786
7824
|
const c = Object.keys(t);
|
|
7787
7825
|
for (l = 0; l < c.length; l++) if (!Object.prototype.hasOwnProperty.call(e, c[l])) return !1;
|
|
7788
|
-
for (l = 0; l < c.length; l++) if (!
|
|
7826
|
+
for (l = 0; l < c.length; l++) if (!ce(e[c[l]], t[c[l]])) return !1;
|
|
7789
7827
|
return !0;
|
|
7790
7828
|
} else if (t && e && typeof t == "function" && typeof e == "function")
|
|
7791
7829
|
return t.toString() === e.toString();
|
|
7792
7830
|
return !1;
|
|
7793
7831
|
}
|
|
7794
|
-
class
|
|
7832
|
+
class ji {
|
|
7795
7833
|
/** Current input value */
|
|
7796
7834
|
/** Current cursor position */
|
|
7797
7835
|
/** Old input value */
|
|
@@ -7838,49 +7876,49 @@ class Ui {
|
|
|
7838
7876
|
this.oldSelection.end === this.oldSelection.start ? f.RIGHT : f.LEFT;
|
|
7839
7877
|
}
|
|
7840
7878
|
}
|
|
7841
|
-
function
|
|
7842
|
-
return new
|
|
7879
|
+
function p(e, t) {
|
|
7880
|
+
return new p.InputMask(e, t);
|
|
7843
7881
|
}
|
|
7844
|
-
function
|
|
7882
|
+
function We(e) {
|
|
7845
7883
|
if (e == null) throw new Error("mask property should be defined");
|
|
7846
|
-
return e instanceof RegExp ?
|
|
7884
|
+
return e instanceof RegExp ? p.MaskedRegExp : N(e) ? p.MaskedPattern : e === Date ? p.MaskedDate : e === Number ? p.MaskedNumber : Array.isArray(e) || e === Array ? p.MaskedDynamic : p.Masked && e.prototype instanceof p.Masked ? e : p.Masked && e instanceof p.Masked ? e.constructor : e instanceof Function ? p.MaskedFunction : (console.warn("Mask not found for mask", e), p.Masked);
|
|
7847
7885
|
}
|
|
7848
7886
|
function X(e) {
|
|
7849
7887
|
if (!e) throw new Error("Options in not defined");
|
|
7850
|
-
if (
|
|
7851
|
-
if (e.prototype instanceof
|
|
7888
|
+
if (p.Masked) {
|
|
7889
|
+
if (e.prototype instanceof p.Masked) return {
|
|
7852
7890
|
mask: e
|
|
7853
7891
|
};
|
|
7854
7892
|
const {
|
|
7855
7893
|
mask: t = void 0,
|
|
7856
7894
|
...i
|
|
7857
|
-
} = e instanceof
|
|
7895
|
+
} = e instanceof p.Masked ? {
|
|
7858
7896
|
mask: e
|
|
7859
|
-
} :
|
|
7897
|
+
} : Ze(e) && e.mask instanceof p.Masked ? e : {};
|
|
7860
7898
|
if (t) {
|
|
7861
7899
|
const s = t.mask;
|
|
7862
7900
|
return {
|
|
7863
|
-
...
|
|
7901
|
+
...Ge(t, (l, n) => !n.startsWith("_")),
|
|
7864
7902
|
mask: t.constructor,
|
|
7865
7903
|
_mask: s,
|
|
7866
7904
|
...i
|
|
7867
7905
|
};
|
|
7868
7906
|
}
|
|
7869
7907
|
}
|
|
7870
|
-
return
|
|
7908
|
+
return Ze(e) ? {
|
|
7871
7909
|
...e
|
|
7872
7910
|
} : {
|
|
7873
7911
|
mask: e
|
|
7874
7912
|
};
|
|
7875
7913
|
}
|
|
7876
|
-
function
|
|
7877
|
-
if (
|
|
7878
|
-
const t = X(e), i =
|
|
7914
|
+
function R(e) {
|
|
7915
|
+
if (p.Masked && e instanceof p.Masked) return e;
|
|
7916
|
+
const t = X(e), i = We(t.mask);
|
|
7879
7917
|
if (!i) throw new Error("Masked class is not found for provided mask " + t.mask + ", appropriate module needs to be imported manually before creating mask.");
|
|
7880
7918
|
return t.mask === i && delete t.mask, t._mask && (t.mask = t._mask, delete t._mask), new i(t);
|
|
7881
7919
|
}
|
|
7882
|
-
|
|
7883
|
-
class
|
|
7920
|
+
p.createMask = R;
|
|
7921
|
+
class we {
|
|
7884
7922
|
/** */
|
|
7885
7923
|
/** */
|
|
7886
7924
|
/** */
|
|
@@ -7918,9 +7956,9 @@ class ze {
|
|
|
7918
7956
|
/** */
|
|
7919
7957
|
/** */
|
|
7920
7958
|
}
|
|
7921
|
-
|
|
7922
|
-
const
|
|
7923
|
-
class
|
|
7959
|
+
p.MaskElement = we;
|
|
7960
|
+
const He = 90, Zi = 89;
|
|
7961
|
+
class ue extends we {
|
|
7924
7962
|
/** HTMLElement to use mask on */
|
|
7925
7963
|
constructor(t) {
|
|
7926
7964
|
super(), this.input = t, this._onKeydown = this._onKeydown.bind(this), this._onInput = this._onInput.bind(this), this._onBeforeinput = this._onBeforeinput.bind(this), this._onCompositionEnd = this._onCompositionEnd.bind(this);
|
|
@@ -7938,9 +7976,9 @@ class ce extends ze {
|
|
|
7938
7976
|
this.input.addEventListener("keydown", this._onKeydown), this.input.addEventListener("input", this._onInput), this.input.addEventListener("beforeinput", this._onBeforeinput), this.input.addEventListener("compositionend", this._onCompositionEnd), this.input.addEventListener("drop", t.drop), this.input.addEventListener("click", t.click), this.input.addEventListener("focus", t.focus), this.input.addEventListener("blur", t.commit), this._handlers = t;
|
|
7939
7977
|
}
|
|
7940
7978
|
_onKeydown(t) {
|
|
7941
|
-
if (this._handlers.redo && (t.keyCode ===
|
|
7979
|
+
if (this._handlers.redo && (t.keyCode === He && t.shiftKey && (t.metaKey || t.ctrlKey) || t.keyCode === Zi && t.ctrlKey))
|
|
7942
7980
|
return t.preventDefault(), this._handlers.redo(t);
|
|
7943
|
-
if (this._handlers.undo && t.keyCode ===
|
|
7981
|
+
if (this._handlers.undo && t.keyCode === He && (t.metaKey || t.ctrlKey))
|
|
7944
7982
|
return t.preventDefault(), this._handlers.undo(t);
|
|
7945
7983
|
t.isComposing || this._handlers.selectionChange(t);
|
|
7946
7984
|
}
|
|
@@ -7961,8 +7999,8 @@ class ce extends ze {
|
|
|
7961
7999
|
this.input.removeEventListener("keydown", this._onKeydown), this.input.removeEventListener("input", this._onInput), this.input.removeEventListener("beforeinput", this._onBeforeinput), this.input.removeEventListener("compositionend", this._onCompositionEnd), this.input.removeEventListener("drop", this._handlers.drop), this.input.removeEventListener("click", this._handlers.click), this.input.removeEventListener("focus", this._handlers.focus), this.input.removeEventListener("blur", this._handlers.commit), this._handlers = {};
|
|
7962
8000
|
}
|
|
7963
8001
|
}
|
|
7964
|
-
|
|
7965
|
-
class
|
|
8002
|
+
p.HTMLMaskElement = ue;
|
|
8003
|
+
class Hi extends ue {
|
|
7966
8004
|
/** InputElement to use mask on */
|
|
7967
8005
|
constructor(t) {
|
|
7968
8006
|
super(t), this.input = t;
|
|
@@ -7986,8 +8024,8 @@ class $i extends ce {
|
|
|
7986
8024
|
this.input.value = t;
|
|
7987
8025
|
}
|
|
7988
8026
|
}
|
|
7989
|
-
|
|
7990
|
-
class
|
|
8027
|
+
p.HTMLMaskElement = ue;
|
|
8028
|
+
class Xe extends ue {
|
|
7991
8029
|
/** Returns HTMLElement selection start */
|
|
7992
8030
|
get _unsafeSelectionStart() {
|
|
7993
8031
|
const t = this.rootElement, i = t.getSelection && t.getSelection(), s = i && i.anchorOffset, l = i && i.focusOffset;
|
|
@@ -8014,8 +8052,8 @@ class Ke extends ce {
|
|
|
8014
8052
|
this.input.textContent = t;
|
|
8015
8053
|
}
|
|
8016
8054
|
}
|
|
8017
|
-
|
|
8018
|
-
class
|
|
8055
|
+
p.HTMLContenteditableMaskElement = Xe;
|
|
8056
|
+
class de {
|
|
8019
8057
|
constructor() {
|
|
8020
8058
|
this.states = [], this.currentIndex = 0;
|
|
8021
8059
|
}
|
|
@@ -8026,7 +8064,7 @@ class fe {
|
|
|
8026
8064
|
return this.states.length === 0;
|
|
8027
8065
|
}
|
|
8028
8066
|
push(t) {
|
|
8029
|
-
this.currentIndex < this.states.length - 1 && (this.states.length = this.currentIndex + 1), this.states.push(t), this.states.length >
|
|
8067
|
+
this.currentIndex < this.states.length - 1 && (this.states.length = this.currentIndex + 1), this.states.push(t), this.states.length > de.MAX_LENGTH && this.states.shift(), this.currentIndex = this.states.length - 1;
|
|
8030
8068
|
}
|
|
8031
8069
|
go(t) {
|
|
8032
8070
|
return this.currentIndex = Math.min(Math.max(this.currentIndex + t, 0), this.states.length - 1), this.currentState;
|
|
@@ -8041,14 +8079,14 @@ class fe {
|
|
|
8041
8079
|
this.states.length = 0, this.currentIndex = 0;
|
|
8042
8080
|
}
|
|
8043
8081
|
}
|
|
8044
|
-
|
|
8045
|
-
class
|
|
8082
|
+
de.MAX_LENGTH = 100;
|
|
8083
|
+
class Ki {
|
|
8046
8084
|
/**
|
|
8047
8085
|
View element
|
|
8048
8086
|
*/
|
|
8049
8087
|
/** Internal {@link Masked} model */
|
|
8050
8088
|
constructor(t, i) {
|
|
8051
|
-
this.el = t instanceof
|
|
8089
|
+
this.el = t instanceof we ? t : t.isContentEditable && t.tagName !== "INPUT" && t.tagName !== "TEXTAREA" ? new Xe(t) : new Hi(t), this.masked = R(i), this._listeners = {}, this._value = "", this._unmaskedValue = "", this._rawInputValue = "", this.history = new de(), this._saveSelection = this._saveSelection.bind(this), this._onInput = this._onInput.bind(this), this._onChange = this._onChange.bind(this), this._onDrop = this._onDrop.bind(this), this._onFocus = this._onFocus.bind(this), this._onClick = this._onClick.bind(this), this._onUndo = this._onUndo.bind(this), this._onRedo = this._onRedo.bind(this), this.alignCursor = this.alignCursor.bind(this), this.alignCursorFriendly = this.alignCursorFriendly.bind(this), this._bindEvents(), this.updateValue(), this._onChange();
|
|
8052
8090
|
}
|
|
8053
8091
|
maskEquals(t) {
|
|
8054
8092
|
var i;
|
|
@@ -8060,13 +8098,13 @@ class ji {
|
|
|
8060
8098
|
}
|
|
8061
8099
|
set mask(t) {
|
|
8062
8100
|
if (this.maskEquals(t)) return;
|
|
8063
|
-
if (!(t instanceof
|
|
8101
|
+
if (!(t instanceof p.Masked) && this.masked.constructor === We(t)) {
|
|
8064
8102
|
this.masked.updateOptions({
|
|
8065
8103
|
mask: t
|
|
8066
8104
|
});
|
|
8067
8105
|
return;
|
|
8068
8106
|
}
|
|
8069
|
-
const i = t instanceof
|
|
8107
|
+
const i = t instanceof p.Masked ? t : R({
|
|
8070
8108
|
mask: t
|
|
8071
8109
|
});
|
|
8072
8110
|
i.unmaskedValue = this.masked.unmaskedValue, this.masked = i;
|
|
@@ -8207,7 +8245,7 @@ class ji {
|
|
|
8207
8245
|
/** Handles view input event */
|
|
8208
8246
|
_onInput(t) {
|
|
8209
8247
|
this._inputEvent = t, this._abortUpdateCursor();
|
|
8210
|
-
const i = new
|
|
8248
|
+
const i = new ji({
|
|
8211
8249
|
// new state
|
|
8212
8250
|
value: this.el.value,
|
|
8213
8251
|
cursorPos: this.cursorPos,
|
|
@@ -8251,14 +8289,14 @@ class ji {
|
|
|
8251
8289
|
this._unbindEvents(), this._listeners.length = 0, delete this.el;
|
|
8252
8290
|
}
|
|
8253
8291
|
}
|
|
8254
|
-
|
|
8255
|
-
class
|
|
8292
|
+
p.InputMask = Ki;
|
|
8293
|
+
class g {
|
|
8256
8294
|
/** Inserted symbols */
|
|
8257
8295
|
/** Additional offset if any changes occurred before tail */
|
|
8258
8296
|
/** Raw inserted is used by dynamic mask */
|
|
8259
8297
|
/** Can skip chars */
|
|
8260
8298
|
static normalize(t) {
|
|
8261
|
-
return Array.isArray(t) ? t : [t, new
|
|
8299
|
+
return Array.isArray(t) ? t : [t, new g()];
|
|
8262
8300
|
}
|
|
8263
8301
|
constructor(t) {
|
|
8264
8302
|
Object.assign(this, {
|
|
@@ -8283,8 +8321,8 @@ class p {
|
|
|
8283
8321
|
return this.inserted === t.inserted && this.tailShift === t.tailShift && this.rawInserted === t.rawInserted && this.skip === t.skip;
|
|
8284
8322
|
}
|
|
8285
8323
|
}
|
|
8286
|
-
|
|
8287
|
-
class
|
|
8324
|
+
p.ChangeDetails = g;
|
|
8325
|
+
class V {
|
|
8288
8326
|
/** Tail value as string */
|
|
8289
8327
|
/** Tail start position */
|
|
8290
8328
|
/** Start position */
|
|
@@ -8323,7 +8361,7 @@ class M {
|
|
|
8323
8361
|
return this.value = this.value.slice(0, -1), t;
|
|
8324
8362
|
}
|
|
8325
8363
|
}
|
|
8326
|
-
class
|
|
8364
|
+
class C {
|
|
8327
8365
|
/** */
|
|
8328
8366
|
/** */
|
|
8329
8367
|
/** Transforms value before mask processing */
|
|
@@ -8339,7 +8377,7 @@ class _ {
|
|
|
8339
8377
|
/** */
|
|
8340
8378
|
constructor(t) {
|
|
8341
8379
|
this._value = "", this._update({
|
|
8342
|
-
...
|
|
8380
|
+
...C.DEFAULTS,
|
|
8343
8381
|
...t
|
|
8344
8382
|
}), this._initialized = !0;
|
|
8345
8383
|
}
|
|
@@ -8424,18 +8462,18 @@ class _ {
|
|
|
8424
8462
|
}
|
|
8425
8463
|
/** Extracts tail in range */
|
|
8426
8464
|
extractTail(t, i) {
|
|
8427
|
-
return t === void 0 && (t = 0), i === void 0 && (i = this.displayValue.length), new
|
|
8465
|
+
return t === void 0 && (t = 0), i === void 0 && (i = this.displayValue.length), new V(this.extractInput(t, i), t);
|
|
8428
8466
|
}
|
|
8429
8467
|
/** Appends tail */
|
|
8430
8468
|
appendTail(t) {
|
|
8431
|
-
return
|
|
8469
|
+
return N(t) && (t = new V(String(t))), t.appendTo(this);
|
|
8432
8470
|
}
|
|
8433
8471
|
/** Appends char */
|
|
8434
8472
|
_appendCharRaw(t, i) {
|
|
8435
|
-
return t ? (this._value += t, new
|
|
8473
|
+
return t ? (this._value += t, new g({
|
|
8436
8474
|
inserted: t,
|
|
8437
8475
|
rawInserted: t
|
|
8438
|
-
})) : new
|
|
8476
|
+
})) : new g();
|
|
8439
8477
|
}
|
|
8440
8478
|
/** Appends char */
|
|
8441
8479
|
_appendChar(t, i, s) {
|
|
@@ -8467,22 +8505,22 @@ class _ {
|
|
|
8467
8505
|
}
|
|
8468
8506
|
a && c.inserted && (this.state = r);
|
|
8469
8507
|
}
|
|
8470
|
-
a || (n = new
|
|
8508
|
+
a || (n = new g(), this.state = l, s && o && (s.state = o));
|
|
8471
8509
|
}
|
|
8472
8510
|
return n;
|
|
8473
8511
|
}
|
|
8474
8512
|
/** Appends optional placeholder at the end */
|
|
8475
8513
|
_appendPlaceholder() {
|
|
8476
|
-
return new
|
|
8514
|
+
return new g();
|
|
8477
8515
|
}
|
|
8478
8516
|
/** Appends optional eager placeholder at the end */
|
|
8479
8517
|
_appendEager() {
|
|
8480
|
-
return new
|
|
8518
|
+
return new g();
|
|
8481
8519
|
}
|
|
8482
8520
|
/** Appends symbols considering flags */
|
|
8483
8521
|
append(t, i, s) {
|
|
8484
|
-
if (!
|
|
8485
|
-
const l =
|
|
8522
|
+
if (!N(t)) throw new Error("value should be string");
|
|
8523
|
+
const l = N(s) ? new V(String(s)) : s;
|
|
8486
8524
|
i != null && i.tail && (i._beforeTailState = this.state);
|
|
8487
8525
|
let n;
|
|
8488
8526
|
[t, n] = this.doPrepare(t, i);
|
|
@@ -8494,7 +8532,7 @@ class _ {
|
|
|
8494
8532
|
return (this.eager === !0 || this.eager === "append") && i != null && i.input && t && n.aggregate(this._appendEager()), l != null && (n.tailShift += this.appendTail(l).tailShift), n;
|
|
8495
8533
|
}
|
|
8496
8534
|
remove(t, i) {
|
|
8497
|
-
return t === void 0 && (t = 0), i === void 0 && (i = this.displayValue.length), this._value = this.displayValue.slice(0, t) + this.displayValue.slice(i), new
|
|
8535
|
+
return t === void 0 && (t = 0), i === void 0 && (i = this.displayValue.length), this._value = this.displayValue.slice(0, t) + this.displayValue.slice(i), new g();
|
|
8498
8536
|
}
|
|
8499
8537
|
/** Calls function and reapplies current value */
|
|
8500
8538
|
withValueRefresh(t) {
|
|
@@ -8514,11 +8552,11 @@ class _ {
|
|
|
8514
8552
|
}
|
|
8515
8553
|
/** Prepares string before mask processing */
|
|
8516
8554
|
doPrepare(t, i) {
|
|
8517
|
-
return i === void 0 && (i = {}),
|
|
8555
|
+
return i === void 0 && (i = {}), g.normalize(this.prepare ? this.prepare(t, this, i) : t);
|
|
8518
8556
|
}
|
|
8519
8557
|
/** Prepares each char before mask processing */
|
|
8520
8558
|
doPrepareChar(t, i) {
|
|
8521
|
-
return i === void 0 && (i = {}),
|
|
8559
|
+
return i === void 0 && (i = {}), g.normalize(this.prepareChar ? this.prepareChar(t, this, i) : t);
|
|
8522
8560
|
}
|
|
8523
8561
|
/** Validates if value is acceptable */
|
|
8524
8562
|
doValidate(t) {
|
|
@@ -8534,41 +8572,41 @@ class _ {
|
|
|
8534
8572
|
});
|
|
8535
8573
|
const o = t + i, a = this.extractTail(o), r = this.eager === !0 || this.eager === "remove";
|
|
8536
8574
|
let c;
|
|
8537
|
-
r && (l =
|
|
8575
|
+
r && (l = $i(l), c = this.extractInput(0, o, {
|
|
8538
8576
|
raw: !0
|
|
8539
8577
|
}));
|
|
8540
8578
|
let d = t;
|
|
8541
|
-
const
|
|
8542
|
-
if (l !== f.NONE && (d = this.nearestInputPos(t, i > 1 && t !== 0 && !r ? f.NONE : l),
|
|
8579
|
+
const h = new g();
|
|
8580
|
+
if (l !== f.NONE && (d = this.nearestInputPos(t, i > 1 && t !== 0 && !r ? f.NONE : l), h.tailShift = d - t), h.aggregate(this.remove(d)), r && l !== f.NONE && c === this.rawInputValue)
|
|
8543
8581
|
if (l === f.FORCE_LEFT) {
|
|
8544
|
-
let
|
|
8545
|
-
for (; c === this.rawInputValue && (
|
|
8546
|
-
|
|
8582
|
+
let v;
|
|
8583
|
+
for (; c === this.rawInputValue && (v = this.displayValue.length); )
|
|
8584
|
+
h.aggregate(new g({
|
|
8547
8585
|
tailShift: -1
|
|
8548
|
-
})).aggregate(this.remove(
|
|
8586
|
+
})).aggregate(this.remove(v - 1));
|
|
8549
8587
|
} else l === f.FORCE_RIGHT && a.unshift();
|
|
8550
|
-
return
|
|
8588
|
+
return h.aggregate(this.append(s, n, a));
|
|
8551
8589
|
}
|
|
8552
8590
|
maskEquals(t) {
|
|
8553
8591
|
return this.mask === t;
|
|
8554
8592
|
}
|
|
8555
8593
|
optionsIsChanged(t) {
|
|
8556
|
-
return !
|
|
8594
|
+
return !ce(this, t);
|
|
8557
8595
|
}
|
|
8558
8596
|
typedValueEquals(t) {
|
|
8559
8597
|
const i = this.typedValue;
|
|
8560
|
-
return t === i ||
|
|
8598
|
+
return t === i || C.EMPTY_VALUES.includes(t) && C.EMPTY_VALUES.includes(i) || (this.format ? this.format(t, this) === this.format(this.typedValue, this) : !1);
|
|
8561
8599
|
}
|
|
8562
8600
|
pad(t) {
|
|
8563
|
-
return new
|
|
8601
|
+
return new g();
|
|
8564
8602
|
}
|
|
8565
8603
|
}
|
|
8566
|
-
|
|
8604
|
+
C.DEFAULTS = {
|
|
8567
8605
|
skipInvalid: !0
|
|
8568
8606
|
};
|
|
8569
|
-
|
|
8570
|
-
|
|
8571
|
-
class
|
|
8607
|
+
C.EMPTY_VALUES = [void 0, null, ""];
|
|
8608
|
+
p.Masked = C;
|
|
8609
|
+
class j {
|
|
8572
8610
|
/** */
|
|
8573
8611
|
constructor(t, i) {
|
|
8574
8612
|
t === void 0 && (t = []), i === void 0 && (i = 0), this.chunks = t, this.from = i;
|
|
@@ -8578,13 +8616,13 @@ class $ {
|
|
|
8578
8616
|
}
|
|
8579
8617
|
extend(t) {
|
|
8580
8618
|
if (!String(t)) return;
|
|
8581
|
-
t =
|
|
8619
|
+
t = N(t) ? new V(String(t)) : t;
|
|
8582
8620
|
const i = this.chunks[this.chunks.length - 1], s = i && // if stops are same or tail has no stop
|
|
8583
8621
|
(i.stop === t.stop || t.stop == null) && // if tail chunk goes just after last chunk
|
|
8584
8622
|
t.from === i.from + i.toString().length;
|
|
8585
|
-
if (t instanceof
|
|
8623
|
+
if (t instanceof V)
|
|
8586
8624
|
s ? i.extend(t.toString()) : this.chunks.push(t);
|
|
8587
|
-
else if (t instanceof
|
|
8625
|
+
else if (t instanceof j) {
|
|
8588
8626
|
if (t.stop == null) {
|
|
8589
8627
|
let l;
|
|
8590
8628
|
for (; t.chunks.length && t.chunks[0].stop == null; )
|
|
@@ -8594,15 +8632,15 @@ class $ {
|
|
|
8594
8632
|
}
|
|
8595
8633
|
}
|
|
8596
8634
|
appendTo(t) {
|
|
8597
|
-
if (!(t instanceof
|
|
8598
|
-
return new
|
|
8599
|
-
const i = new
|
|
8635
|
+
if (!(t instanceof p.MaskedPattern))
|
|
8636
|
+
return new V(this.toString()).appendTo(t);
|
|
8637
|
+
const i = new g();
|
|
8600
8638
|
for (let s = 0; s < this.chunks.length; ++s) {
|
|
8601
8639
|
const l = this.chunks[s], n = t._mapPosToBlock(t.displayValue.length), o = l.stop;
|
|
8602
8640
|
let a;
|
|
8603
8641
|
if (o != null && // if block not found or stop is behind lastBlock
|
|
8604
|
-
(!n || n.index <= o) && ((l instanceof
|
|
8605
|
-
t._stops.indexOf(o) >= 0) && i.aggregate(t._appendPlaceholder(o)), a = l instanceof
|
|
8642
|
+
(!n || n.index <= o) && ((l instanceof j || // for continuous block also check if stop is exist
|
|
8643
|
+
t._stops.indexOf(o) >= 0) && i.aggregate(t._appendPlaceholder(o)), a = l instanceof j && t._blocks[o]), a) {
|
|
8606
8644
|
const r = a.appendTail(l);
|
|
8607
8645
|
i.aggregate(r);
|
|
8608
8646
|
const c = l.toString().slice(r.rawInserted.length);
|
|
@@ -8630,7 +8668,7 @@ class $ {
|
|
|
8630
8668
|
...s
|
|
8631
8669
|
} = t;
|
|
8632
8670
|
Object.assign(this, s), this.chunks = i.map((l) => {
|
|
8633
|
-
const n = "chunks" in l ? new
|
|
8671
|
+
const n = "chunks" in l ? new j() : new V();
|
|
8634
8672
|
return n.state = l, n;
|
|
8635
8673
|
});
|
|
8636
8674
|
}
|
|
@@ -8664,7 +8702,7 @@ class $ {
|
|
|
8664
8702
|
return "";
|
|
8665
8703
|
}
|
|
8666
8704
|
}
|
|
8667
|
-
class
|
|
8705
|
+
class Yi {
|
|
8668
8706
|
constructor(t, i) {
|
|
8669
8707
|
this.masked = t, this._log = [];
|
|
8670
8708
|
const {
|
|
@@ -8760,7 +8798,7 @@ class Zi {
|
|
|
8760
8798
|
});
|
|
8761
8799
|
}
|
|
8762
8800
|
}
|
|
8763
|
-
class
|
|
8801
|
+
class Je {
|
|
8764
8802
|
/** */
|
|
8765
8803
|
/** */
|
|
8766
8804
|
/** */
|
|
@@ -8786,7 +8824,7 @@ class Ye {
|
|
|
8786
8824
|
this._isRawInput = !1, this._value = "";
|
|
8787
8825
|
}
|
|
8788
8826
|
remove(t, i) {
|
|
8789
|
-
return t === void 0 && (t = 0), i === void 0 && (i = this._value.length), this._value = this._value.slice(0, t) + this._value.slice(i), this._value || (this._isRawInput = !1), new
|
|
8827
|
+
return t === void 0 && (t = 0), i === void 0 && (i = this._value.length), this._value = this._value.slice(0, t) + this._value.slice(i), this._value || (this._isRawInput = !1), new g();
|
|
8790
8828
|
}
|
|
8791
8829
|
nearestInputPos(t, i) {
|
|
8792
8830
|
i === void 0 && (i = f.NONE);
|
|
@@ -8815,8 +8853,8 @@ class Ye {
|
|
|
8815
8853
|
return !!this._value;
|
|
8816
8854
|
}
|
|
8817
8855
|
_appendChar(t, i) {
|
|
8818
|
-
if (i === void 0 && (i = {}), this.isFilled) return new
|
|
8819
|
-
const s = this.eager === !0 || this.eager === "append", n = this.char === t && (this.isUnmasking || i.input || i.raw) && (!i.raw || !s) && !i.tail, o = new
|
|
8856
|
+
if (i === void 0 && (i = {}), this.isFilled) return new g();
|
|
8857
|
+
const s = this.eager === !0 || this.eager === "append", n = this.char === t && (this.isUnmasking || i.input || i.raw) && (!i.raw || !s) && !i.tail, o = new g({
|
|
8820
8858
|
inserted: this.char,
|
|
8821
8859
|
rawInserted: n ? this.char : ""
|
|
8822
8860
|
});
|
|
@@ -8828,14 +8866,14 @@ class Ye {
|
|
|
8828
8866
|
});
|
|
8829
8867
|
}
|
|
8830
8868
|
_appendPlaceholder() {
|
|
8831
|
-
const t = new
|
|
8869
|
+
const t = new g();
|
|
8832
8870
|
return this.isFilled || (this._value = t.inserted = this.char), t;
|
|
8833
8871
|
}
|
|
8834
8872
|
extractTail() {
|
|
8835
|
-
return new
|
|
8873
|
+
return new V("");
|
|
8836
8874
|
}
|
|
8837
8875
|
appendTail(t) {
|
|
8838
|
-
return
|
|
8876
|
+
return N(t) && (t = new V(String(t))), t.appendTo(this);
|
|
8839
8877
|
}
|
|
8840
8878
|
append(t, i, s) {
|
|
8841
8879
|
const l = this._appendChar(t[0], i);
|
|
@@ -8856,7 +8894,7 @@ class Ye {
|
|
|
8856
8894
|
return this._appendPlaceholder();
|
|
8857
8895
|
}
|
|
8858
8896
|
}
|
|
8859
|
-
class
|
|
8897
|
+
class fe {
|
|
8860
8898
|
/** */
|
|
8861
8899
|
/** */
|
|
8862
8900
|
/** */
|
|
@@ -8875,7 +8913,7 @@ class re {
|
|
|
8875
8913
|
eager: a,
|
|
8876
8914
|
...r
|
|
8877
8915
|
} = t;
|
|
8878
|
-
this.masked =
|
|
8916
|
+
this.masked = R(r), Object.assign(this, {
|
|
8879
8917
|
parent: i,
|
|
8880
8918
|
isOptional: s,
|
|
8881
8919
|
placeholderChar: l,
|
|
@@ -8888,7 +8926,7 @@ class re {
|
|
|
8888
8926
|
this.isFilled = !1, this.masked.reset();
|
|
8889
8927
|
}
|
|
8890
8928
|
remove(t, i) {
|
|
8891
|
-
return t === void 0 && (t = 0), i === void 0 && (i = this.value.length), t === 0 && i >= 1 ? (this.isFilled = !1, this.masked.remove(t, i)) : new
|
|
8929
|
+
return t === void 0 && (t = 0), i === void 0 && (i = this.value.length), t === 0 && i >= 1 ? (this.isFilled = !1, this.masked.remove(t, i)) : new g();
|
|
8892
8930
|
}
|
|
8893
8931
|
get value() {
|
|
8894
8932
|
return this.masked.value || (this.isFilled && !this.isOptional ? this.placeholderChar : "");
|
|
@@ -8906,21 +8944,21 @@ class re {
|
|
|
8906
8944
|
return !!this.masked.value || this.isOptional;
|
|
8907
8945
|
}
|
|
8908
8946
|
_appendChar(t, i) {
|
|
8909
|
-
if (i === void 0 && (i = {}), this.isFilled) return new
|
|
8947
|
+
if (i === void 0 && (i = {}), this.isFilled) return new g();
|
|
8910
8948
|
const s = this.masked.state;
|
|
8911
8949
|
let l = this.masked._appendChar(t, this.currentMaskFlags(i));
|
|
8912
|
-
return l.inserted && this.doValidate(i) === !1 && (l = new
|
|
8950
|
+
return l.inserted && this.doValidate(i) === !1 && (l = new g(), this.masked.state = s), !l.inserted && !this.isOptional && !this.lazy && !i.input && (l.inserted = this.placeholderChar), l.skip = !l.inserted && !this.isOptional, this.isFilled = !!l.inserted, l;
|
|
8913
8951
|
}
|
|
8914
8952
|
append(t, i, s) {
|
|
8915
8953
|
return this.masked.append(t, this.currentMaskFlags(i), s);
|
|
8916
8954
|
}
|
|
8917
8955
|
_appendPlaceholder() {
|
|
8918
|
-
return this.isFilled || this.isOptional ? new
|
|
8956
|
+
return this.isFilled || this.isOptional ? new g() : (this.isFilled = !0, new g({
|
|
8919
8957
|
inserted: this.placeholderChar
|
|
8920
8958
|
}));
|
|
8921
8959
|
}
|
|
8922
8960
|
_appendEager() {
|
|
8923
|
-
return new
|
|
8961
|
+
return new g();
|
|
8924
8962
|
}
|
|
8925
8963
|
extractTail(t, i) {
|
|
8926
8964
|
return this.masked.extractTail(t, i);
|
|
@@ -8974,16 +9012,16 @@ class re {
|
|
|
8974
9012
|
};
|
|
8975
9013
|
}
|
|
8976
9014
|
pad(t) {
|
|
8977
|
-
return new
|
|
9015
|
+
return new g();
|
|
8978
9016
|
}
|
|
8979
9017
|
}
|
|
8980
|
-
|
|
9018
|
+
fe.DEFAULT_DEFINITIONS = {
|
|
8981
9019
|
0: /\d/,
|
|
8982
9020
|
a: /[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,
|
|
8983
9021
|
// http://stackoverflow.com/a/22075070
|
|
8984
9022
|
"*": /./
|
|
8985
9023
|
};
|
|
8986
|
-
class
|
|
9024
|
+
class Gi extends C {
|
|
8987
9025
|
/** */
|
|
8988
9026
|
/** Enable characters overwriting */
|
|
8989
9027
|
/** */
|
|
@@ -8997,8 +9035,8 @@ class Hi extends _ {
|
|
|
8997
9035
|
i && (t.validate = (s) => s.search(i) >= 0), super._update(t);
|
|
8998
9036
|
}
|
|
8999
9037
|
}
|
|
9000
|
-
|
|
9001
|
-
class
|
|
9038
|
+
p.MaskedRegExp = Gi;
|
|
9039
|
+
class A extends C {
|
|
9002
9040
|
/** */
|
|
9003
9041
|
/** */
|
|
9004
9042
|
/** Single char for empty input */
|
|
@@ -9010,9 +9048,9 @@ class C extends _ {
|
|
|
9010
9048
|
/** */
|
|
9011
9049
|
constructor(t) {
|
|
9012
9050
|
super({
|
|
9013
|
-
...
|
|
9051
|
+
...A.DEFAULTS,
|
|
9014
9052
|
...t,
|
|
9015
|
-
definitions: Object.assign({},
|
|
9053
|
+
definitions: Object.assign({}, fe.DEFAULT_DEFINITIONS, t == null ? void 0 : t.definitions)
|
|
9016
9054
|
});
|
|
9017
9055
|
}
|
|
9018
9056
|
updateOptions(t) {
|
|
@@ -9029,15 +9067,15 @@ class C extends _ {
|
|
|
9029
9067
|
let s = !1, l = !1;
|
|
9030
9068
|
for (let n = 0; n < i.length; ++n) {
|
|
9031
9069
|
if (this.blocks) {
|
|
9032
|
-
const c = i.slice(n), d = Object.keys(this.blocks).filter((
|
|
9033
|
-
d.sort((
|
|
9034
|
-
const
|
|
9035
|
-
if (
|
|
9070
|
+
const c = i.slice(n), d = Object.keys(this.blocks).filter((v) => c.indexOf(v) === 0);
|
|
9071
|
+
d.sort((v, b) => b.length - v.length);
|
|
9072
|
+
const h = d[0];
|
|
9073
|
+
if (h) {
|
|
9036
9074
|
const {
|
|
9037
|
-
expose:
|
|
9075
|
+
expose: v,
|
|
9038
9076
|
repeat: b,
|
|
9039
9077
|
...k
|
|
9040
|
-
} = X(this.blocks[
|
|
9078
|
+
} = X(this.blocks[h]), _ = {
|
|
9041
9079
|
lazy: this.lazy,
|
|
9042
9080
|
eager: this.eager,
|
|
9043
9081
|
placeholderChar: this.placeholderChar,
|
|
@@ -9047,16 +9085,16 @@ class C extends _ {
|
|
|
9047
9085
|
...k,
|
|
9048
9086
|
repeat: b,
|
|
9049
9087
|
parent: this
|
|
9050
|
-
},
|
|
9051
|
-
|
|
9088
|
+
}, m = b != null ? new p.RepeatBlock(
|
|
9089
|
+
_
|
|
9052
9090
|
/* TODO */
|
|
9053
|
-
) :
|
|
9054
|
-
|
|
9091
|
+
) : R(_);
|
|
9092
|
+
m && (this._blocks.push(m), v && (this.exposeBlock = m), this._maskedBlocks[h] || (this._maskedBlocks[h] = []), this._maskedBlocks[h].push(this._blocks.length - 1)), n += h.length - 1;
|
|
9055
9093
|
continue;
|
|
9056
9094
|
}
|
|
9057
9095
|
}
|
|
9058
9096
|
let o = i[n], a = o in t;
|
|
9059
|
-
if (o ===
|
|
9097
|
+
if (o === A.STOP_CHAR) {
|
|
9060
9098
|
this._stops.push(this._blocks.length);
|
|
9061
9099
|
continue;
|
|
9062
9100
|
}
|
|
@@ -9068,11 +9106,11 @@ class C extends _ {
|
|
|
9068
9106
|
l = !l;
|
|
9069
9107
|
continue;
|
|
9070
9108
|
}
|
|
9071
|
-
if (o ===
|
|
9109
|
+
if (o === A.ESCAPE_CHAR) {
|
|
9072
9110
|
if (++n, o = i[n], !o) break;
|
|
9073
9111
|
a = !1;
|
|
9074
9112
|
}
|
|
9075
|
-
const r = a ? new
|
|
9113
|
+
const r = a ? new fe({
|
|
9076
9114
|
isOptional: l,
|
|
9077
9115
|
lazy: this.lazy,
|
|
9078
9116
|
eager: this.eager,
|
|
@@ -9080,7 +9118,7 @@ class C extends _ {
|
|
|
9080
9118
|
displayChar: this.displayChar,
|
|
9081
9119
|
...X(t[o]),
|
|
9082
9120
|
parent: this
|
|
9083
|
-
}) : new
|
|
9121
|
+
}) : new Je({
|
|
9084
9122
|
char: o,
|
|
9085
9123
|
eager: this.eager,
|
|
9086
9124
|
isUnmasking: s
|
|
@@ -9161,7 +9199,7 @@ class C extends _ {
|
|
|
9161
9199
|
}
|
|
9162
9200
|
_appendEager() {
|
|
9163
9201
|
var t;
|
|
9164
|
-
const i = new
|
|
9202
|
+
const i = new g();
|
|
9165
9203
|
let s = (t = this._mapPosToBlock(this.displayValue.length)) == null ? void 0 : t.index;
|
|
9166
9204
|
if (s == null) return i;
|
|
9167
9205
|
this._blocks[s].isFilled && ++s;
|
|
@@ -9174,7 +9212,7 @@ class C extends _ {
|
|
|
9174
9212
|
}
|
|
9175
9213
|
_appendCharRaw(t, i) {
|
|
9176
9214
|
i === void 0 && (i = {});
|
|
9177
|
-
const s = this._mapPosToBlock(this.displayValue.length), l = new
|
|
9215
|
+
const s = this._mapPosToBlock(this.displayValue.length), l = new g();
|
|
9178
9216
|
if (!s) return l;
|
|
9179
9217
|
for (let o = s.index, a; a = this._blocks[o]; ++o) {
|
|
9180
9218
|
var n;
|
|
@@ -9188,10 +9226,10 @@ class C extends _ {
|
|
|
9188
9226
|
}
|
|
9189
9227
|
extractTail(t, i) {
|
|
9190
9228
|
t === void 0 && (t = 0), i === void 0 && (i = this.displayValue.length);
|
|
9191
|
-
const s = new
|
|
9229
|
+
const s = new j();
|
|
9192
9230
|
return t === i || this._forEachBlocksInRange(t, i, (l, n, o, a) => {
|
|
9193
9231
|
const r = l.extractTail(o, a);
|
|
9194
|
-
r.stop = this._findStopBefore(n), r.from = this._blockStartPos(n), r instanceof
|
|
9232
|
+
r.stop = this._findStopBefore(n), r.from = this._blockStartPos(n), r instanceof j && (r.blockIndex = n), s.extend(r);
|
|
9195
9233
|
}), s;
|
|
9196
9234
|
}
|
|
9197
9235
|
extractInput(t, i, s) {
|
|
@@ -9212,7 +9250,7 @@ class C extends _ {
|
|
|
9212
9250
|
}
|
|
9213
9251
|
/** Appends placeholder depending on laziness */
|
|
9214
9252
|
_appendPlaceholder(t) {
|
|
9215
|
-
const i = new
|
|
9253
|
+
const i = new g();
|
|
9216
9254
|
if (this.lazy && t == null) return i;
|
|
9217
9255
|
const s = this._mapPosToBlock(this.displayValue.length);
|
|
9218
9256
|
if (!s) return i;
|
|
@@ -9260,7 +9298,7 @@ class C extends _ {
|
|
|
9260
9298
|
}
|
|
9261
9299
|
nearestInputPos(t, i) {
|
|
9262
9300
|
if (i === void 0 && (i = f.NONE), !this._blocks.length) return 0;
|
|
9263
|
-
const s = new
|
|
9301
|
+
const s = new Yi(this, t);
|
|
9264
9302
|
if (i === f.NONE)
|
|
9265
9303
|
return s.pushRightBeforeInput() || (s.popState(), s.pushLeftBeforeInput()) ? s.pos : this.displayValue.length;
|
|
9266
9304
|
if (i === f.LEFT || i === f.FORCE_LEFT) {
|
|
@@ -9293,21 +9331,21 @@ class C extends _ {
|
|
|
9293
9331
|
return i ? i.map((s) => this._blocks[s]) : [];
|
|
9294
9332
|
}
|
|
9295
9333
|
pad(t) {
|
|
9296
|
-
const i = new
|
|
9334
|
+
const i = new g();
|
|
9297
9335
|
return this._forEachBlocksInRange(0, this.displayValue.length, (s) => i.aggregate(s.pad(t))), i;
|
|
9298
9336
|
}
|
|
9299
9337
|
}
|
|
9300
|
-
|
|
9301
|
-
...
|
|
9338
|
+
A.DEFAULTS = {
|
|
9339
|
+
...C.DEFAULTS,
|
|
9302
9340
|
lazy: !0,
|
|
9303
9341
|
placeholderChar: "_"
|
|
9304
9342
|
};
|
|
9305
|
-
|
|
9306
|
-
|
|
9307
|
-
|
|
9308
|
-
|
|
9309
|
-
|
|
9310
|
-
class
|
|
9343
|
+
A.STOP_CHAR = "`";
|
|
9344
|
+
A.ESCAPE_CHAR = "\\";
|
|
9345
|
+
A.InputDefinition = fe;
|
|
9346
|
+
A.FixedDefinition = Je;
|
|
9347
|
+
p.MaskedPattern = A;
|
|
9348
|
+
class oe extends A {
|
|
9311
9349
|
/**
|
|
9312
9350
|
Optionally sets max length of pattern.
|
|
9313
9351
|
Used when pattern length is longer then `to` param length. Pads zeros at start in this case.
|
|
@@ -9362,7 +9400,7 @@ class le extends C {
|
|
|
9362
9400
|
return this.from <= Number(n) && Number(l) <= this.to && super.doValidate(t);
|
|
9363
9401
|
}
|
|
9364
9402
|
pad(t) {
|
|
9365
|
-
const i = new
|
|
9403
|
+
const i = new g();
|
|
9366
9404
|
if (this.value.length === this.maxLength) return i;
|
|
9367
9405
|
const s = this.value, l = this.maxLength - this.value.length;
|
|
9368
9406
|
if (l) {
|
|
@@ -9374,9 +9412,9 @@ class le extends C {
|
|
|
9374
9412
|
return i;
|
|
9375
9413
|
}
|
|
9376
9414
|
}
|
|
9377
|
-
|
|
9378
|
-
const
|
|
9379
|
-
class
|
|
9415
|
+
p.MaskedRange = oe;
|
|
9416
|
+
const Wi = "d{.}`m{.}`Y";
|
|
9417
|
+
class L extends A {
|
|
9380
9418
|
static extractPatternOptions(t) {
|
|
9381
9419
|
const {
|
|
9382
9420
|
mask: i,
|
|
@@ -9385,7 +9423,7 @@ class V extends C {
|
|
|
9385
9423
|
} = t;
|
|
9386
9424
|
return {
|
|
9387
9425
|
...l,
|
|
9388
|
-
mask:
|
|
9426
|
+
mask: N(i) ? i : s
|
|
9389
9427
|
};
|
|
9390
9428
|
}
|
|
9391
9429
|
/** Pattern mask for date according to {@link MaskedDate#format} */
|
|
@@ -9394,8 +9432,8 @@ class V extends C {
|
|
|
9394
9432
|
/** Format typed value to string */
|
|
9395
9433
|
/** Parse string to get typed value */
|
|
9396
9434
|
constructor(t) {
|
|
9397
|
-
super(
|
|
9398
|
-
...
|
|
9435
|
+
super(L.extractPatternOptions({
|
|
9436
|
+
...L.DEFAULTS,
|
|
9399
9437
|
...t
|
|
9400
9438
|
}));
|
|
9401
9439
|
}
|
|
@@ -9409,12 +9447,12 @@ class V extends C {
|
|
|
9409
9447
|
blocks: l,
|
|
9410
9448
|
...n
|
|
9411
9449
|
} = {
|
|
9412
|
-
...
|
|
9450
|
+
...L.DEFAULTS,
|
|
9413
9451
|
...t
|
|
9414
|
-
}, o = Object.assign({},
|
|
9452
|
+
}, o = Object.assign({}, L.GET_DEFAULT_BLOCKS());
|
|
9415
9453
|
t.min && (o.Y.from = t.min.getFullYear()), t.max && (o.Y.to = t.max.getFullYear()), t.min && t.max && o.Y.from === o.Y.to && (o.m.from = t.min.getMonth() + 1, o.m.to = t.max.getMonth() + 1, o.m.from === o.m.to && (o.d.from = t.min.getDate(), o.d.to = t.max.getDate())), Object.assign(o, this.blocks, l), super._update({
|
|
9416
9454
|
...n,
|
|
9417
|
-
mask:
|
|
9455
|
+
mask: N(i) ? i : s,
|
|
9418
9456
|
blocks: o
|
|
9419
9457
|
});
|
|
9420
9458
|
}
|
|
@@ -9443,32 +9481,32 @@ class V extends C {
|
|
|
9443
9481
|
return t === Date || super.maskEquals(t);
|
|
9444
9482
|
}
|
|
9445
9483
|
optionsIsChanged(t) {
|
|
9446
|
-
return super.optionsIsChanged(
|
|
9484
|
+
return super.optionsIsChanged(L.extractPatternOptions(t));
|
|
9447
9485
|
}
|
|
9448
9486
|
}
|
|
9449
|
-
|
|
9487
|
+
L.GET_DEFAULT_BLOCKS = () => ({
|
|
9450
9488
|
d: {
|
|
9451
|
-
mask:
|
|
9489
|
+
mask: oe,
|
|
9452
9490
|
from: 1,
|
|
9453
9491
|
to: 31,
|
|
9454
9492
|
maxLength: 2
|
|
9455
9493
|
},
|
|
9456
9494
|
m: {
|
|
9457
|
-
mask:
|
|
9495
|
+
mask: oe,
|
|
9458
9496
|
from: 1,
|
|
9459
9497
|
to: 12,
|
|
9460
9498
|
maxLength: 2
|
|
9461
9499
|
},
|
|
9462
9500
|
Y: {
|
|
9463
|
-
mask:
|
|
9501
|
+
mask: oe,
|
|
9464
9502
|
from: 1900,
|
|
9465
9503
|
to: 9999
|
|
9466
9504
|
}
|
|
9467
9505
|
});
|
|
9468
|
-
|
|
9469
|
-
...
|
|
9506
|
+
L.DEFAULTS = {
|
|
9507
|
+
...A.DEFAULTS,
|
|
9470
9508
|
mask: Date,
|
|
9471
|
-
pattern:
|
|
9509
|
+
pattern: Wi,
|
|
9472
9510
|
format: (e, t) => {
|
|
9473
9511
|
if (!e) return "";
|
|
9474
9512
|
const i = String(e.getDate()).padStart(2, "0"), s = String(e.getMonth() + 1).padStart(2, "0"), l = e.getFullYear();
|
|
@@ -9479,11 +9517,11 @@ V.DEFAULTS = {
|
|
|
9479
9517
|
return new Date(l, s - 1, i);
|
|
9480
9518
|
}
|
|
9481
9519
|
};
|
|
9482
|
-
|
|
9483
|
-
class
|
|
9520
|
+
p.MaskedDate = L;
|
|
9521
|
+
class he extends C {
|
|
9484
9522
|
constructor(t) {
|
|
9485
9523
|
super({
|
|
9486
|
-
...
|
|
9524
|
+
...he.DEFAULTS,
|
|
9487
9525
|
...t
|
|
9488
9526
|
}), this.currentMask = void 0;
|
|
9489
9527
|
}
|
|
@@ -9495,7 +9533,7 @@ class ue extends _ {
|
|
|
9495
9533
|
const {
|
|
9496
9534
|
expose: s,
|
|
9497
9535
|
...l
|
|
9498
|
-
} = X(i), n =
|
|
9536
|
+
} = X(i), n = R({
|
|
9499
9537
|
overwrite: this._overwrite,
|
|
9500
9538
|
eager: this._eager,
|
|
9501
9539
|
skipInvalid: this._skipInvalid,
|
|
@@ -9511,7 +9549,7 @@ class ue extends _ {
|
|
|
9511
9549
|
}
|
|
9512
9550
|
_applyDispatch(t, i, s) {
|
|
9513
9551
|
t === void 0 && (t = ""), i === void 0 && (i = {}), s === void 0 && (s = "");
|
|
9514
|
-
const l = i.tail && i._beforeTailState != null ? i._beforeTailState._value : this.value, n = this.rawInputValue, o = i.tail && i._beforeTailState != null ? i._beforeTailState._rawInputValue : n, a = n.slice(o.length), r = this.currentMask, c = new
|
|
9552
|
+
const l = i.tail && i._beforeTailState != null ? i._beforeTailState._value : this.value, n = this.rawInputValue, o = i.tail && i._beforeTailState != null ? i._beforeTailState._rawInputValue : n, a = n.slice(o.length), r = this.currentMask, c = new g(), d = r == null ? void 0 : r.state;
|
|
9515
9553
|
return this.currentMask = this.doDispatch(t, {
|
|
9516
9554
|
...i
|
|
9517
9555
|
}, s), this.currentMask && (this.currentMask !== r ? (this.currentMask.reset(), o && (this.currentMask.append(o, {
|
|
@@ -9530,7 +9568,7 @@ class ue extends _ {
|
|
|
9530
9568
|
return this.currentMask && t.aggregate(this.currentMask._appendEager()), t;
|
|
9531
9569
|
}
|
|
9532
9570
|
appendTail(t) {
|
|
9533
|
-
const i = new
|
|
9571
|
+
const i = new g();
|
|
9534
9572
|
return t && i.aggregate(this._applyDispatch("", {}, t)), i.aggregate(this.currentMask ? this.currentMask.appendTail(t) : super.appendTail(t));
|
|
9535
9573
|
}
|
|
9536
9574
|
currentMaskFlags(t) {
|
|
@@ -9603,7 +9641,7 @@ class ue extends _ {
|
|
|
9603
9641
|
return !!((t = this.currentMask) != null && t.isFilled);
|
|
9604
9642
|
}
|
|
9605
9643
|
remove(t, i) {
|
|
9606
|
-
const s = new
|
|
9644
|
+
const s = new g();
|
|
9607
9645
|
return this.currentMask && s.aggregate(this.currentMask.remove(t, i)).aggregate(this._applyDispatch()), s;
|
|
9608
9646
|
}
|
|
9609
9647
|
get state() {
|
|
@@ -9668,7 +9706,7 @@ class ue extends _ {
|
|
|
9668
9706
|
mask: l,
|
|
9669
9707
|
...n
|
|
9670
9708
|
} = t[s];
|
|
9671
|
-
return
|
|
9709
|
+
return ce(i, n) && i.maskEquals(l);
|
|
9672
9710
|
}) : super.maskEquals(t);
|
|
9673
9711
|
}
|
|
9674
9712
|
typedValueEquals(t) {
|
|
@@ -9676,8 +9714,8 @@ class ue extends _ {
|
|
|
9676
9714
|
return !!((i = this.currentMask) != null && i.typedValueEquals(t));
|
|
9677
9715
|
}
|
|
9678
9716
|
}
|
|
9679
|
-
|
|
9680
|
-
...
|
|
9717
|
+
he.DEFAULTS = {
|
|
9718
|
+
...C.DEFAULTS,
|
|
9681
9719
|
dispatch: (e, t, i, s) => {
|
|
9682
9720
|
if (!t.compiledMasks.length) return;
|
|
9683
9721
|
const l = t.rawInputValue, n = t.compiledMasks.map((o, a) => {
|
|
@@ -9693,11 +9731,11 @@ ue.DEFAULTS = {
|
|
|
9693
9731
|
return n.sort((o, a) => a.weight - o.weight || a.totalInputPositions - o.totalInputPositions), t.compiledMasks[n[0].index];
|
|
9694
9732
|
}
|
|
9695
9733
|
};
|
|
9696
|
-
|
|
9697
|
-
class
|
|
9734
|
+
p.MaskedDynamic = he;
|
|
9735
|
+
class pe extends A {
|
|
9698
9736
|
constructor(t) {
|
|
9699
9737
|
super({
|
|
9700
|
-
...
|
|
9738
|
+
...pe.DEFAULTS,
|
|
9701
9739
|
...t
|
|
9702
9740
|
});
|
|
9703
9741
|
}
|
|
@@ -9726,15 +9764,15 @@ class de extends C {
|
|
|
9726
9764
|
const n = super._appendCharRaw(l[0][this.value.length], i);
|
|
9727
9765
|
return l.length === 1 && l[0].slice(this.unmaskedValue.length).split("").forEach((o) => n.aggregate(super._appendCharRaw(o))), n;
|
|
9728
9766
|
}
|
|
9729
|
-
return new
|
|
9767
|
+
return new g({
|
|
9730
9768
|
skip: !this.isComplete
|
|
9731
9769
|
});
|
|
9732
9770
|
}
|
|
9733
9771
|
extractTail(t, i) {
|
|
9734
|
-
return t === void 0 && (t = 0), i === void 0 && (i = this.displayValue.length), new
|
|
9772
|
+
return t === void 0 && (t = 0), i === void 0 && (i = this.displayValue.length), new V("", t);
|
|
9735
9773
|
}
|
|
9736
9774
|
remove(t, i) {
|
|
9737
|
-
if (t === void 0 && (t = 0), i === void 0 && (i = this.displayValue.length), t === i) return new
|
|
9775
|
+
if (t === void 0 && (t = 0), i === void 0 && (i = this.displayValue.length), t === i) return new g();
|
|
9738
9776
|
const s = Math.min(super.nearestInputPos(0, f.FORCE_RIGHT), this.value.length);
|
|
9739
9777
|
let l;
|
|
9740
9778
|
for (l = t; l >= 0 && !(this.enum.filter((a) => this.matchValue(a, this.value.slice(s, l), s)).length > 1); --l)
|
|
@@ -9746,12 +9784,12 @@ class de extends C {
|
|
|
9746
9784
|
return this.enum.indexOf(this.value) >= 0;
|
|
9747
9785
|
}
|
|
9748
9786
|
}
|
|
9749
|
-
|
|
9750
|
-
...
|
|
9787
|
+
pe.DEFAULTS = {
|
|
9788
|
+
...A.DEFAULTS,
|
|
9751
9789
|
matchValue: (e, t, i) => e.indexOf(t, i) === i
|
|
9752
9790
|
};
|
|
9753
|
-
|
|
9754
|
-
class
|
|
9791
|
+
p.MaskedEnum = pe;
|
|
9792
|
+
class Xi extends C {
|
|
9755
9793
|
/** */
|
|
9756
9794
|
/** Enable characters overwriting */
|
|
9757
9795
|
/** */
|
|
@@ -9767,9 +9805,9 @@ class Yi extends _ {
|
|
|
9767
9805
|
});
|
|
9768
9806
|
}
|
|
9769
9807
|
}
|
|
9770
|
-
|
|
9771
|
-
var
|
|
9772
|
-
class
|
|
9808
|
+
p.MaskedFunction = Xi;
|
|
9809
|
+
var Qe;
|
|
9810
|
+
class I extends C {
|
|
9773
9811
|
/** Single char */
|
|
9774
9812
|
/** Single char */
|
|
9775
9813
|
/** Array of single chars */
|
|
@@ -9786,7 +9824,7 @@ class F extends _ {
|
|
|
9786
9824
|
/** Parse string to get typed value */
|
|
9787
9825
|
constructor(t) {
|
|
9788
9826
|
super({
|
|
9789
|
-
...
|
|
9827
|
+
...I.DEFAULTS,
|
|
9790
9828
|
...t
|
|
9791
9829
|
});
|
|
9792
9830
|
}
|
|
@@ -9797,8 +9835,8 @@ class F extends _ {
|
|
|
9797
9835
|
super._update(t), this._updateRegExps();
|
|
9798
9836
|
}
|
|
9799
9837
|
_updateRegExps() {
|
|
9800
|
-
const t = "^" + (this.allowNegative ? "[+|\\-]?" : ""), i = "\\d*", s = (this.scale ? "(" +
|
|
9801
|
-
this._numberRegExp = new RegExp(t + i + s), this._mapToRadixRegExp = new RegExp("[" + this.mapToRadix.map(
|
|
9838
|
+
const t = "^" + (this.allowNegative ? "[+|\\-]?" : ""), i = "\\d*", s = (this.scale ? "(" + ze(this.radix) + "\\d{0," + this.scale + "})?" : "") + "$";
|
|
9839
|
+
this._numberRegExp = new RegExp(t + i + s), this._mapToRadixRegExp = new RegExp("[" + this.mapToRadix.map(ze).join("") + "]", "g"), this._thousandsSeparatorRegExp = new RegExp(ze(this.thousandsSeparator), "g");
|
|
9802
9840
|
}
|
|
9803
9841
|
_removeThousandsSeparators(t) {
|
|
9804
9842
|
return t.replace(this._thousandsSeparatorRegExp, "");
|
|
@@ -9842,17 +9880,17 @@ class F extends _ {
|
|
|
9842
9880
|
const o = this.number;
|
|
9843
9881
|
let a = !isNaN(o), r = !1;
|
|
9844
9882
|
if (a) {
|
|
9845
|
-
let
|
|
9846
|
-
this.min != null && this.min < 0 && this.number < this.min && (
|
|
9883
|
+
let v;
|
|
9884
|
+
this.min != null && this.min < 0 && this.number < this.min && (v = this.min), this.max != null && this.max > 0 && this.number > this.max && (v = this.max), v != null && (this.autofix ? (this._value = this.format(v, this).replace(I.UNMASKED_RADIX, this.radix), r || (r = n === this._value && !i.tail)) : a = !1), a && (a = !!this._value.match(this._numberRegExp));
|
|
9847
9885
|
}
|
|
9848
9886
|
let c;
|
|
9849
|
-
a ? c = new
|
|
9887
|
+
a ? c = new g({
|
|
9850
9888
|
inserted: this._value.slice(n.length),
|
|
9851
9889
|
rawInserted: r ? "" : t,
|
|
9852
9890
|
skip: r
|
|
9853
|
-
}) : (this._value = n, c = new
|
|
9854
|
-
const d = i.tail && i._beforeTailState ? i._beforeTailState._value : this._value,
|
|
9855
|
-
return c.tailShift += (
|
|
9891
|
+
}) : (this._value = n, c = new g()), this._value = this._insertThousandsSeparators(this._value);
|
|
9892
|
+
const d = i.tail && i._beforeTailState ? i._beforeTailState._value : this._value, h = this._separatorsCountFromSlice(d);
|
|
9893
|
+
return c.tailShift += (h - l) * this.thousandsSeparator.length, c;
|
|
9856
9894
|
}
|
|
9857
9895
|
_findSeparatorAround(t) {
|
|
9858
9896
|
if (this.thousandsSeparator) {
|
|
@@ -9872,7 +9910,7 @@ class F extends _ {
|
|
|
9872
9910
|
const s = this.value.slice(0, t), l = this.value.slice(i), n = this._separatorsCount(s.length);
|
|
9873
9911
|
this._value = this._insertThousandsSeparators(this._removeThousandsSeparators(s + l));
|
|
9874
9912
|
const o = this._separatorsCountFromSlice(s);
|
|
9875
|
-
return new
|
|
9913
|
+
return new g({
|
|
9876
9914
|
tailShift: (o - n) * this.thousandsSeparator.length
|
|
9877
9915
|
});
|
|
9878
9916
|
}
|
|
@@ -9920,11 +9958,11 @@ class F extends _ {
|
|
|
9920
9958
|
}
|
|
9921
9959
|
doSkipInvalid(t, i, s) {
|
|
9922
9960
|
i === void 0 && (i = {});
|
|
9923
|
-
const l = this.scale === 0 && t !== this.thousandsSeparator && (t === this.radix || t ===
|
|
9961
|
+
const l = this.scale === 0 && t !== this.thousandsSeparator && (t === this.radix || t === I.UNMASKED_RADIX || this.mapToRadix.includes(t));
|
|
9924
9962
|
return super.doSkipInvalid(t, i, s) && !l;
|
|
9925
9963
|
}
|
|
9926
9964
|
get unmaskedValue() {
|
|
9927
|
-
return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,
|
|
9965
|
+
return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix, I.UNMASKED_RADIX);
|
|
9928
9966
|
}
|
|
9929
9967
|
set unmaskedValue(t) {
|
|
9930
9968
|
super.unmaskedValue = t;
|
|
@@ -9933,7 +9971,7 @@ class F extends _ {
|
|
|
9933
9971
|
return this.parse(this.unmaskedValue, this);
|
|
9934
9972
|
}
|
|
9935
9973
|
set typedValue(t) {
|
|
9936
|
-
this.rawInputValue = this.format(t, this).replace(
|
|
9974
|
+
this.rawInputValue = this.format(t, this).replace(I.UNMASKED_RADIX, this.radix);
|
|
9937
9975
|
}
|
|
9938
9976
|
/** Parsed Number */
|
|
9939
9977
|
get number() {
|
|
@@ -9949,18 +9987,18 @@ class F extends _ {
|
|
|
9949
9987
|
return this.min != null && this.min > 0 || this.max != null && this.max > 0;
|
|
9950
9988
|
}
|
|
9951
9989
|
typedValueEquals(t) {
|
|
9952
|
-
return (super.typedValueEquals(t) ||
|
|
9990
|
+
return (super.typedValueEquals(t) || I.EMPTY_VALUES.includes(t) && I.EMPTY_VALUES.includes(this.typedValue)) && !(t === 0 && this.value === "");
|
|
9953
9991
|
}
|
|
9954
9992
|
}
|
|
9955
|
-
|
|
9956
|
-
|
|
9957
|
-
|
|
9958
|
-
|
|
9959
|
-
...
|
|
9993
|
+
Qe = I;
|
|
9994
|
+
I.UNMASKED_RADIX = ".";
|
|
9995
|
+
I.EMPTY_VALUES = [...C.EMPTY_VALUES, 0];
|
|
9996
|
+
I.DEFAULTS = {
|
|
9997
|
+
...C.DEFAULTS,
|
|
9960
9998
|
mask: Number,
|
|
9961
9999
|
radix: ",",
|
|
9962
10000
|
thousandsSeparator: "",
|
|
9963
|
-
mapToRadix: [
|
|
10001
|
+
mapToRadix: [Qe.UNMASKED_RADIX],
|
|
9964
10002
|
min: Number.MIN_SAFE_INTEGER,
|
|
9965
10003
|
max: Number.MAX_SAFE_INTEGER,
|
|
9966
10004
|
scale: 2,
|
|
@@ -9972,24 +10010,24 @@ F.DEFAULTS = {
|
|
|
9972
10010
|
maximumFractionDigits: 20
|
|
9973
10011
|
})
|
|
9974
10012
|
};
|
|
9975
|
-
|
|
9976
|
-
const
|
|
10013
|
+
p.MaskedNumber = I;
|
|
10014
|
+
const be = {
|
|
9977
10015
|
MASKED: "value",
|
|
9978
10016
|
UNMASKED: "unmaskedValue",
|
|
9979
10017
|
TYPED: "typedValue"
|
|
9980
10018
|
};
|
|
9981
|
-
function
|
|
9982
|
-
t === void 0 && (t =
|
|
9983
|
-
const s =
|
|
10019
|
+
function et(e, t, i) {
|
|
10020
|
+
t === void 0 && (t = be.MASKED), i === void 0 && (i = be.MASKED);
|
|
10021
|
+
const s = R(e);
|
|
9984
10022
|
return (l) => s.runIsolated((n) => (n[t] = l, n[i]));
|
|
9985
10023
|
}
|
|
9986
|
-
function
|
|
9987
|
-
return
|
|
10024
|
+
function Ji(e, t, i, s) {
|
|
10025
|
+
return et(t, i, s)(e);
|
|
9988
10026
|
}
|
|
9989
|
-
|
|
9990
|
-
|
|
9991
|
-
|
|
9992
|
-
class
|
|
10027
|
+
p.PIPE_TYPE = be;
|
|
10028
|
+
p.createPipe = et;
|
|
10029
|
+
p.pipe = Ji;
|
|
10030
|
+
class Qi extends A {
|
|
9993
10031
|
get repeatFrom() {
|
|
9994
10032
|
var t;
|
|
9995
10033
|
return (t = Array.isArray(this.repeat) ? this.repeat[0] : this.repeat === 1 / 0 ? 0 : this.repeat) != null ? t : 0;
|
|
@@ -10011,7 +10049,7 @@ class Xi extends C {
|
|
|
10011
10049
|
...o
|
|
10012
10050
|
} = X(t);
|
|
10013
10051
|
this._blockOpts = Object.assign({}, this._blockOpts, o);
|
|
10014
|
-
const a =
|
|
10052
|
+
const a = R(this._blockOpts);
|
|
10015
10053
|
this.repeat = (i = (s = n ?? a.repeat) != null ? s : this.repeat) != null ? i : 1 / 0, super._update({
|
|
10016
10054
|
mask: "m".repeat(Math.max(this.repeatTo === 1 / 0 && ((l = this._blocks) == null ? void 0 : l.length) || 0, this.repeatFrom)),
|
|
10017
10055
|
blocks: {
|
|
@@ -10028,11 +10066,11 @@ class Xi extends C {
|
|
|
10028
10066
|
_allocateBlock(t) {
|
|
10029
10067
|
if (t < this._blocks.length) return this._blocks[t];
|
|
10030
10068
|
if (this.repeatTo === 1 / 0 || this._blocks.length < this.repeatTo)
|
|
10031
|
-
return this._blocks.push(
|
|
10069
|
+
return this._blocks.push(R(this._blockOpts)), this.mask += "m", this._blocks[this._blocks.length - 1];
|
|
10032
10070
|
}
|
|
10033
10071
|
_appendCharRaw(t, i) {
|
|
10034
10072
|
i === void 0 && (i = {});
|
|
10035
|
-
const s = new
|
|
10073
|
+
const s = new g();
|
|
10036
10074
|
for (
|
|
10037
10075
|
let r = (l = (n = this._mapPosToBlock(this.displayValue.length)) == null ? void 0 : n.index) != null ? l : Math.max(this._blocks.length - 1, 0), c, d;
|
|
10038
10076
|
// try to get a block or
|
|
@@ -10041,15 +10079,15 @@ class Xi extends C {
|
|
|
10041
10079
|
++r
|
|
10042
10080
|
) {
|
|
10043
10081
|
var l, n, o, a;
|
|
10044
|
-
const
|
|
10082
|
+
const h = c._appendChar(t, {
|
|
10045
10083
|
...i,
|
|
10046
10084
|
_beforeTailState: (a = i._beforeTailState) == null || (a = a._blocks) == null ? void 0 : a[r]
|
|
10047
10085
|
});
|
|
10048
|
-
if (
|
|
10086
|
+
if (h.skip && d) {
|
|
10049
10087
|
this._blocks.pop(), this.mask = this.mask.slice(1);
|
|
10050
10088
|
break;
|
|
10051
10089
|
}
|
|
10052
|
-
if (s.aggregate(
|
|
10090
|
+
if (s.aggregate(h), h.consumed) break;
|
|
10053
10091
|
}
|
|
10054
10092
|
return s;
|
|
10055
10093
|
}
|
|
@@ -10082,30 +10120,30 @@ class Xi extends C {
|
|
|
10082
10120
|
this._blocks.length = t._blocks.length, this.mask = this.mask.slice(0, this._blocks.length), super.state = t;
|
|
10083
10121
|
}
|
|
10084
10122
|
}
|
|
10085
|
-
|
|
10123
|
+
p.RepeatBlock = Qi;
|
|
10086
10124
|
try {
|
|
10087
|
-
globalThis.IMask =
|
|
10125
|
+
globalThis.IMask = p;
|
|
10088
10126
|
} catch {
|
|
10089
10127
|
}
|
|
10090
|
-
const
|
|
10128
|
+
const es = "not-validate", ts = "none", is = "medium", ss = "default", ls = "on-primary-bg", ns = "hidden", os = {
|
|
10091
10129
|
"not-validate": null,
|
|
10092
10130
|
success: "gr-input--valid-success",
|
|
10093
10131
|
error: "gr-input--valid-error"
|
|
10094
|
-
},
|
|
10132
|
+
}, as = {
|
|
10095
10133
|
small: "gr-input--size-small",
|
|
10096
10134
|
medium: "gr-input--size-medium",
|
|
10097
10135
|
large: "gr-input--size-large",
|
|
10098
10136
|
xl: "gr-input--size-xl"
|
|
10099
|
-
},
|
|
10137
|
+
}, rs = {
|
|
10100
10138
|
"on-primary-bg": null,
|
|
10101
10139
|
"on-secondary-bg": "gr-input--on-secondary-bg"
|
|
10102
|
-
},
|
|
10140
|
+
}, cs = {
|
|
10103
10141
|
small: "other",
|
|
10104
10142
|
medium: "other",
|
|
10105
10143
|
large: "other",
|
|
10106
10144
|
xl: "other"
|
|
10107
10145
|
};
|
|
10108
|
-
async function
|
|
10146
|
+
async function fs(e) {
|
|
10109
10147
|
var t;
|
|
10110
10148
|
if (typeof navigator < "u" && ((t = navigator.clipboard) != null && t.writeText))
|
|
10111
10149
|
try {
|
|
@@ -10122,53 +10160,53 @@ async function as(e) {
|
|
|
10122
10160
|
return !1;
|
|
10123
10161
|
}
|
|
10124
10162
|
}
|
|
10125
|
-
function
|
|
10126
|
-
size: e =
|
|
10127
|
-
kind: t =
|
|
10128
|
-
isValid: i =
|
|
10129
|
-
color: s =
|
|
10163
|
+
function Cs({
|
|
10164
|
+
size: e = is,
|
|
10165
|
+
kind: t = ss,
|
|
10166
|
+
isValid: i = es,
|
|
10167
|
+
color: s = ls,
|
|
10130
10168
|
icon: l,
|
|
10131
10169
|
iconButton: n,
|
|
10132
10170
|
clearable: o = !0,
|
|
10133
10171
|
onClear: a,
|
|
10134
10172
|
onActionClick: r,
|
|
10135
|
-
disabledAccessory: c =
|
|
10173
|
+
disabledAccessory: c = ts,
|
|
10136
10174
|
passwordVisibility: d,
|
|
10137
|
-
defaultPasswordVisibility:
|
|
10138
|
-
onPasswordVisibilityChange:
|
|
10175
|
+
defaultPasswordVisibility: h = ns,
|
|
10176
|
+
onPasswordVisibilityChange: v,
|
|
10139
10177
|
className: b,
|
|
10140
10178
|
disabled: k,
|
|
10141
|
-
placeholder:
|
|
10142
|
-
type:
|
|
10143
|
-
inputMode:
|
|
10179
|
+
placeholder: _,
|
|
10180
|
+
type: m,
|
|
10181
|
+
inputMode: T,
|
|
10144
10182
|
value: z,
|
|
10145
|
-
defaultValue:
|
|
10183
|
+
defaultValue: x,
|
|
10146
10184
|
onFocus: H,
|
|
10147
10185
|
onBlur: K,
|
|
10148
|
-
onChange:
|
|
10149
|
-
showLabel:
|
|
10150
|
-
label:
|
|
10151
|
-
labelHint:
|
|
10152
|
-
showDescription:
|
|
10153
|
-
description:
|
|
10154
|
-
descriptionState:
|
|
10155
|
-
...
|
|
10186
|
+
onChange: J,
|
|
10187
|
+
showLabel: it,
|
|
10188
|
+
label: Q,
|
|
10189
|
+
labelHint: ke = "none",
|
|
10190
|
+
showDescription: st,
|
|
10191
|
+
description: me,
|
|
10192
|
+
descriptionState: _e,
|
|
10193
|
+
...lt
|
|
10156
10194
|
}) {
|
|
10157
|
-
const E = !!k,
|
|
10158
|
-
|
|
10195
|
+
const E = !!k, Ce = !!l, [ee, Ae] = W(!1), Y = se(null), S = se(null), ge = se(null), [nt, ot] = W(h), xe = d ?? nt, te = xe === "shown";
|
|
10196
|
+
xt(() => {
|
|
10159
10197
|
if (t !== "password") return;
|
|
10160
|
-
const
|
|
10161
|
-
if (!
|
|
10162
|
-
const
|
|
10163
|
-
|
|
10198
|
+
const y = ge.current;
|
|
10199
|
+
if (!y) return;
|
|
10200
|
+
const M = Y.current;
|
|
10201
|
+
M && (ge.current = null, requestAnimationFrame(() => {
|
|
10164
10202
|
try {
|
|
10165
|
-
|
|
10203
|
+
M.setSelectionRange(y.start, y.end, y.direction);
|
|
10166
10204
|
} catch {
|
|
10167
10205
|
}
|
|
10168
10206
|
}));
|
|
10169
|
-
}, [t,
|
|
10170
|
-
const [
|
|
10171
|
-
if (
|
|
10207
|
+
}, [t, xe]);
|
|
10208
|
+
const [at, Ee] = W(() => z !== void 0 ? z : x !== void 0 ? x : ""), U = z !== void 0 ? z : at, ve = Array.isArray(U) ? U.length > 0 : U != null && String(U).length > 0, Se = (it ?? Q !== void 0) && Q !== null, Fe = e === "xl" && !ee && !ve ? "xl" : cs[e], Ie = e === "xl" ? s === "on-primary-bg" ? "on-secondary-bg" : "on-primary-bg" : s, De = $(() => E ? "disabled" : i === "error" ? "error" : "default", [E, i]), rt = (st ?? me !== void 0) && me !== null, ct = $(() => !E && i === "error" ? "error" : _e ?? "default", [_e, E, i]), ft = $(() => {
|
|
10209
|
+
if (_ !== void 0) return _;
|
|
10172
10210
|
switch (t) {
|
|
10173
10211
|
case "date":
|
|
10174
10212
|
return "дд.мм.гггг";
|
|
@@ -10182,7 +10220,7 @@ function ws({
|
|
|
10182
10220
|
default:
|
|
10183
10221
|
return "Placeholder";
|
|
10184
10222
|
}
|
|
10185
|
-
}, [t,
|
|
10223
|
+
}, [t, _]), ut = t === "default" || t === "money" || t === "phone-number", dt = t === "password" || t === "phone-number-with-button" || t === "date" || t === "time", P = $(() => {
|
|
10186
10224
|
switch (t) {
|
|
10187
10225
|
case "phone-number":
|
|
10188
10226
|
case "phone-number-with-button":
|
|
@@ -10203,136 +10241,136 @@ function ws({
|
|
|
10203
10241
|
default:
|
|
10204
10242
|
return null;
|
|
10205
10243
|
}
|
|
10206
|
-
}, [t]),
|
|
10207
|
-
|
|
10208
|
-
var
|
|
10209
|
-
const
|
|
10210
|
-
if (
|
|
10211
|
-
if (!
|
|
10212
|
-
(
|
|
10244
|
+
}, [t]), ht = $(() => P ? typeof P.mask == "string" ? `${t}:${P.mask}` : P.mask === Number ? `${t}:number` : t : null, [t, P]);
|
|
10245
|
+
ae(() => {
|
|
10246
|
+
var M, w;
|
|
10247
|
+
const y = Y.current;
|
|
10248
|
+
if (y) {
|
|
10249
|
+
if (!P) {
|
|
10250
|
+
(M = S.current) == null || M.destroy(), S.current = null;
|
|
10213
10251
|
return;
|
|
10214
10252
|
}
|
|
10215
|
-
if ((w =
|
|
10216
|
-
const
|
|
10217
|
-
|
|
10253
|
+
if ((w = S.current) == null || w.destroy(), S.current = p(y, P), z === void 0) {
|
|
10254
|
+
const F = String(U ?? "");
|
|
10255
|
+
S.current.value !== F && (S.current.value = F);
|
|
10218
10256
|
}
|
|
10219
10257
|
return () => {
|
|
10220
|
-
var
|
|
10221
|
-
(
|
|
10258
|
+
var F;
|
|
10259
|
+
(F = S.current) == null || F.destroy(), S.current = null;
|
|
10222
10260
|
};
|
|
10223
10261
|
}
|
|
10224
|
-
}, [
|
|
10225
|
-
if (z === void 0 || !
|
|
10226
|
-
const
|
|
10227
|
-
|
|
10262
|
+
}, [ht]), ae(() => {
|
|
10263
|
+
if (z === void 0 || !S.current) return;
|
|
10264
|
+
const y = String(z ?? "");
|
|
10265
|
+
S.current.value !== y && (S.current.value = y);
|
|
10228
10266
|
}, [z]);
|
|
10229
|
-
const
|
|
10230
|
-
z === void 0 &&
|
|
10231
|
-
},
|
|
10232
|
-
|
|
10233
|
-
},
|
|
10234
|
-
|
|
10235
|
-
},
|
|
10236
|
-
var
|
|
10267
|
+
const pt = z !== void 0 ? { value: z } : x !== void 0 ? { defaultValue: x } : void 0, Be = !E && Ce && (!(Ce && i !== "not-validate") || !ee), Te = E && c === "copy", Me = E && c === "info", Ve = !E && ut && o && ee && ve, Le = !E && dt, mt = Be || Te || Me || Ve || Le, gt = (y) => {
|
|
10268
|
+
z === void 0 && Ee(y.target.value), J == null || J(y);
|
|
10269
|
+
}, vt = (y) => {
|
|
10270
|
+
Ae(!0), H == null || H(y);
|
|
10271
|
+
}, yt = (y) => {
|
|
10272
|
+
Ae(!1), K == null || K(y);
|
|
10273
|
+
}, Re = () => {
|
|
10274
|
+
var M;
|
|
10237
10275
|
if (E) return;
|
|
10238
|
-
const
|
|
10239
|
-
if (
|
|
10240
|
-
|
|
10276
|
+
const y = Y.current;
|
|
10277
|
+
if (y) {
|
|
10278
|
+
S.current && (S.current.value = "");
|
|
10241
10279
|
const w = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value");
|
|
10242
|
-
(
|
|
10280
|
+
(M = w == null ? void 0 : w.set) == null || M.call(y, ""), y.dispatchEvent(new Event("input", { bubbles: !0 })), y.focus();
|
|
10243
10281
|
}
|
|
10244
|
-
z === void 0 &&
|
|
10245
|
-
},
|
|
10282
|
+
z === void 0 && Ee(""), a == null || a();
|
|
10283
|
+
}, zt = $(
|
|
10246
10284
|
() => /* @__PURE__ */ u(
|
|
10247
|
-
|
|
10285
|
+
le,
|
|
10248
10286
|
{
|
|
10249
10287
|
size: 32,
|
|
10250
10288
|
variant: "ghost-secondary",
|
|
10251
10289
|
label: "Clear",
|
|
10252
|
-
icon: /* @__PURE__ */ u(
|
|
10290
|
+
icon: /* @__PURE__ */ u(Z, { name: "cross-circle", size: 24, variant: "fill" })
|
|
10253
10291
|
}
|
|
10254
10292
|
),
|
|
10255
10293
|
[]
|
|
10256
|
-
),
|
|
10257
|
-
if (!
|
|
10258
|
-
const
|
|
10259
|
-
const w =
|
|
10260
|
-
return
|
|
10261
|
-
onMouseDown: (
|
|
10262
|
-
var B,
|
|
10263
|
-
|
|
10294
|
+
), bt = () => {
|
|
10295
|
+
if (!Ve) return null;
|
|
10296
|
+
const y = n ?? zt, M = Oe(y) ? (() => {
|
|
10297
|
+
const w = y;
|
|
10298
|
+
return Et(w, {
|
|
10299
|
+
onMouseDown: (F) => {
|
|
10300
|
+
var B, O;
|
|
10301
|
+
F.preventDefault(), (O = (B = w.props) == null ? void 0 : B.onMouseDown) == null || O.call(B, F);
|
|
10264
10302
|
},
|
|
10265
|
-
onClick: (
|
|
10266
|
-
var B,
|
|
10267
|
-
(
|
|
10303
|
+
onClick: (F) => {
|
|
10304
|
+
var B, O;
|
|
10305
|
+
(O = (B = w.props) == null ? void 0 : B.onClick) == null || O.call(B, F), Re();
|
|
10268
10306
|
}
|
|
10269
10307
|
});
|
|
10270
|
-
})() :
|
|
10308
|
+
})() : y;
|
|
10271
10309
|
return /* @__PURE__ */ u(
|
|
10272
10310
|
"span",
|
|
10273
10311
|
{
|
|
10274
10312
|
className: "gr-input__icon-button",
|
|
10275
10313
|
onMouseDown: (w) => w.preventDefault(),
|
|
10276
|
-
onClick:
|
|
10277
|
-
children:
|
|
10314
|
+
onClick: Oe(y) ? void 0 : Re,
|
|
10315
|
+
children: M
|
|
10278
10316
|
}
|
|
10279
10317
|
);
|
|
10280
|
-
},
|
|
10281
|
-
|
|
10318
|
+
}, wt = () => Le ? /* @__PURE__ */ u("span", { className: "gr-input__icon-button", onMouseDown: (w) => w.preventDefault(), children: /* @__PURE__ */ u(
|
|
10319
|
+
le,
|
|
10282
10320
|
{
|
|
10283
10321
|
size: 32,
|
|
10284
10322
|
variant: "ghost-secondary",
|
|
10285
|
-
label: t === "password" ?
|
|
10286
|
-
icon: /* @__PURE__ */ u(
|
|
10323
|
+
label: t === "password" ? te ? "Hide password" : "Show password" : t === "phone-number-with-button" ? "Contacts" : t === "date" ? "Calendar" : "Time",
|
|
10324
|
+
icon: /* @__PURE__ */ u(Z, { name: t === "password" ? te ? "hide" : "show" : t === "phone-number-with-button" ? "contacts" : t === "date" ? "calendar" : "waiting", size: 24, variant: "fill" }),
|
|
10287
10325
|
onClick: () => {
|
|
10288
10326
|
if (t === "password") {
|
|
10289
10327
|
const w = Y.current;
|
|
10290
10328
|
if (w) {
|
|
10291
|
-
const B = w.selectionStart,
|
|
10292
|
-
B !== null &&
|
|
10329
|
+
const B = w.selectionStart, O = w.selectionEnd;
|
|
10330
|
+
B !== null && O !== null && (ge.current = { start: B, end: O, direction: w.selectionDirection ?? void 0 });
|
|
10293
10331
|
}
|
|
10294
|
-
const
|
|
10295
|
-
d === void 0 &&
|
|
10332
|
+
const F = te ? "hidden" : "shown";
|
|
10333
|
+
d === void 0 && ot(F), v == null || v(F);
|
|
10296
10334
|
}
|
|
10297
10335
|
r == null || r();
|
|
10298
10336
|
}
|
|
10299
10337
|
}
|
|
10300
|
-
) }) : null,
|
|
10301
|
-
|
|
10338
|
+
) }) : null, kt = () => Me ? /* @__PURE__ */ u("span", { className: "gr-input__icon gr-input__icon--centered", children: /* @__PURE__ */ u(Z, { name: "info-circle", size: 24, variant: "fill", ariaLabel: "Info" }) }) : Te ? /* @__PURE__ */ u("span", { className: "gr-input__icon-button", children: /* @__PURE__ */ u(
|
|
10339
|
+
le,
|
|
10302
10340
|
{
|
|
10303
10341
|
size: 32,
|
|
10304
10342
|
variant: "ghost-secondary",
|
|
10305
10343
|
label: "Copy",
|
|
10306
|
-
icon: /* @__PURE__ */ u(
|
|
10344
|
+
icon: /* @__PURE__ */ u(Z, { name: "copy", size: 24, variant: "fill" }),
|
|
10307
10345
|
onClick: () => {
|
|
10308
|
-
|
|
10346
|
+
fs(String(U ?? ""));
|
|
10309
10347
|
}
|
|
10310
10348
|
}
|
|
10311
|
-
) }) : null,
|
|
10312
|
-
return /* @__PURE__ */
|
|
10313
|
-
|
|
10314
|
-
|
|
10349
|
+
) }) : null, _t = t === "password" ? te ? "text" : "password" : m ?? "text", Ct = t === "money" ? "decimal" : t === "phone-number" || t === "phone-number-with-button" ? "tel" : t === "date" || t === "time" ? "numeric" : T;
|
|
10350
|
+
return /* @__PURE__ */ q("div", { className: "gr-input-field", children: [
|
|
10351
|
+
Se && e !== "xl" ? /* @__PURE__ */ u(
|
|
10352
|
+
je,
|
|
10315
10353
|
{
|
|
10316
|
-
size:
|
|
10317
|
-
status:
|
|
10318
|
-
hint:
|
|
10319
|
-
optionalColor:
|
|
10320
|
-
children:
|
|
10354
|
+
size: Fe,
|
|
10355
|
+
status: De,
|
|
10356
|
+
hint: ke,
|
|
10357
|
+
optionalColor: Ie,
|
|
10358
|
+
children: Q
|
|
10321
10359
|
}
|
|
10322
10360
|
) : null,
|
|
10323
|
-
/* @__PURE__ */
|
|
10361
|
+
/* @__PURE__ */ q(
|
|
10324
10362
|
"div",
|
|
10325
10363
|
{
|
|
10326
|
-
className:
|
|
10364
|
+
className: D(
|
|
10327
10365
|
"gr-input",
|
|
10328
|
-
|
|
10329
|
-
|
|
10330
|
-
E ? null :
|
|
10366
|
+
as[e],
|
|
10367
|
+
rs[s],
|
|
10368
|
+
E ? null : os[i],
|
|
10331
10369
|
{
|
|
10332
|
-
"gr-input--with-icon":
|
|
10370
|
+
"gr-input--with-icon": mt,
|
|
10333
10371
|
"gr-input--disabled": E,
|
|
10334
|
-
"gr-input--focused":
|
|
10335
|
-
"gr-input--filled":
|
|
10372
|
+
"gr-input--focused": ee,
|
|
10373
|
+
"gr-input--filled": ve,
|
|
10336
10374
|
"gr-input--kind-password": t === "password",
|
|
10337
10375
|
"gr-input--kind-money": t === "money",
|
|
10338
10376
|
"gr-input--kind-phone": t === "phone-number" || t === "phone-number-with-button",
|
|
@@ -10342,14 +10380,14 @@ function ws({
|
|
|
10342
10380
|
b
|
|
10343
10381
|
),
|
|
10344
10382
|
children: [
|
|
10345
|
-
|
|
10346
|
-
|
|
10383
|
+
Se && e === "xl" ? /* @__PURE__ */ u("div", { className: "gr-input__floating-label", "aria-hidden": "true", children: /* @__PURE__ */ u(
|
|
10384
|
+
je,
|
|
10347
10385
|
{
|
|
10348
|
-
size:
|
|
10349
|
-
status:
|
|
10350
|
-
hint:
|
|
10351
|
-
optionalColor:
|
|
10352
|
-
children:
|
|
10386
|
+
size: Fe,
|
|
10387
|
+
status: De,
|
|
10388
|
+
hint: ke,
|
|
10389
|
+
optionalColor: Ie,
|
|
10390
|
+
children: Q
|
|
10353
10391
|
}
|
|
10354
10392
|
) }) : null,
|
|
10355
10393
|
/* @__PURE__ */ u(
|
|
@@ -10357,32 +10395,32 @@ function ws({
|
|
|
10357
10395
|
{
|
|
10358
10396
|
className: "gr-input__field",
|
|
10359
10397
|
disabled: E,
|
|
10360
|
-
placeholder:
|
|
10361
|
-
type:
|
|
10362
|
-
inputMode:
|
|
10363
|
-
...
|
|
10398
|
+
placeholder: ft,
|
|
10399
|
+
type: _t,
|
|
10400
|
+
inputMode: Ct,
|
|
10401
|
+
...pt,
|
|
10364
10402
|
ref: Y,
|
|
10365
|
-
onFocus:
|
|
10366
|
-
onBlur:
|
|
10367
|
-
onChange:
|
|
10368
|
-
...
|
|
10403
|
+
onFocus: vt,
|
|
10404
|
+
onBlur: yt,
|
|
10405
|
+
onChange: gt,
|
|
10406
|
+
...lt
|
|
10369
10407
|
}
|
|
10370
10408
|
),
|
|
10371
|
-
|
|
10372
|
-
|
|
10373
|
-
|
|
10374
|
-
|
|
10409
|
+
Be ? /* @__PURE__ */ u("span", { className: "gr-input__icon", children: l }) : null,
|
|
10410
|
+
kt(),
|
|
10411
|
+
wt(),
|
|
10412
|
+
bt()
|
|
10375
10413
|
]
|
|
10376
10414
|
}
|
|
10377
10415
|
),
|
|
10378
|
-
|
|
10416
|
+
rt ? /* @__PURE__ */ u(Pi, { state: ct, children: me }) : null
|
|
10379
10417
|
] });
|
|
10380
10418
|
}
|
|
10381
|
-
const
|
|
10419
|
+
const us = 24, ds = "default", tt = "unchecked", hs = {
|
|
10382
10420
|
16: "gr-checkbox--16",
|
|
10383
10421
|
24: "gr-checkbox--24",
|
|
10384
10422
|
32: "gr-checkbox--32"
|
|
10385
|
-
},
|
|
10423
|
+
}, ps = {
|
|
10386
10424
|
16: {
|
|
10387
10425
|
viewBox: "0 0 12 12",
|
|
10388
10426
|
// checkbox-default-16.svg
|
|
@@ -10420,42 +10458,42 @@ const rs = 24, cs = "default", We = "unchecked", fs = {
|
|
|
10420
10458
|
minusD: "M8.00098 10.7461C7.31062 10.7461 6.75098 11.3057 6.75098 11.9961C6.75098 12.6865 7.31062 13.2461 8.00098 13.2461H16.001C16.6913 13.2461 17.251 12.6865 17.251 11.9961C17.251 11.3057 16.6913 10.7461 16.001 10.7461H8.00098Z"
|
|
10421
10459
|
}
|
|
10422
10460
|
};
|
|
10423
|
-
function
|
|
10424
|
-
return e ??
|
|
10461
|
+
function ms(e) {
|
|
10462
|
+
return e ?? tt;
|
|
10425
10463
|
}
|
|
10426
|
-
function
|
|
10464
|
+
function gs(e) {
|
|
10427
10465
|
return e ? "checked" : "unchecked";
|
|
10428
10466
|
}
|
|
10429
|
-
function
|
|
10430
|
-
size: e =
|
|
10431
|
-
status: t =
|
|
10467
|
+
function As({
|
|
10468
|
+
size: e = us,
|
|
10469
|
+
status: t = ds,
|
|
10432
10470
|
value: i,
|
|
10433
|
-
defaultValue: s =
|
|
10471
|
+
defaultValue: s = tt,
|
|
10434
10472
|
onValueChange: l,
|
|
10435
10473
|
className: n,
|
|
10436
10474
|
disabled: o,
|
|
10437
10475
|
onChange: a,
|
|
10438
10476
|
...r
|
|
10439
10477
|
}) {
|
|
10440
|
-
const c = i !== void 0, [d,
|
|
10441
|
-
|
|
10478
|
+
const c = i !== void 0, [d, h] = W(s), v = ms(c ? i : d), b = se(null), k = v === "indeterminate", _ = v === "checked", m = ps[e];
|
|
10479
|
+
ae(() => {
|
|
10442
10480
|
const z = b.current;
|
|
10443
10481
|
z && (z.indeterminate = k);
|
|
10444
10482
|
}, [k]);
|
|
10445
|
-
const
|
|
10483
|
+
const T = (z) => {
|
|
10446
10484
|
if (o) return;
|
|
10447
|
-
const
|
|
10448
|
-
c ||
|
|
10485
|
+
const x = gs(z.target.checked);
|
|
10486
|
+
c || h(x), l == null || l(x), a == null || a(z);
|
|
10449
10487
|
};
|
|
10450
|
-
return /* @__PURE__ */
|
|
10488
|
+
return /* @__PURE__ */ q(
|
|
10451
10489
|
"span",
|
|
10452
10490
|
{
|
|
10453
|
-
className:
|
|
10491
|
+
className: D(
|
|
10454
10492
|
"gr-checkbox",
|
|
10455
|
-
|
|
10493
|
+
hs[e],
|
|
10456
10494
|
`gr-checkbox--status-${t}`,
|
|
10457
10495
|
{
|
|
10458
|
-
"gr-checkbox--checked":
|
|
10496
|
+
"gr-checkbox--checked": _,
|
|
10459
10497
|
"gr-checkbox--indeterminate": k,
|
|
10460
10498
|
"gr-checkbox--disabled": !!o
|
|
10461
10499
|
},
|
|
@@ -10468,39 +10506,39 @@ function ks({
|
|
|
10468
10506
|
ref: b,
|
|
10469
10507
|
className: "gr-checkbox__input",
|
|
10470
10508
|
type: "checkbox",
|
|
10471
|
-
checked:
|
|
10509
|
+
checked: _,
|
|
10472
10510
|
disabled: o,
|
|
10473
|
-
onChange:
|
|
10511
|
+
onChange: T,
|
|
10474
10512
|
...r
|
|
10475
10513
|
}
|
|
10476
10514
|
),
|
|
10477
|
-
/* @__PURE__ */
|
|
10515
|
+
/* @__PURE__ */ q(
|
|
10478
10516
|
"svg",
|
|
10479
10517
|
{
|
|
10480
10518
|
className: "gr-checkbox__icon",
|
|
10481
|
-
viewBox:
|
|
10519
|
+
viewBox: m.viewBox,
|
|
10482
10520
|
"aria-hidden": "true",
|
|
10483
10521
|
focusable: "false",
|
|
10484
10522
|
children: [
|
|
10485
|
-
/* @__PURE__ */ u("path", { className: "gr-checkbox__icon-default", d:
|
|
10486
|
-
/* @__PURE__ */ u("path", { className: "gr-checkbox__icon-active", d:
|
|
10523
|
+
/* @__PURE__ */ u("path", { className: "gr-checkbox__icon-default", d: m.defaultShapeD }),
|
|
10524
|
+
/* @__PURE__ */ u("path", { className: "gr-checkbox__icon-active", d: m.activeShapeD }),
|
|
10487
10525
|
/* @__PURE__ */ u(
|
|
10488
10526
|
"path",
|
|
10489
10527
|
{
|
|
10490
10528
|
className: "gr-checkbox__icon-check",
|
|
10491
|
-
d:
|
|
10492
|
-
transform:
|
|
10529
|
+
d: m.checkD,
|
|
10530
|
+
transform: m.checkTransform
|
|
10493
10531
|
}
|
|
10494
10532
|
),
|
|
10495
10533
|
/* @__PURE__ */ u(
|
|
10496
10534
|
"path",
|
|
10497
10535
|
{
|
|
10498
10536
|
className: "gr-checkbox__icon-minus",
|
|
10499
|
-
d:
|
|
10500
|
-
transform:
|
|
10537
|
+
d: m.minusD,
|
|
10538
|
+
transform: m.minusTransform
|
|
10501
10539
|
}
|
|
10502
10540
|
),
|
|
10503
|
-
/* @__PURE__ */ u("path", { className: "gr-checkbox__icon-opacity", d:
|
|
10541
|
+
/* @__PURE__ */ u("path", { className: "gr-checkbox__icon-opacity", d: m.activeShapeD })
|
|
10504
10542
|
]
|
|
10505
10543
|
}
|
|
10506
10544
|
)
|
|
@@ -10509,17 +10547,17 @@ function ks({
|
|
|
10509
10547
|
);
|
|
10510
10548
|
}
|
|
10511
10549
|
export {
|
|
10512
|
-
|
|
10513
|
-
|
|
10514
|
-
|
|
10515
|
-
|
|
10516
|
-
|
|
10517
|
-
|
|
10518
|
-
|
|
10519
|
-
|
|
10520
|
-
|
|
10521
|
-
|
|
10522
|
-
|
|
10523
|
-
|
|
10524
|
-
|
|
10550
|
+
ks as Avatar,
|
|
10551
|
+
si as Badge,
|
|
10552
|
+
Rt as Button,
|
|
10553
|
+
ws as Card,
|
|
10554
|
+
As as Checkbox,
|
|
10555
|
+
bs as Counter,
|
|
10556
|
+
Pi as Description,
|
|
10557
|
+
Z as Icon,
|
|
10558
|
+
le as IconButton,
|
|
10559
|
+
Cs as Input,
|
|
10560
|
+
je as Label,
|
|
10561
|
+
_s as Link,
|
|
10562
|
+
Ye as Spinner
|
|
10525
10563
|
};
|