@cregis/ui 0.2.7 → 0.2.9
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/es/cregis-ui.js +883 -863
- package/dist/umd/cregis-ui.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/es/cregis-ui.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as ee, useSlots as ur, ref as q, computed as h, createElementBlock as k, openBlock as x, normalizeClass as _, createElementVNode as R, createCommentVNode as Y, mergeProps as we, createBlock as Me, resolveDynamicComponent as Ft, normalizeStyle as le, renderSlot as K, toDisplayString as H, unref as se, watch as re, withDirectives as Le, vModelDynamic as dr, withModifiers as fr, vModelText as pr, createVNode as Z, withCtx as te, createTextVNode as $e, nextTick as Ke, reactive as je, provide as Ht, toRef as vr, Fragment as lt, renderList as ct, inject as qt, onMounted as et, onUnmounted as Ve, onBeforeUnmount as Ut, Transition as vt, render as Qe, h as Yt, toHandlers as Vt, vShow as mt } from "vue";
|
|
2
2
|
import { EdsLoad as mr, EdsCloseCircleFill as gr, EdsWarningFill as hr, EdsSearch as Xt, EdsArrowDownMiniIos as Kt, EdsArrowRightMiniIos as br } from "@cregis/icon";
|
|
3
|
-
const yr = ["disabled"], xr = ["disabled"], wr = ["disabled"], Ye = /* @__PURE__ */
|
|
3
|
+
const yr = ["disabled"], xr = ["disabled"], wr = ["disabled"], Ye = /* @__PURE__ */ ee({
|
|
4
4
|
name: "Button",
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
__name: "Button",
|
|
@@ -21,14 +21,14 @@ const yr = ["disabled"], xr = ["disabled"], wr = ["disabled"], Ye = /* @__PURE__
|
|
|
21
21
|
isActive: { type: Boolean }
|
|
22
22
|
},
|
|
23
23
|
setup(e) {
|
|
24
|
-
const t = e, r = ur(), n =
|
|
24
|
+
const t = e, r = ur(), n = q(null);
|
|
25
25
|
function a() {
|
|
26
26
|
t.disabled || t.loading || n.value?.click();
|
|
27
27
|
}
|
|
28
|
-
const
|
|
29
|
-
const c = t,
|
|
30
|
-
return !c.icon && typeof
|
|
31
|
-
}),
|
|
28
|
+
const o = h(() => {
|
|
29
|
+
const c = t, O = r.icon;
|
|
30
|
+
return !c.icon && typeof O == "function";
|
|
31
|
+
}), s = h(() => t.size === "large" ? "20px" : t.size === "medium" ? "16px" : "12px"), i = h(() => t.size === "large" || t.size === "medium" ? "16px" : "12px"), l = h(() => t.width ? { width: t.width } : void 0), d = h(() => {
|
|
32
32
|
if (t.plain || t.text)
|
|
33
33
|
switch (t.type) {
|
|
34
34
|
case "primary":
|
|
@@ -45,9 +45,9 @@ const yr = ["disabled"], xr = ["disabled"], wr = ["disabled"], Ye = /* @__PURE__
|
|
|
45
45
|
else
|
|
46
46
|
return t.type === "secondary" ? "var(--material-foreground-base-secondary)" : t.type === "foreground" ? "var(--text-face-primary)" : t.type === "sameWhite" ? "var(--text-same-black)" : "var(--material-same-white)";
|
|
47
47
|
});
|
|
48
|
-
return (c,
|
|
48
|
+
return (c, O) => e.icon || c.$slots.icon ? (x(), k("div", {
|
|
49
49
|
key: 0,
|
|
50
|
-
class:
|
|
50
|
+
class: _(["cregis-button__icon-wrapper", { "cregis-button__icon-wrapper--professional": e.iconType === "professional" }])
|
|
51
51
|
}, [
|
|
52
52
|
R("button", we({
|
|
53
53
|
ref_key: "iconButtonRef",
|
|
@@ -56,29 +56,29 @@ const yr = ["disabled"], xr = ["disabled"], wr = ["disabled"], Ye = /* @__PURE__
|
|
|
56
56
|
class: ["cregis-button__icon", {
|
|
57
57
|
[`cregis-button__icon--${e.iconType}`]: e.iconType,
|
|
58
58
|
[`cregis-button__icon--${e.size}`]: e.size,
|
|
59
|
-
"cregis-button__icon--slot":
|
|
59
|
+
"cregis-button__icon--slot": o.value,
|
|
60
60
|
"is-disabled": e.disabled,
|
|
61
61
|
"is-active": e.isActive
|
|
62
62
|
}],
|
|
63
63
|
disabled: e.disabled || e.loading
|
|
64
64
|
}), [
|
|
65
|
-
e.icon ? (
|
|
65
|
+
e.icon ? (x(), Me(Ft(e.icon), {
|
|
66
66
|
key: 0,
|
|
67
|
-
size:
|
|
68
|
-
}, null, 8, ["size"])) : (
|
|
67
|
+
size: s.value
|
|
68
|
+
}, null, 8, ["size"])) : (x(), k("span", {
|
|
69
69
|
key: 1,
|
|
70
70
|
class: "cregis-button__icon-slot-inner",
|
|
71
|
-
style:
|
|
71
|
+
style: le({ "--cregis-btn-icon-slot-size": s.value })
|
|
72
72
|
}, [
|
|
73
|
-
|
|
73
|
+
K(c.$slots, "icon")
|
|
74
74
|
], 4))
|
|
75
75
|
], 16, yr),
|
|
76
|
-
e.iconText ? (
|
|
76
|
+
e.iconText ? (x(), k("span", {
|
|
77
77
|
key: 0,
|
|
78
|
-
class:
|
|
78
|
+
class: _(["cregis-button__icon-text", { "is-disabled": e.disabled }]),
|
|
79
79
|
onClick: a
|
|
80
|
-
},
|
|
81
|
-
], 2)) : e.link ? (
|
|
80
|
+
}, H(e.iconText), 3)) : Y("", !0)
|
|
81
|
+
], 2)) : e.link ? (x(), k("button", we({ key: 1 }, c.$attrs, {
|
|
82
82
|
class: ["cregis-button__link", {
|
|
83
83
|
[`cregis-button__link--${e.type}`]: e.type,
|
|
84
84
|
[`cregis-button__link--${e.size}`]: e.size,
|
|
@@ -87,12 +87,12 @@ const yr = ["disabled"], xr = ["disabled"], wr = ["disabled"], Ye = /* @__PURE__
|
|
|
87
87
|
}],
|
|
88
88
|
disabled: e.disabled || e.loading
|
|
89
89
|
}), [
|
|
90
|
-
|
|
91
|
-
], 16, xr)) : (
|
|
90
|
+
K(c.$slots, "default")
|
|
91
|
+
], 16, xr)) : (x(), k("button", we({
|
|
92
92
|
key: 2,
|
|
93
93
|
ref: "buttonRef"
|
|
94
94
|
}, c.$attrs, {
|
|
95
|
-
style:
|
|
95
|
+
style: l.value,
|
|
96
96
|
class: ["cregis-button", {
|
|
97
97
|
[`cregis-button--${e.type}`]: e.type,
|
|
98
98
|
[`cregis-button--${e.size}`]: e.size,
|
|
@@ -106,24 +106,24 @@ const yr = ["disabled"], xr = ["disabled"], wr = ["disabled"], Ye = /* @__PURE__
|
|
|
106
106
|
}],
|
|
107
107
|
disabled: e.disabled || e.loading
|
|
108
108
|
}), [
|
|
109
|
-
e.loading ? (
|
|
109
|
+
e.loading ? (x(), Me(se(mr), {
|
|
110
110
|
key: 0,
|
|
111
111
|
class: "loading",
|
|
112
|
-
size:
|
|
113
|
-
color:
|
|
114
|
-
}, null, 8, ["size", "color"])) :
|
|
112
|
+
size: i.value,
|
|
113
|
+
color: d.value
|
|
114
|
+
}, null, 8, ["size", "color"])) : K(c.$slots, "default", { key: 1 })
|
|
115
115
|
], 16, wr));
|
|
116
116
|
}
|
|
117
117
|
}), Or = {
|
|
118
118
|
key: 0,
|
|
119
119
|
class: "cregis-input__prefix"
|
|
120
|
-
},
|
|
120
|
+
}, $r = ["type", "inputmode", "placeholder", "min", "disabled"], kr = {
|
|
121
121
|
key: 2,
|
|
122
122
|
class: "cregis-input__suffix"
|
|
123
123
|
}, Tr = ["disabled", "placeholder", "rows"], Sr = {
|
|
124
124
|
key: 0,
|
|
125
125
|
class: "cregis-textarea__buttons"
|
|
126
|
-
}, Qt = /* @__PURE__ */
|
|
126
|
+
}, Qt = /* @__PURE__ */ ee({
|
|
127
127
|
name: "Input",
|
|
128
128
|
inheritAttrs: !1,
|
|
129
129
|
__name: "Input",
|
|
@@ -145,195 +145,215 @@ const yr = ["disabled"], xr = ["disabled"], wr = ["disabled"], Ye = /* @__PURE__
|
|
|
145
145
|
},
|
|
146
146
|
emits: ["update:modelValue", "input", "change", "focus", "blur", "clear"],
|
|
147
147
|
setup(e, { expose: t, emit: r }) {
|
|
148
|
-
const n = e, a = r,
|
|
149
|
-
if (
|
|
150
|
-
const
|
|
151
|
-
if (
|
|
152
|
-
const
|
|
153
|
-
if (!Number.isNaN(
|
|
154
|
-
if (/^-/.test(
|
|
155
|
-
const
|
|
156
|
-
return
|
|
148
|
+
const n = e, a = r, o = (u) => {
|
|
149
|
+
if (u === "" || u === null || u === void 0) return "";
|
|
150
|
+
const v = String(u).trim();
|
|
151
|
+
if (v === "") return "";
|
|
152
|
+
const V = Number(v.replace(/,/g, ""));
|
|
153
|
+
if (!Number.isNaN(V) && V < 0) return Math.abs(V);
|
|
154
|
+
if (/^-/.test(v)) {
|
|
155
|
+
const I = v.replace(/^-+/, "");
|
|
156
|
+
return I === "" ? "" : I;
|
|
157
157
|
}
|
|
158
|
-
return
|
|
159
|
-
},
|
|
160
|
-
const
|
|
161
|
-
return
|
|
162
|
-
}),
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
if (
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
const
|
|
173
|
-
return
|
|
174
|
-
},
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
158
|
+
return u;
|
|
159
|
+
}, s = h(() => {
|
|
160
|
+
const u = n.decimals;
|
|
161
|
+
return u === void 0 || !Number.isFinite(u) ? null : Math.max(0, Math.floor(u));
|
|
162
|
+
}), i = h(
|
|
163
|
+
() => n.type === "number" && s.value !== null
|
|
164
|
+
), l = h(
|
|
165
|
+
() => i.value ? "text" : n.type
|
|
166
|
+
), d = h(() => i.value ? "decimal" : void 0), c = (u) => u.replace(/[,,。.]/g, "."), O = (u) => {
|
|
167
|
+
if (u === "" || u === null || u === void 0) return "";
|
|
168
|
+
let v = c(String(u).trim());
|
|
169
|
+
if (v === "") return "";
|
|
170
|
+
let V = !1;
|
|
171
|
+
!n.nonNegative && v.startsWith("-") && (V = !0, v = v.slice(1)), v = v.replace(/[^\d.]/g, "");
|
|
172
|
+
const I = v.indexOf(".");
|
|
173
|
+
return I !== -1 && (v = v.slice(0, I + 1) + v.slice(I + 1).replace(/\./g, "")), (V ? "-" : "") + v;
|
|
174
|
+
}, P = (u) => {
|
|
175
|
+
const v = s.value;
|
|
176
|
+
if (v === null) return u;
|
|
177
|
+
if (u === "" || u === null || u === void 0) return "";
|
|
178
|
+
const V = String(u).trim();
|
|
179
|
+
if (V === "") return "";
|
|
180
|
+
const I = V.startsWith("-");
|
|
181
|
+
let g = I ? V.slice(1) : V;
|
|
182
|
+
const F = g.indexOf(".");
|
|
183
|
+
if (F === -1) return u;
|
|
184
|
+
const U = g.slice(0, F), G = g.slice(F + 1);
|
|
185
|
+
return v === 0 ? (I ? "-" : "") + U : G.length <= v ? u : (I ? "-" : "") + U + "." + G.slice(0, v);
|
|
186
|
+
}, m = (u) => {
|
|
187
|
+
let v = u;
|
|
188
|
+
return i.value && (v = O(v)), n.nonNegative && (v = o(v)), s.value !== null && (v = P(v)), v;
|
|
189
|
+
}, b = q(
|
|
190
|
+
n.type === "number" ? m(n.modelValue) : n.modelValue
|
|
179
191
|
);
|
|
180
|
-
|
|
192
|
+
re(
|
|
181
193
|
() => n.modelValue,
|
|
182
|
-
(
|
|
183
|
-
|
|
194
|
+
(u) => {
|
|
195
|
+
b.value = n.type === "number" ? m(u) : u;
|
|
184
196
|
}
|
|
185
197
|
);
|
|
186
|
-
const
|
|
187
|
-
let
|
|
188
|
-
const
|
|
189
|
-
await Ke(),
|
|
190
|
-
},
|
|
198
|
+
const $ = q(), T = q(0), E = q(!1);
|
|
199
|
+
let D = null;
|
|
200
|
+
const L = async () => {
|
|
201
|
+
await Ke(), $.value?.focus();
|
|
202
|
+
}, w = async () => {
|
|
191
203
|
if (n.type === "number") {
|
|
192
|
-
const
|
|
193
|
-
|
|
204
|
+
const u = m(b.value);
|
|
205
|
+
u !== b.value && (b.value = u);
|
|
194
206
|
}
|
|
195
|
-
a("update:modelValue",
|
|
196
|
-
}, T = () => {
|
|
197
|
-
a("change", u.value);
|
|
198
|
-
}, E = (d) => {
|
|
199
|
-
$.value = !0, a("focus", d);
|
|
200
|
-
}, D = (d) => {
|
|
201
|
-
$.value = !1, a("blur", d);
|
|
202
|
-
}, W = h(() => n.clearable && !n.disabled && !!u.value && $.value), w = () => {
|
|
203
|
-
u.value = "", a("update:modelValue", ""), a("clear"), a("input", ""), a("change", "");
|
|
207
|
+
a("update:modelValue", b.value), a("input", b.value), await Ke(), j();
|
|
204
208
|
}, S = () => {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
+
a("change", b.value);
|
|
210
|
+
}, f = (u) => {
|
|
211
|
+
E.value = !0, a("focus", u);
|
|
212
|
+
}, C = (u) => {
|
|
213
|
+
E.value = !1, a("blur", u);
|
|
214
|
+
}, A = h(() => n.clearable && !n.disabled && !!b.value && E.value), W = () => {
|
|
215
|
+
b.value = "", a("update:modelValue", ""), a("clear"), a("input", ""), a("change", "");
|
|
216
|
+
}, j = () => {
|
|
217
|
+
D && cancelAnimationFrame(D), D = requestAnimationFrame(() => {
|
|
218
|
+
if (!$.value || $.value.tagName !== "INPUT") return;
|
|
219
|
+
const u = $.value, v = u.value, V = document.createElement("span");
|
|
220
|
+
V.style.position = "absolute", V.style.visibility = "hidden", V.style.whiteSpace = "pre", V.style.font = window.getComputedStyle(u).font, V.style.letterSpacing = window.getComputedStyle(u).letterSpacing, V.textContent = v || " ", document.body.appendChild(V), T.value = V.getBoundingClientRect().width, document.body.removeChild(V);
|
|
209
221
|
});
|
|
210
|
-
},
|
|
211
|
-
const
|
|
212
|
-
return
|
|
213
|
-
}),
|
|
222
|
+
}, y = h(() => {
|
|
223
|
+
const u = {};
|
|
224
|
+
return T.value > 0 && (u.position = "absolute", u.left = `${T.value + 16}px`), u;
|
|
225
|
+
}), z = async () => {
|
|
214
226
|
try {
|
|
215
|
-
|
|
216
|
-
} catch (
|
|
217
|
-
console.error("paste error:",
|
|
227
|
+
b.value = await navigator.clipboard.readText(), a("update:modelValue", b.value);
|
|
228
|
+
} catch (u) {
|
|
229
|
+
console.error("paste error:", u);
|
|
218
230
|
}
|
|
219
|
-
},
|
|
231
|
+
}, M = h(
|
|
220
232
|
() => n.type === "number" && n.nonNegative ? 0 : void 0
|
|
221
|
-
),
|
|
222
|
-
if (n.type !== "number" ||
|
|
223
|
-
const
|
|
224
|
-
if ((n.nonNegative ||
|
|
225
|
-
|
|
233
|
+
), X = (u) => u === "." || u === "," || u === "," || u === "。" || u === "." || u === "Decimal", Q = (u) => {
|
|
234
|
+
if (n.type !== "number" || u.isComposing) return;
|
|
235
|
+
const v = s.value;
|
|
236
|
+
if ((n.nonNegative || v !== null) && (u.key === "e" || u.key === "E")) {
|
|
237
|
+
u.preventDefault();
|
|
226
238
|
return;
|
|
227
239
|
}
|
|
228
|
-
if (n.nonNegative && (
|
|
229
|
-
|
|
240
|
+
if (n.nonNegative && (u.key === "-" || u.key === "+")) {
|
|
241
|
+
u.preventDefault();
|
|
230
242
|
return;
|
|
231
243
|
}
|
|
232
|
-
if (
|
|
233
|
-
|
|
244
|
+
if (v === 0 && X(u.key)) {
|
|
245
|
+
u.preventDefault();
|
|
234
246
|
return;
|
|
235
247
|
}
|
|
236
|
-
if (
|
|
237
|
-
const
|
|
238
|
-
|
|
248
|
+
if (v !== null && v > 0 && X(u.key)) {
|
|
249
|
+
const V = u.target;
|
|
250
|
+
c(V.value).includes(".") && u.preventDefault();
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
if (v !== null && v > 0 && u.key !== "." && /^\d$/.test(u.key)) {
|
|
254
|
+
const V = u.target, I = c(V.value), g = V.selectionStart, F = V.selectionEnd;
|
|
255
|
+
if (g === null || F === null) return;
|
|
256
|
+
const U = I.slice(0, g) + u.key + I.slice(F), G = U.indexOf(".");
|
|
257
|
+
G !== -1 && U.slice(G + 1).replace(/\D/g, "").length > v && u.preventDefault();
|
|
239
258
|
}
|
|
240
259
|
};
|
|
241
260
|
return t({
|
|
242
|
-
focus:
|
|
243
|
-
updateTextWidth:
|
|
244
|
-
}), (
|
|
261
|
+
focus: L,
|
|
262
|
+
updateTextWidth: j
|
|
263
|
+
}), (u, v) => e.type !== "textarea" ? (x(), k("div", {
|
|
245
264
|
key: 0,
|
|
246
|
-
class:
|
|
265
|
+
class: _(["cregis-input", {
|
|
247
266
|
[`cregis-input--${e.size}`]: e.size,
|
|
248
267
|
"is-disabled": e.disabled,
|
|
249
|
-
"is-prefix":
|
|
250
|
-
"is-suffix":
|
|
268
|
+
"is-prefix": u.$slots.prefix,
|
|
269
|
+
"is-suffix": u.$slots.suffix
|
|
251
270
|
}]),
|
|
252
|
-
style:
|
|
271
|
+
style: le([{ width: e.width }, e.inputStyle])
|
|
253
272
|
}, [
|
|
254
273
|
R("div", {
|
|
255
|
-
class:
|
|
274
|
+
class: _(["cregis-input__wrapper", { "is-focus": E.value }])
|
|
256
275
|
}, [
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
])) :
|
|
276
|
+
u.$slots.prefix ? (x(), k("span", Or, [
|
|
277
|
+
K(u.$slots, "prefix")
|
|
278
|
+
])) : Y("", !0),
|
|
260
279
|
Le(R("input", we({
|
|
261
280
|
class: "cregis-input__inner",
|
|
262
|
-
"onUpdate:modelValue":
|
|
281
|
+
"onUpdate:modelValue": v[0] || (v[0] = (V) => b.value = V),
|
|
263
282
|
ref_key: "inputRef",
|
|
264
|
-
ref:
|
|
265
|
-
type:
|
|
283
|
+
ref: $,
|
|
284
|
+
type: l.value,
|
|
285
|
+
inputmode: d.value,
|
|
266
286
|
placeholder: e.placeholder
|
|
267
|
-
},
|
|
268
|
-
min:
|
|
287
|
+
}, u.$attrs, {
|
|
288
|
+
min: M.value,
|
|
269
289
|
spellcheck: "false",
|
|
270
290
|
disabled: e.disabled,
|
|
271
|
-
onInput:
|
|
272
|
-
onChange:
|
|
273
|
-
onFocus:
|
|
274
|
-
onBlur:
|
|
275
|
-
onKeydown:
|
|
276
|
-
}), null, 16,
|
|
277
|
-
[dr,
|
|
291
|
+
onInput: w,
|
|
292
|
+
onChange: S,
|
|
293
|
+
onFocus: f,
|
|
294
|
+
onBlur: C,
|
|
295
|
+
onKeydown: Q
|
|
296
|
+
}), null, 16, $r), [
|
|
297
|
+
[dr, b.value]
|
|
278
298
|
]),
|
|
279
|
-
e.unit &&
|
|
299
|
+
e.unit && b.value ? (x(), k("span", {
|
|
280
300
|
key: 1,
|
|
281
|
-
style:
|
|
301
|
+
style: le(y.value),
|
|
282
302
|
class: "cregis-input__unit"
|
|
283
|
-
},
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
303
|
+
}, H(e.unit), 5)) : Y("", !0),
|
|
304
|
+
u.$slots.suffix || A.value ? (x(), k("span", kr, [
|
|
305
|
+
K(u.$slots, "suffix"),
|
|
306
|
+
A.value ? (x(), Me(Ye, {
|
|
287
307
|
key: 0,
|
|
288
|
-
icon:
|
|
308
|
+
icon: se(gr),
|
|
289
309
|
"icon-type": "square",
|
|
290
|
-
onClick:
|
|
291
|
-
onMousedown:
|
|
310
|
+
onClick: W,
|
|
311
|
+
onMousedown: v[1] || (v[1] = fr(() => {
|
|
292
312
|
}, ["prevent"]))
|
|
293
|
-
}, null, 8, ["icon"])) :
|
|
294
|
-
])) :
|
|
313
|
+
}, null, 8, ["icon"])) : Y("", !0)
|
|
314
|
+
])) : Y("", !0)
|
|
295
315
|
], 2)
|
|
296
|
-
], 6)) : (
|
|
316
|
+
], 6)) : (x(), k("div", {
|
|
297
317
|
key: 1,
|
|
298
|
-
class:
|
|
299
|
-
style:
|
|
318
|
+
class: _(["cregis-textarea", { "is-disabled": e.disabled }]),
|
|
319
|
+
style: le([{ width: e.width }, e.inputStyle])
|
|
300
320
|
}, [
|
|
301
|
-
Le(R("textarea", we({ class: "cregis-textarea__wrapper" },
|
|
321
|
+
Le(R("textarea", we({ class: "cregis-textarea__wrapper" }, u.$attrs, {
|
|
302
322
|
spellcheck: "false",
|
|
303
323
|
ref_key: "inputRef",
|
|
304
|
-
ref:
|
|
324
|
+
ref: $,
|
|
305
325
|
disabled: e.disabled,
|
|
306
326
|
placeholder: e.placeholder,
|
|
307
327
|
rows: e.rows,
|
|
308
|
-
"onUpdate:modelValue":
|
|
309
|
-
onInput:
|
|
310
|
-
onChange:
|
|
311
|
-
onFocus:
|
|
312
|
-
onBlur:
|
|
328
|
+
"onUpdate:modelValue": v[2] || (v[2] = (V) => b.value = V),
|
|
329
|
+
onInput: w,
|
|
330
|
+
onChange: S,
|
|
331
|
+
onFocus: f,
|
|
332
|
+
onBlur: C
|
|
313
333
|
}), null, 16, Tr), [
|
|
314
|
-
[pr,
|
|
334
|
+
[pr, b.value]
|
|
315
335
|
]),
|
|
316
|
-
e.disabled ?
|
|
317
|
-
|
|
336
|
+
e.disabled ? Y("", !0) : (x(), k("div", Sr, [
|
|
337
|
+
Z(Ye, {
|
|
318
338
|
class: "cregis-textarea__button",
|
|
319
339
|
link: "",
|
|
320
340
|
size: "small",
|
|
321
|
-
onClick:
|
|
341
|
+
onClick: z
|
|
322
342
|
}, {
|
|
323
|
-
default:
|
|
324
|
-
|
|
343
|
+
default: te(() => [
|
|
344
|
+
$e(H(e.pasteText), 1)
|
|
325
345
|
]),
|
|
326
346
|
_: 1
|
|
327
347
|
}),
|
|
328
|
-
|
|
348
|
+
Z(Ye, {
|
|
329
349
|
class: "cregis-textarea__button",
|
|
330
350
|
link: "",
|
|
331
351
|
size: "small",
|
|
332
|
-
disabled: !
|
|
333
|
-
onClick:
|
|
352
|
+
disabled: !b.value,
|
|
353
|
+
onClick: W
|
|
334
354
|
}, {
|
|
335
|
-
default:
|
|
336
|
-
|
|
355
|
+
default: te(() => [
|
|
356
|
+
$e(H(e.clearText), 1)
|
|
337
357
|
]),
|
|
338
358
|
_: 1
|
|
339
359
|
}, 8, ["disabled"])
|
|
@@ -345,13 +365,13 @@ const yr = ["disabled"], xr = ["disabled"], wr = ["disabled"], Ye = /* @__PURE__
|
|
|
345
365
|
"stroke-width": "1",
|
|
346
366
|
fill: "none",
|
|
347
367
|
"fill-rule": "evenodd"
|
|
348
|
-
}, Er = { transform: "translate(-394.000000, -457.000000)" }, Vr = { transform: "translate(394.000000, 457.000000)" },
|
|
368
|
+
}, Er = { transform: "translate(-394.000000, -457.000000)" }, Vr = { transform: "translate(394.000000, 457.000000)" }, Dr = ["width", "height"], Br = /* @__PURE__ */ ee({
|
|
349
369
|
__name: "checked-basis",
|
|
350
370
|
props: {
|
|
351
371
|
size: { default: "16px" }
|
|
352
372
|
},
|
|
353
373
|
setup(e) {
|
|
354
|
-
return (t, r) => (
|
|
374
|
+
return (t, r) => (x(), k("svg", {
|
|
355
375
|
width: e.size,
|
|
356
376
|
height: e.size,
|
|
357
377
|
viewBox: "0 0 16 16",
|
|
@@ -367,7 +387,7 @@ const yr = ["disabled"], xr = ["disabled"], wr = ["disabled"], Ye = /* @__PURE__
|
|
|
367
387
|
y: "0",
|
|
368
388
|
width: e.size,
|
|
369
389
|
height: e.size
|
|
370
|
-
}, null, 8,
|
|
390
|
+
}, null, 8, Dr),
|
|
371
391
|
r[0] || (r[0] = R("path", {
|
|
372
392
|
d: "M6.67713976,13.5709642 C7.12567714,13.5709642 7.468039,13.3943662 7.70422535,13.0411701 L13.7562297,3.77789816 C13.8407367,3.65005417 13.9024919,3.52546046 13.9414951,3.40411701 C13.9804984,3.28277356 14,3.16468039 14,3.04983749 C14,2.74647887 13.8976165,2.49566631 13.6928494,2.29739978 C13.4880823,2.09913326 13.2307692,2 12.9209101,2 C12.7063922,2 12.5265439,2.04225352 12.3813651,2.12676056 C12.2361863,2.21126761 12.0975081,2.35536295 11.9653304,2.55904659 L6.65113759,10.9512459 L3.95016251,7.60346696 C3.71830986,7.32177681 3.43011918,7.18093174 3.08559047,7.18093174 C2.77139762,7.18093174 2.51191766,7.28169014 2.3071506,7.48320693 C2.10238353,7.68472373 2,7.93824485 2,8.24377031 C2,8.38028169 2.02329361,8.51083424 2.06988082,8.63542795 C2.11646804,8.76002167 2.19826652,8.88949079 2.31527627,9.02383532 L5.67280607,13.0899242 C5.94149512,13.4106176 6.27627302,13.5709642 6.67713976,13.5709642 Z",
|
|
373
393
|
fill: "currentColor",
|
|
@@ -378,10 +398,10 @@ const yr = ["disabled"], xr = ["disabled"], wr = ["disabled"], Ye = /* @__PURE__
|
|
|
378
398
|
])
|
|
379
399
|
], 8, Cr));
|
|
380
400
|
}
|
|
381
|
-
}),
|
|
401
|
+
}), Rr = {
|
|
382
402
|
key: 0,
|
|
383
403
|
class: "cregis-checkbox--indeterminate"
|
|
384
|
-
}, Ja = /* @__PURE__ */
|
|
404
|
+
}, Ja = /* @__PURE__ */ ee({
|
|
385
405
|
name: "Checkbox",
|
|
386
406
|
__name: "Checkbox",
|
|
387
407
|
props: {
|
|
@@ -393,42 +413,42 @@ const yr = ["disabled"], xr = ["disabled"], wr = ["disabled"], Ye = /* @__PURE__
|
|
|
393
413
|
},
|
|
394
414
|
emits: ["update:modelValue", "change"],
|
|
395
415
|
setup(e, { emit: t }) {
|
|
396
|
-
const r = e, n = t, a = h(() => r.modelValue),
|
|
416
|
+
const r = e, n = t, a = h(() => r.modelValue), o = () => {
|
|
397
417
|
r.disabled || n("update:modelValue", !a.value);
|
|
398
418
|
};
|
|
399
|
-
return
|
|
419
|
+
return re(
|
|
400
420
|
() => a.value,
|
|
401
421
|
() => {
|
|
402
422
|
n("change", a.value);
|
|
403
423
|
}
|
|
404
|
-
), (
|
|
424
|
+
), (s, i) => (x(), k("div", {
|
|
405
425
|
class: "cregis-checkbox__wrapper",
|
|
406
|
-
onClick:
|
|
426
|
+
onClick: o
|
|
407
427
|
}, [
|
|
408
428
|
R("div", {
|
|
409
|
-
class:
|
|
429
|
+
class: _(["cregis-checkbox", {
|
|
410
430
|
"is-disabled": e.disabled,
|
|
411
431
|
"is-checked": a.value,
|
|
412
432
|
"is-circle": e.circle,
|
|
413
433
|
"is-indeterminate": e.indeterminate
|
|
414
434
|
}])
|
|
415
435
|
}, [
|
|
416
|
-
e.indeterminate ? (
|
|
436
|
+
e.indeterminate ? (x(), k("div", Rr)) : (x(), Me(Br, {
|
|
417
437
|
key: 1,
|
|
418
438
|
size: "10px"
|
|
419
439
|
}))
|
|
420
440
|
], 2),
|
|
421
|
-
|
|
441
|
+
s.$slots.default || e.label ? (x(), k("span", {
|
|
422
442
|
key: 0,
|
|
423
|
-
class:
|
|
443
|
+
class: _(["cregis-checkbox__label", { "is-disabled": e.disabled }])
|
|
424
444
|
}, [
|
|
425
|
-
|
|
426
|
-
|
|
445
|
+
K(s.$slots, "default", {}, () => [
|
|
446
|
+
$e(H(e.label), 1)
|
|
427
447
|
])
|
|
428
|
-
], 2)) :
|
|
448
|
+
], 2)) : Y("", !0)
|
|
429
449
|
]));
|
|
430
450
|
}
|
|
431
|
-
}), ei = /* @__PURE__ */
|
|
451
|
+
}), ei = /* @__PURE__ */ ee({
|
|
432
452
|
name: "Radio",
|
|
433
453
|
__name: "Radio",
|
|
434
454
|
props: {
|
|
@@ -439,32 +459,32 @@ const yr = ["disabled"], xr = ["disabled"], wr = ["disabled"], Ye = /* @__PURE__
|
|
|
439
459
|
},
|
|
440
460
|
emits: ["update:modelValue", "change"],
|
|
441
461
|
setup(e, { emit: t }) {
|
|
442
|
-
const r = e, n = t, a = h(() => r.modelValue === r.value),
|
|
462
|
+
const r = e, n = t, a = h(() => r.modelValue === r.value), o = () => {
|
|
443
463
|
r.disabled || (n("update:modelValue", r.value), n("change", r.value));
|
|
444
464
|
};
|
|
445
|
-
return (
|
|
465
|
+
return (s, i) => (x(), k("div", {
|
|
446
466
|
class: "cregis-radio__wrapper",
|
|
447
|
-
onClick:
|
|
467
|
+
onClick: o
|
|
448
468
|
}, [
|
|
449
469
|
R("div", {
|
|
450
|
-
class:
|
|
470
|
+
class: _(["cregis-radio", {
|
|
451
471
|
"is-disabled": e.disabled,
|
|
452
472
|
"is-checked": a.value
|
|
453
473
|
}])
|
|
454
|
-
}, [...
|
|
474
|
+
}, [...i[0] || (i[0] = [
|
|
455
475
|
R("div", { class: "cregis-radio__inner" }, null, -1)
|
|
456
476
|
])], 2),
|
|
457
|
-
|
|
477
|
+
s.$slots.default || e.label ? (x(), k("span", {
|
|
458
478
|
key: 0,
|
|
459
|
-
class:
|
|
479
|
+
class: _(["cregis-radio__label", { "is-disabled": e.disabled }])
|
|
460
480
|
}, [
|
|
461
|
-
|
|
462
|
-
|
|
481
|
+
K(s.$slots, "default", {}, () => [
|
|
482
|
+
$e(H(e.label), 1)
|
|
463
483
|
])
|
|
464
|
-
], 2)) :
|
|
484
|
+
], 2)) : Y("", !0)
|
|
465
485
|
]));
|
|
466
486
|
}
|
|
467
|
-
}), ti = /* @__PURE__ */
|
|
487
|
+
}), ti = /* @__PURE__ */ ee({
|
|
468
488
|
name: "Divider",
|
|
469
489
|
__name: "Divider",
|
|
470
490
|
props: {
|
|
@@ -478,8 +498,8 @@ const yr = ["disabled"], xr = ["disabled"], wr = ["disabled"], Ye = /* @__PURE__
|
|
|
478
498
|
setup(e) {
|
|
479
499
|
const t = e, r = h(() => {
|
|
480
500
|
if (Array.isArray(t.margin)) {
|
|
481
|
-
const [a,
|
|
482
|
-
return t.direction === "horizontal" ? `${a} 0 ${
|
|
501
|
+
const [a, o] = t.margin;
|
|
502
|
+
return t.direction === "horizontal" ? `${a} 0 ${o} 0` : `0 ${o} 0 ${a}`;
|
|
483
503
|
} else
|
|
484
504
|
return t.direction === "horizontal" ? `${t.margin} 0` : `0 ${t.margin}`;
|
|
485
505
|
}), n = h(() => t.direction === "horizontal" ? {
|
|
@@ -495,14 +515,14 @@ const yr = ["disabled"], xr = ["disabled"], wr = ["disabled"], Ye = /* @__PURE__
|
|
|
495
515
|
borderLeftColor: t.color,
|
|
496
516
|
margin: r.value
|
|
497
517
|
});
|
|
498
|
-
return (a,
|
|
499
|
-
class:
|
|
518
|
+
return (a, o) => (x(), k("div", {
|
|
519
|
+
class: _(["cregis-divider", {
|
|
500
520
|
[`cregis-divider--${e.direction}`]: e.direction
|
|
501
521
|
}]),
|
|
502
|
-
style:
|
|
522
|
+
style: le(n.value)
|
|
503
523
|
}, null, 6));
|
|
504
524
|
}
|
|
505
|
-
}), Gt = Symbol("TABS_KEY"), Ar = ["onClick"], zr = { style: { display: "none" } }, ri = /* @__PURE__ */
|
|
525
|
+
}), Gt = Symbol("TABS_KEY"), Ar = ["onClick"], zr = { style: { display: "none" } }, ri = /* @__PURE__ */ ee({
|
|
506
526
|
name: "Tabs",
|
|
507
527
|
__name: "Tabs",
|
|
508
528
|
props: {
|
|
@@ -512,12 +532,12 @@ const yr = ["disabled"], xr = ["disabled"], wr = ["disabled"], Ye = /* @__PURE__
|
|
|
512
532
|
},
|
|
513
533
|
emits: ["update:modelValue"],
|
|
514
534
|
setup(e) {
|
|
515
|
-
const t = e, r = je([]), n = (
|
|
516
|
-
r.some((
|
|
517
|
-
}, a = (
|
|
518
|
-
const
|
|
519
|
-
|
|
520
|
-
},
|
|
535
|
+
const t = e, r = je([]), n = (s) => {
|
|
536
|
+
r.some((i) => i.name === s.name) || r.push(s);
|
|
537
|
+
}, a = (s) => {
|
|
538
|
+
const i = r.findIndex((l) => l.name === s);
|
|
539
|
+
i !== -1 && r.splice(i, 1);
|
|
540
|
+
}, o = h(() => t.type === "card" ? t.size === "large" ? {
|
|
521
541
|
borderRadius: "13px"
|
|
522
542
|
} : t.size === "medium" ? {
|
|
523
543
|
borderRadius: "11px"
|
|
@@ -530,26 +550,26 @@ const yr = ["disabled"], xr = ["disabled"], wr = ["disabled"], Ye = /* @__PURE__
|
|
|
530
550
|
activeName: vr(t, "modelValue"),
|
|
531
551
|
registerTab: n,
|
|
532
552
|
unregisterTab: a
|
|
533
|
-
}), (
|
|
534
|
-
class:
|
|
553
|
+
}), (s, i) => (x(), k("div", {
|
|
554
|
+
class: _(["cregis-tabs", {
|
|
535
555
|
[`cregis-tabs--${e.type}`]: e.type,
|
|
536
556
|
[`cregis-tabs--${e.size}`]: e.size
|
|
537
557
|
}])
|
|
538
558
|
}, [
|
|
539
|
-
(
|
|
540
|
-
key:
|
|
541
|
-
class:
|
|
542
|
-
style:
|
|
543
|
-
onClick: (
|
|
559
|
+
(x(!0), k(lt, null, ct(r, (l) => (x(), k("div", {
|
|
560
|
+
key: l.name,
|
|
561
|
+
class: _(["cregis-tabs__item", { "is-active": e.modelValue === l.name }]),
|
|
562
|
+
style: le(o.value),
|
|
563
|
+
onClick: (d) => s.$emit("update:modelValue", l.name)
|
|
544
564
|
}, [
|
|
545
|
-
R("span", null,
|
|
565
|
+
R("span", null, H(l.label), 1)
|
|
546
566
|
], 14, Ar))), 128)),
|
|
547
567
|
R("div", zr, [
|
|
548
|
-
|
|
568
|
+
K(s.$slots, "default")
|
|
549
569
|
])
|
|
550
570
|
], 2));
|
|
551
571
|
}
|
|
552
|
-
}), ni = /* @__PURE__ */
|
|
572
|
+
}), ni = /* @__PURE__ */ ee({
|
|
553
573
|
name: "TabPane",
|
|
554
574
|
__name: "TabPane",
|
|
555
575
|
props: {
|
|
@@ -561,7 +581,7 @@ const yr = ["disabled"], xr = ["disabled"], wr = ["disabled"], Ye = /* @__PURE__
|
|
|
561
581
|
if (!r) throw new Error("TabPane must be used within Tabs");
|
|
562
582
|
return et(() => {
|
|
563
583
|
r.registerTab({ label: t.label, name: t.name });
|
|
564
|
-
}),
|
|
584
|
+
}), re(
|
|
565
585
|
() => t.label,
|
|
566
586
|
(n) => {
|
|
567
587
|
r.unregisterTab(t.name), r.registerTab({ label: n, name: t.name });
|
|
@@ -575,7 +595,7 @@ const yr = ["disabled"], xr = ["disabled"], wr = ["disabled"], Ye = /* @__PURE__
|
|
|
575
595
|
class: "cregis-message",
|
|
576
596
|
role: "status",
|
|
577
597
|
"aria-live": "polite"
|
|
578
|
-
}, Lr = /* @__PURE__ */
|
|
598
|
+
}, Lr = /* @__PURE__ */ ee({
|
|
579
599
|
name: "Message",
|
|
580
600
|
__name: "Message",
|
|
581
601
|
props: {
|
|
@@ -584,27 +604,27 @@ const yr = ["disabled"], xr = ["disabled"], wr = ["disabled"], Ye = /* @__PURE__
|
|
|
584
604
|
onVanish: {}
|
|
585
605
|
},
|
|
586
606
|
setup(e) {
|
|
587
|
-
const t = e, r =
|
|
607
|
+
const t = e, r = q(!1);
|
|
588
608
|
let n;
|
|
589
609
|
const a = () => {
|
|
590
610
|
n = window.setTimeout(() => {
|
|
591
611
|
r.value = !1;
|
|
592
612
|
}, t.duration);
|
|
593
|
-
},
|
|
613
|
+
}, o = () => {
|
|
594
614
|
t.onVanish?.();
|
|
595
615
|
};
|
|
596
616
|
return Ut(() => {
|
|
597
617
|
n !== void 0 && clearTimeout(n);
|
|
598
618
|
}), Ke(() => {
|
|
599
619
|
r.value = !0;
|
|
600
|
-
}), (
|
|
601
|
-
|
|
620
|
+
}), (s, i) => (x(), k("div", Wr, [
|
|
621
|
+
Z(vt, {
|
|
602
622
|
name: "cregis-message",
|
|
603
623
|
onAfterEnter: a,
|
|
604
|
-
onAfterLeave:
|
|
624
|
+
onAfterLeave: o
|
|
605
625
|
}, {
|
|
606
|
-
default:
|
|
607
|
-
r.value ? (
|
|
626
|
+
default: te(() => [
|
|
627
|
+
r.value ? (x(), k("div", Mr, H(e.message), 1)) : Y("", !0)
|
|
608
628
|
]),
|
|
609
629
|
_: 1
|
|
610
630
|
})
|
|
@@ -639,7 +659,7 @@ const Nr = { class: "cregis-notification__wrapper" }, _r = {
|
|
|
639
659
|
class: "cregis-notification",
|
|
640
660
|
role: "status",
|
|
641
661
|
"aria-live": "polite"
|
|
642
|
-
}, Ir = { class: "cregis-notification__content" }, Fr = { class: "cregis-notification__title" }, Hr = { class: "cregis-notification__message" }, qr = /* @__PURE__ */
|
|
662
|
+
}, Ir = { class: "cregis-notification__content" }, Fr = { class: "cregis-notification__title" }, Hr = { class: "cregis-notification__message" }, qr = /* @__PURE__ */ ee({
|
|
643
663
|
name: "Notification",
|
|
644
664
|
__name: "Notification",
|
|
645
665
|
props: {
|
|
@@ -650,7 +670,7 @@ const Nr = { class: "cregis-notification__wrapper" }, _r = {
|
|
|
650
670
|
onVanish: {}
|
|
651
671
|
},
|
|
652
672
|
setup(e) {
|
|
653
|
-
const t = e, r =
|
|
673
|
+
const t = e, r = q(!1), n = () => {
|
|
654
674
|
r.value = !1;
|
|
655
675
|
}, a = () => {
|
|
656
676
|
t.onVanish?.();
|
|
@@ -658,31 +678,31 @@ const Nr = { class: "cregis-notification__wrapper" }, _r = {
|
|
|
658
678
|
return Ut(() => {
|
|
659
679
|
}), Ke(() => {
|
|
660
680
|
r.value = !0;
|
|
661
|
-
}), (
|
|
662
|
-
|
|
681
|
+
}), (o, s) => (x(), k("div", Nr, [
|
|
682
|
+
Z(vt, {
|
|
663
683
|
name: "cregis-notification",
|
|
664
684
|
onAfterLeave: a
|
|
665
685
|
}, {
|
|
666
|
-
default:
|
|
667
|
-
r.value ? (
|
|
668
|
-
(
|
|
686
|
+
default: te(() => [
|
|
687
|
+
r.value ? (x(), k("div", _r, [
|
|
688
|
+
(x(), Me(Ft(se(hr)), {
|
|
669
689
|
size: "18px",
|
|
670
690
|
color: "var(--material-vibrant-error-primary)"
|
|
671
691
|
})),
|
|
672
692
|
R("div", Ir, [
|
|
673
|
-
R("div", Fr,
|
|
674
|
-
R("div", Hr,
|
|
693
|
+
R("div", Fr, H(e.title), 1),
|
|
694
|
+
R("div", Hr, H(e.message), 1)
|
|
675
695
|
]),
|
|
676
|
-
|
|
696
|
+
Z(Ye, {
|
|
677
697
|
type: "sameWhite",
|
|
678
698
|
onClick: n
|
|
679
699
|
}, {
|
|
680
|
-
default:
|
|
681
|
-
|
|
700
|
+
default: te(() => [
|
|
701
|
+
$e(H(e.btnText), 1)
|
|
682
702
|
]),
|
|
683
703
|
_: 1
|
|
684
704
|
})
|
|
685
|
-
])) :
|
|
705
|
+
])) : Y("", !0)
|
|
686
706
|
]),
|
|
687
707
|
_: 1
|
|
688
708
|
})
|
|
@@ -694,24 +714,24 @@ function ii(e) {
|
|
|
694
714
|
if (ot) return;
|
|
695
715
|
const { title: t, message: r, type: n, btnText: a } = e;
|
|
696
716
|
ot = !0;
|
|
697
|
-
const
|
|
698
|
-
document.body.appendChild(
|
|
717
|
+
const o = document.createElement("div");
|
|
718
|
+
document.body.appendChild(o), Qe(
|
|
699
719
|
Yt(qr, {
|
|
700
720
|
title: t,
|
|
701
721
|
message: r,
|
|
702
722
|
type: n,
|
|
703
723
|
btnText: a,
|
|
704
724
|
onVanish: () => {
|
|
705
|
-
ot = !1, Qe(null,
|
|
725
|
+
ot = !1, Qe(null, o), o.remove();
|
|
706
726
|
}
|
|
707
727
|
}),
|
|
708
|
-
|
|
728
|
+
o
|
|
709
729
|
);
|
|
710
730
|
}
|
|
711
731
|
const Ur = { class: "cregis-progress__wrapper" }, Yr = { class: "cregis-progress__track-wrap" }, Xr = { class: "cregis-progress cregis-progress--striped active" }, Kr = {
|
|
712
732
|
key: 0,
|
|
713
733
|
class: "cregis-progress__sliding-block"
|
|
714
|
-
}, oi = /* @__PURE__ */
|
|
734
|
+
}, oi = /* @__PURE__ */ ee({
|
|
715
735
|
name: "Progress",
|
|
716
736
|
__name: "Progress",
|
|
717
737
|
props: {
|
|
@@ -725,27 +745,27 @@ const Ur = { class: "cregis-progress__wrapper" }, Yr = { class: "cregis-progress
|
|
|
725
745
|
height: `${t.strokeWidth}px`
|
|
726
746
|
})), a = h(() => ({
|
|
727
747
|
"--cregis-progress-tip-left": `${r.value}%`
|
|
728
|
-
})),
|
|
729
|
-
return (
|
|
748
|
+
})), o = h(() => `${Math.round(t.percentage)}%`);
|
|
749
|
+
return (s, i) => (x(), k("div", Ur, [
|
|
730
750
|
R("div", Yr, [
|
|
731
|
-
e.showPercentage && t.percentage > 0 ? (
|
|
751
|
+
e.showPercentage && t.percentage > 0 ? (x(), k("div", {
|
|
732
752
|
key: 0,
|
|
733
753
|
class: "cregis-progress__tip",
|
|
734
|
-
style:
|
|
754
|
+
style: le(a.value),
|
|
735
755
|
"aria-live": "polite"
|
|
736
|
-
},
|
|
756
|
+
}, H(o.value), 5)) : Y("", !0),
|
|
737
757
|
R("div", Xr, [
|
|
738
758
|
R("div", {
|
|
739
759
|
class: "cregis-progress__bar",
|
|
740
|
-
style:
|
|
760
|
+
style: le(n.value)
|
|
741
761
|
}, null, 4),
|
|
742
|
-
t.percentage === 0 ? (
|
|
762
|
+
t.percentage === 0 ? (x(), k("div", Kr)) : Y("", !0)
|
|
743
763
|
])
|
|
744
764
|
])
|
|
745
765
|
]));
|
|
746
766
|
}
|
|
747
767
|
});
|
|
748
|
-
var
|
|
768
|
+
var ne = "top", ue = "bottom", de = "right", ae = "left", gt = "auto", Ie = [ne, ue, de, ae], Se = "start", Ne = "end", Qr = "clippingParents", Zt = "viewport", Re = "popper", Gr = "reference", Dt = /* @__PURE__ */ Ie.reduce(function(e, t) {
|
|
749
769
|
return e.concat([t + "-" + Se, t + "-" + Ne]);
|
|
750
770
|
}, []), Jt = /* @__PURE__ */ [].concat(Ie, [gt]).reduce(function(e, t) {
|
|
751
771
|
return e.concat([t, t + "-" + Se, t + "-" + Ne]);
|
|
@@ -753,7 +773,7 @@ var ee = "top", se = "bottom", le = "right", te = "left", gt = "auto", Ie = [ee,
|
|
|
753
773
|
function ve(e) {
|
|
754
774
|
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
755
775
|
}
|
|
756
|
-
function
|
|
776
|
+
function ie(e) {
|
|
757
777
|
if (e == null)
|
|
758
778
|
return window;
|
|
759
779
|
if (e.toString() !== "[object Window]") {
|
|
@@ -762,27 +782,27 @@ function re(e) {
|
|
|
762
782
|
}
|
|
763
783
|
return e;
|
|
764
784
|
}
|
|
765
|
-
function
|
|
766
|
-
var t =
|
|
785
|
+
function ke(e) {
|
|
786
|
+
var t = ie(e).Element;
|
|
767
787
|
return e instanceof t || e instanceof Element;
|
|
768
788
|
}
|
|
769
|
-
function
|
|
770
|
-
var t =
|
|
789
|
+
function ce(e) {
|
|
790
|
+
var t = ie(e).HTMLElement;
|
|
771
791
|
return e instanceof t || e instanceof HTMLElement;
|
|
772
792
|
}
|
|
773
793
|
function ht(e) {
|
|
774
794
|
if (typeof ShadowRoot > "u")
|
|
775
795
|
return !1;
|
|
776
|
-
var t =
|
|
796
|
+
var t = ie(e).ShadowRoot;
|
|
777
797
|
return e instanceof t || e instanceof ShadowRoot;
|
|
778
798
|
}
|
|
779
799
|
function cn(e) {
|
|
780
800
|
var t = e.state;
|
|
781
801
|
Object.keys(t.elements).forEach(function(r) {
|
|
782
|
-
var n = t.styles[r] || {}, a = t.attributes[r] || {},
|
|
783
|
-
!
|
|
784
|
-
var
|
|
785
|
-
|
|
802
|
+
var n = t.styles[r] || {}, a = t.attributes[r] || {}, o = t.elements[r];
|
|
803
|
+
!ce(o) || !ve(o) || (Object.assign(o.style, n), Object.keys(a).forEach(function(s) {
|
|
804
|
+
var i = a[s];
|
|
805
|
+
i === !1 ? o.removeAttribute(s) : o.setAttribute(s, i === !0 ? "" : i);
|
|
786
806
|
}));
|
|
787
807
|
});
|
|
788
808
|
}
|
|
@@ -801,11 +821,11 @@ function un(e) {
|
|
|
801
821
|
};
|
|
802
822
|
return Object.assign(t.elements.popper.style, r.popper), t.styles = r, t.elements.arrow && Object.assign(t.elements.arrow.style, r.arrow), function() {
|
|
803
823
|
Object.keys(t.elements).forEach(function(n) {
|
|
804
|
-
var a = t.elements[n],
|
|
805
|
-
return
|
|
824
|
+
var a = t.elements[n], o = t.attributes[n] || {}, s = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : r[n]), i = s.reduce(function(l, d) {
|
|
825
|
+
return l[d] = "", l;
|
|
806
826
|
}, {});
|
|
807
|
-
!
|
|
808
|
-
a.removeAttribute(
|
|
827
|
+
!ce(a) || !ve(a) || (Object.assign(a.style, i), Object.keys(o).forEach(function(l) {
|
|
828
|
+
a.removeAttribute(l);
|
|
809
829
|
}));
|
|
810
830
|
});
|
|
811
831
|
};
|
|
@@ -833,17 +853,17 @@ function er() {
|
|
|
833
853
|
}
|
|
834
854
|
function Pe(e, t, r) {
|
|
835
855
|
t === void 0 && (t = !1), r === void 0 && (r = !1);
|
|
836
|
-
var n = e.getBoundingClientRect(), a = 1,
|
|
837
|
-
t &&
|
|
838
|
-
var
|
|
856
|
+
var n = e.getBoundingClientRect(), a = 1, o = 1;
|
|
857
|
+
t && ce(e) && (a = e.offsetWidth > 0 && Ce(n.width) / e.offsetWidth || 1, o = e.offsetHeight > 0 && Ce(n.height) / e.offsetHeight || 1);
|
|
858
|
+
var s = ke(e) ? ie(e) : window, i = s.visualViewport, l = !er() && r, d = (n.left + (l && i ? i.offsetLeft : 0)) / a, c = (n.top + (l && i ? i.offsetTop : 0)) / o, O = n.width / a, P = n.height / o;
|
|
839
859
|
return {
|
|
840
|
-
width:
|
|
841
|
-
height:
|
|
860
|
+
width: O,
|
|
861
|
+
height: P,
|
|
842
862
|
top: c,
|
|
843
|
-
right:
|
|
844
|
-
bottom: c +
|
|
845
|
-
left:
|
|
846
|
-
x:
|
|
863
|
+
right: d + O,
|
|
864
|
+
bottom: c + P,
|
|
865
|
+
left: d,
|
|
866
|
+
x: d,
|
|
847
867
|
y: c
|
|
848
868
|
};
|
|
849
869
|
}
|
|
@@ -871,13 +891,13 @@ function tr(e, t) {
|
|
|
871
891
|
return !1;
|
|
872
892
|
}
|
|
873
893
|
function ge(e) {
|
|
874
|
-
return
|
|
894
|
+
return ie(e).getComputedStyle(e);
|
|
875
895
|
}
|
|
876
896
|
function fn(e) {
|
|
877
897
|
return ["table", "td", "th"].indexOf(ve(e)) >= 0;
|
|
878
898
|
}
|
|
879
899
|
function be(e) {
|
|
880
|
-
return ((
|
|
900
|
+
return ((ke(e) ? e.ownerDocument : (
|
|
881
901
|
// $FlowFixMe[prop-missing]
|
|
882
902
|
e.document
|
|
883
903
|
)) || window.document).documentElement;
|
|
@@ -894,29 +914,29 @@ function tt(e) {
|
|
|
894
914
|
be(e)
|
|
895
915
|
);
|
|
896
916
|
}
|
|
897
|
-
function
|
|
898
|
-
return !
|
|
917
|
+
function Bt(e) {
|
|
918
|
+
return !ce(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
899
919
|
ge(e).position === "fixed" ? null : e.offsetParent;
|
|
900
920
|
}
|
|
901
921
|
function pn(e) {
|
|
902
922
|
var t = /firefox/i.test(ut()), r = /Trident/i.test(ut());
|
|
903
|
-
if (r &&
|
|
923
|
+
if (r && ce(e)) {
|
|
904
924
|
var n = ge(e);
|
|
905
925
|
if (n.position === "fixed")
|
|
906
926
|
return null;
|
|
907
927
|
}
|
|
908
928
|
var a = tt(e);
|
|
909
|
-
for (ht(a) && (a = a.host);
|
|
910
|
-
var
|
|
911
|
-
if (
|
|
929
|
+
for (ht(a) && (a = a.host); ce(a) && ["html", "body"].indexOf(ve(a)) < 0; ) {
|
|
930
|
+
var o = ge(a);
|
|
931
|
+
if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || t && o.willChange === "filter" || t && o.filter && o.filter !== "none")
|
|
912
932
|
return a;
|
|
913
933
|
a = a.parentNode;
|
|
914
934
|
}
|
|
915
935
|
return null;
|
|
916
936
|
}
|
|
917
937
|
function Fe(e) {
|
|
918
|
-
for (var t =
|
|
919
|
-
r =
|
|
938
|
+
for (var t = ie(e), r = Bt(e); r && fn(r) && ge(r).position === "static"; )
|
|
939
|
+
r = Bt(r);
|
|
920
940
|
return r && (ve(r) === "html" || ve(r) === "body" && ge(r).position === "static") ? t : r || pn(e) || t;
|
|
921
941
|
}
|
|
922
942
|
function yt(e) {
|
|
@@ -951,10 +971,10 @@ var mn = function(t, r) {
|
|
|
951
971
|
})) : t, nr(typeof t != "number" ? t : ar(t, Ie));
|
|
952
972
|
};
|
|
953
973
|
function gn(e) {
|
|
954
|
-
var t, r = e.state, n = e.name, a = e.options,
|
|
955
|
-
if (!(!
|
|
956
|
-
var
|
|
957
|
-
r.modifiersData[n] = (t = {}, t[A] = C, t.centerOffset = C -
|
|
974
|
+
var t, r = e.state, n = e.name, a = e.options, o = r.elements.arrow, s = r.modifiersData.popperOffsets, i = pe(r.placement), l = yt(i), d = [ae, de].indexOf(i) >= 0, c = d ? "height" : "width";
|
|
975
|
+
if (!(!o || !s)) {
|
|
976
|
+
var O = mn(a.padding, r), P = bt(o), m = l === "y" ? ne : ae, b = l === "y" ? ue : de, $ = r.rects.reference[c] + r.rects.reference[l] - s[l] - r.rects.popper[c], T = s[l] - r.rects.reference[l], E = Fe(o), D = E ? l === "y" ? E.clientHeight || 0 : E.clientWidth || 0 : 0, L = $ / 2 - T / 2, w = O[m], S = D - P[c] - O[b], f = D / 2 - P[c] / 2 + L, C = ze(w, f, S), A = l;
|
|
977
|
+
r.modifiersData[n] = (t = {}, t[A] = C, t.centerOffset = C - f, t);
|
|
958
978
|
}
|
|
959
979
|
}
|
|
960
980
|
function hn(e) {
|
|
@@ -986,52 +1006,52 @@ function xn(e, t) {
|
|
|
986
1006
|
y: Ce(n * a) / a || 0
|
|
987
1007
|
};
|
|
988
1008
|
}
|
|
989
|
-
function
|
|
990
|
-
var t, r = e.popper, n = e.popperRect, a = e.placement,
|
|
1009
|
+
function Rt(e) {
|
|
1010
|
+
var t, r = e.popper, n = e.popperRect, a = e.placement, o = e.variation, s = e.offsets, i = e.position, l = e.gpuAcceleration, d = e.adaptive, c = e.roundOffsets, O = e.isFixed, P = s.x, m = P === void 0 ? 0 : P, b = s.y, $ = b === void 0 ? 0 : b, T = typeof c == "function" ? c({
|
|
991
1011
|
x: m,
|
|
992
|
-
y:
|
|
1012
|
+
y: $
|
|
993
1013
|
}) : {
|
|
994
1014
|
x: m,
|
|
995
|
-
y:
|
|
1015
|
+
y: $
|
|
996
1016
|
};
|
|
997
|
-
m = T.x,
|
|
998
|
-
var E =
|
|
999
|
-
if (
|
|
1000
|
-
var
|
|
1001
|
-
if (
|
|
1002
|
-
w =
|
|
1003
|
-
var
|
|
1017
|
+
m = T.x, $ = T.y;
|
|
1018
|
+
var E = s.hasOwnProperty("x"), D = s.hasOwnProperty("y"), L = ae, w = ne, S = window;
|
|
1019
|
+
if (d) {
|
|
1020
|
+
var f = Fe(r), C = "clientHeight", A = "clientWidth";
|
|
1021
|
+
if (f === ie(r) && (f = be(r), ge(f).position !== "static" && i === "absolute" && (C = "scrollHeight", A = "scrollWidth")), f = f, a === ne || (a === ae || a === de) && o === Ne) {
|
|
1022
|
+
w = ue;
|
|
1023
|
+
var W = O && f === S && S.visualViewport ? S.visualViewport.height : (
|
|
1004
1024
|
// $FlowFixMe[prop-missing]
|
|
1005
|
-
|
|
1025
|
+
f[C]
|
|
1006
1026
|
);
|
|
1007
|
-
|
|
1027
|
+
$ -= W - n.height, $ *= l ? 1 : -1;
|
|
1008
1028
|
}
|
|
1009
|
-
if (a ===
|
|
1010
|
-
|
|
1011
|
-
var
|
|
1029
|
+
if (a === ae || (a === ne || a === ue) && o === Ne) {
|
|
1030
|
+
L = de;
|
|
1031
|
+
var j = O && f === S && S.visualViewport ? S.visualViewport.width : (
|
|
1012
1032
|
// $FlowFixMe[prop-missing]
|
|
1013
|
-
|
|
1033
|
+
f[A]
|
|
1014
1034
|
);
|
|
1015
|
-
m -=
|
|
1035
|
+
m -= j - n.width, m *= l ? 1 : -1;
|
|
1016
1036
|
}
|
|
1017
1037
|
}
|
|
1018
|
-
var
|
|
1019
|
-
position:
|
|
1020
|
-
},
|
|
1038
|
+
var y = Object.assign({
|
|
1039
|
+
position: i
|
|
1040
|
+
}, d && yn), z = c === !0 ? xn({
|
|
1021
1041
|
x: m,
|
|
1022
|
-
y:
|
|
1023
|
-
},
|
|
1042
|
+
y: $
|
|
1043
|
+
}, ie(r)) : {
|
|
1024
1044
|
x: m,
|
|
1025
|
-
y:
|
|
1045
|
+
y: $
|
|
1026
1046
|
};
|
|
1027
|
-
if (m =
|
|
1028
|
-
var
|
|
1029
|
-
return Object.assign({},
|
|
1047
|
+
if (m = z.x, $ = z.y, l) {
|
|
1048
|
+
var M;
|
|
1049
|
+
return Object.assign({}, y, (M = {}, M[w] = D ? "0" : "", M[L] = E ? "0" : "", M.transform = (S.devicePixelRatio || 1) <= 1 ? "translate(" + m + "px, " + $ + "px)" : "translate3d(" + m + "px, " + $ + "px, 0)", M));
|
|
1030
1050
|
}
|
|
1031
|
-
return Object.assign({},
|
|
1051
|
+
return Object.assign({}, y, (t = {}, t[w] = D ? $ + "px" : "", t[L] = E ? m + "px" : "", t.transform = "", t));
|
|
1032
1052
|
}
|
|
1033
1053
|
function wn(e) {
|
|
1034
|
-
var t = e.state, r = e.options, n = r.gpuAcceleration, a = n === void 0 ? !0 : n,
|
|
1054
|
+
var t = e.state, r = e.options, n = r.gpuAcceleration, a = n === void 0 ? !0 : n, o = r.adaptive, s = o === void 0 ? !0 : o, i = r.roundOffsets, l = i === void 0 ? !0 : i, d = {
|
|
1035
1055
|
placement: pe(t.placement),
|
|
1036
1056
|
variation: Ee(t.placement),
|
|
1037
1057
|
popper: t.elements.popper,
|
|
@@ -1039,16 +1059,16 @@ function wn(e) {
|
|
|
1039
1059
|
gpuAcceleration: a,
|
|
1040
1060
|
isFixed: t.options.strategy === "fixed"
|
|
1041
1061
|
};
|
|
1042
|
-
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper,
|
|
1062
|
+
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Rt(Object.assign({}, d, {
|
|
1043
1063
|
offsets: t.modifiersData.popperOffsets,
|
|
1044
1064
|
position: t.options.strategy,
|
|
1045
|
-
adaptive:
|
|
1046
|
-
roundOffsets:
|
|
1047
|
-
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow,
|
|
1065
|
+
adaptive: s,
|
|
1066
|
+
roundOffsets: l
|
|
1067
|
+
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Rt(Object.assign({}, d, {
|
|
1048
1068
|
offsets: t.modifiersData.arrow,
|
|
1049
1069
|
position: "absolute",
|
|
1050
1070
|
adaptive: !1,
|
|
1051
|
-
roundOffsets:
|
|
1071
|
+
roundOffsets: l
|
|
1052
1072
|
})))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
|
1053
1073
|
"data-popper-placement": t.placement
|
|
1054
1074
|
});
|
|
@@ -1063,23 +1083,23 @@ const On = {
|
|
|
1063
1083
|
var Ue = {
|
|
1064
1084
|
passive: !0
|
|
1065
1085
|
};
|
|
1066
|
-
function
|
|
1067
|
-
var t = e.state, r = e.instance, n = e.options, a = n.scroll,
|
|
1068
|
-
return
|
|
1086
|
+
function $n(e) {
|
|
1087
|
+
var t = e.state, r = e.instance, n = e.options, a = n.scroll, o = a === void 0 ? !0 : a, s = n.resize, i = s === void 0 ? !0 : s, l = ie(t.elements.popper), d = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
1088
|
+
return o && d.forEach(function(c) {
|
|
1069
1089
|
c.addEventListener("scroll", r.update, Ue);
|
|
1070
|
-
}),
|
|
1071
|
-
|
|
1090
|
+
}), i && l.addEventListener("resize", r.update, Ue), function() {
|
|
1091
|
+
o && d.forEach(function(c) {
|
|
1072
1092
|
c.removeEventListener("scroll", r.update, Ue);
|
|
1073
|
-
}),
|
|
1093
|
+
}), i && l.removeEventListener("resize", r.update, Ue);
|
|
1074
1094
|
};
|
|
1075
1095
|
}
|
|
1076
|
-
const
|
|
1096
|
+
const kn = {
|
|
1077
1097
|
name: "eventListeners",
|
|
1078
1098
|
enabled: !0,
|
|
1079
1099
|
phase: "write",
|
|
1080
1100
|
fn: function() {
|
|
1081
1101
|
},
|
|
1082
|
-
effect:
|
|
1102
|
+
effect: $n,
|
|
1083
1103
|
data: {}
|
|
1084
1104
|
};
|
|
1085
1105
|
var Tn = {
|
|
@@ -1103,7 +1123,7 @@ function At(e) {
|
|
|
1103
1123
|
});
|
|
1104
1124
|
}
|
|
1105
1125
|
function xt(e) {
|
|
1106
|
-
var t =
|
|
1126
|
+
var t = ie(e), r = t.pageXOffset, n = t.pageYOffset;
|
|
1107
1127
|
return {
|
|
1108
1128
|
scrollLeft: r,
|
|
1109
1129
|
scrollTop: n
|
|
@@ -1113,26 +1133,26 @@ function wt(e) {
|
|
|
1113
1133
|
return Pe(be(e)).left + xt(e).scrollLeft;
|
|
1114
1134
|
}
|
|
1115
1135
|
function Cn(e, t) {
|
|
1116
|
-
var r =
|
|
1136
|
+
var r = ie(e), n = be(e), a = r.visualViewport, o = n.clientWidth, s = n.clientHeight, i = 0, l = 0;
|
|
1117
1137
|
if (a) {
|
|
1118
|
-
|
|
1119
|
-
var
|
|
1120
|
-
(
|
|
1138
|
+
o = a.width, s = a.height;
|
|
1139
|
+
var d = er();
|
|
1140
|
+
(d || !d && t === "fixed") && (i = a.offsetLeft, l = a.offsetTop);
|
|
1121
1141
|
}
|
|
1122
1142
|
return {
|
|
1123
|
-
width:
|
|
1124
|
-
height:
|
|
1125
|
-
x:
|
|
1126
|
-
y:
|
|
1143
|
+
width: o,
|
|
1144
|
+
height: s,
|
|
1145
|
+
x: i + wt(e),
|
|
1146
|
+
y: l
|
|
1127
1147
|
};
|
|
1128
1148
|
}
|
|
1129
1149
|
function Pn(e) {
|
|
1130
|
-
var t, r = be(e), n = xt(e), a = (t = e.ownerDocument) == null ? void 0 : t.body,
|
|
1131
|
-
return ge(a || r).direction === "rtl" && (
|
|
1132
|
-
width:
|
|
1133
|
-
height:
|
|
1134
|
-
x:
|
|
1135
|
-
y:
|
|
1150
|
+
var t, r = be(e), n = xt(e), a = (t = e.ownerDocument) == null ? void 0 : t.body, o = Oe(r.scrollWidth, r.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), s = Oe(r.scrollHeight, r.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), i = -n.scrollLeft + wt(e), l = -n.scrollTop;
|
|
1151
|
+
return ge(a || r).direction === "rtl" && (i += Oe(r.clientWidth, a ? a.clientWidth : 0) - o), {
|
|
1152
|
+
width: o,
|
|
1153
|
+
height: s,
|
|
1154
|
+
x: i,
|
|
1155
|
+
y: l
|
|
1136
1156
|
};
|
|
1137
1157
|
}
|
|
1138
1158
|
function Ot(e) {
|
|
@@ -1140,15 +1160,15 @@ function Ot(e) {
|
|
|
1140
1160
|
return /auto|scroll|overlay|hidden/.test(r + a + n);
|
|
1141
1161
|
}
|
|
1142
1162
|
function ir(e) {
|
|
1143
|
-
return ["html", "body", "#document"].indexOf(ve(e)) >= 0 ? e.ownerDocument.body :
|
|
1163
|
+
return ["html", "body", "#document"].indexOf(ve(e)) >= 0 ? e.ownerDocument.body : ce(e) && Ot(e) ? e : ir(tt(e));
|
|
1144
1164
|
}
|
|
1145
1165
|
function We(e, t) {
|
|
1146
1166
|
var r;
|
|
1147
1167
|
t === void 0 && (t = []);
|
|
1148
|
-
var n = ir(e), a = n === ((r = e.ownerDocument) == null ? void 0 : r.body),
|
|
1149
|
-
return a ?
|
|
1168
|
+
var n = ir(e), a = n === ((r = e.ownerDocument) == null ? void 0 : r.body), o = ie(n), s = a ? [o].concat(o.visualViewport || [], Ot(n) ? n : []) : n, i = t.concat(s);
|
|
1169
|
+
return a ? i : (
|
|
1150
1170
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
1151
|
-
|
|
1171
|
+
i.concat(We(tt(s)))
|
|
1152
1172
|
);
|
|
1153
1173
|
}
|
|
1154
1174
|
function dt(e) {
|
|
@@ -1164,110 +1184,110 @@ function En(e, t) {
|
|
|
1164
1184
|
return r.top = r.top + e.clientTop, r.left = r.left + e.clientLeft, r.bottom = r.top + e.clientHeight, r.right = r.left + e.clientWidth, r.width = e.clientWidth, r.height = e.clientHeight, r.x = r.left, r.y = r.top, r;
|
|
1165
1185
|
}
|
|
1166
1186
|
function zt(e, t, r) {
|
|
1167
|
-
return t === Zt ? dt(Cn(e, r)) :
|
|
1187
|
+
return t === Zt ? dt(Cn(e, r)) : ke(t) ? En(t, r) : dt(Pn(be(e)));
|
|
1168
1188
|
}
|
|
1169
1189
|
function Vn(e) {
|
|
1170
|
-
var t = We(tt(e)), r = ["absolute", "fixed"].indexOf(ge(e).position) >= 0, n = r &&
|
|
1171
|
-
return
|
|
1172
|
-
return
|
|
1190
|
+
var t = We(tt(e)), r = ["absolute", "fixed"].indexOf(ge(e).position) >= 0, n = r && ce(e) ? Fe(e) : e;
|
|
1191
|
+
return ke(n) ? t.filter(function(a) {
|
|
1192
|
+
return ke(a) && tr(a, n) && ve(a) !== "body";
|
|
1173
1193
|
}) : [];
|
|
1174
1194
|
}
|
|
1175
|
-
function
|
|
1176
|
-
var a = t === "clippingParents" ? Vn(e) : [].concat(t),
|
|
1177
|
-
var c = zt(e,
|
|
1178
|
-
return
|
|
1179
|
-
}, zt(e,
|
|
1180
|
-
return
|
|
1195
|
+
function Dn(e, t, r, n) {
|
|
1196
|
+
var a = t === "clippingParents" ? Vn(e) : [].concat(t), o = [].concat(a, [r]), s = o[0], i = o.reduce(function(l, d) {
|
|
1197
|
+
var c = zt(e, d, n);
|
|
1198
|
+
return l.top = Oe(c.top, l.top), l.right = Ge(c.right, l.right), l.bottom = Ge(c.bottom, l.bottom), l.left = Oe(c.left, l.left), l;
|
|
1199
|
+
}, zt(e, s, n));
|
|
1200
|
+
return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i;
|
|
1181
1201
|
}
|
|
1182
1202
|
function or(e) {
|
|
1183
|
-
var t = e.reference, r = e.element, n = e.placement, a = n ? pe(n) : null,
|
|
1203
|
+
var t = e.reference, r = e.element, n = e.placement, a = n ? pe(n) : null, o = n ? Ee(n) : null, s = t.x + t.width / 2 - r.width / 2, i = t.y + t.height / 2 - r.height / 2, l;
|
|
1184
1204
|
switch (a) {
|
|
1185
|
-
case
|
|
1186
|
-
|
|
1187
|
-
x:
|
|
1205
|
+
case ne:
|
|
1206
|
+
l = {
|
|
1207
|
+
x: s,
|
|
1188
1208
|
y: t.y - r.height
|
|
1189
1209
|
};
|
|
1190
1210
|
break;
|
|
1191
|
-
case
|
|
1192
|
-
|
|
1193
|
-
x:
|
|
1211
|
+
case ue:
|
|
1212
|
+
l = {
|
|
1213
|
+
x: s,
|
|
1194
1214
|
y: t.y + t.height
|
|
1195
1215
|
};
|
|
1196
1216
|
break;
|
|
1197
|
-
case
|
|
1198
|
-
|
|
1217
|
+
case de:
|
|
1218
|
+
l = {
|
|
1199
1219
|
x: t.x + t.width,
|
|
1200
|
-
y:
|
|
1220
|
+
y: i
|
|
1201
1221
|
};
|
|
1202
1222
|
break;
|
|
1203
|
-
case
|
|
1204
|
-
|
|
1223
|
+
case ae:
|
|
1224
|
+
l = {
|
|
1205
1225
|
x: t.x - r.width,
|
|
1206
|
-
y:
|
|
1226
|
+
y: i
|
|
1207
1227
|
};
|
|
1208
1228
|
break;
|
|
1209
1229
|
default:
|
|
1210
|
-
|
|
1230
|
+
l = {
|
|
1211
1231
|
x: t.x,
|
|
1212
1232
|
y: t.y
|
|
1213
1233
|
};
|
|
1214
1234
|
}
|
|
1215
|
-
var
|
|
1216
|
-
if (
|
|
1217
|
-
var c =
|
|
1218
|
-
switch (
|
|
1235
|
+
var d = a ? yt(a) : null;
|
|
1236
|
+
if (d != null) {
|
|
1237
|
+
var c = d === "y" ? "height" : "width";
|
|
1238
|
+
switch (o) {
|
|
1219
1239
|
case Se:
|
|
1220
|
-
|
|
1240
|
+
l[d] = l[d] - (t[c] / 2 - r[c] / 2);
|
|
1221
1241
|
break;
|
|
1222
1242
|
case Ne:
|
|
1223
|
-
|
|
1243
|
+
l[d] = l[d] + (t[c] / 2 - r[c] / 2);
|
|
1224
1244
|
break;
|
|
1225
1245
|
}
|
|
1226
1246
|
}
|
|
1227
|
-
return
|
|
1247
|
+
return l;
|
|
1228
1248
|
}
|
|
1229
1249
|
function _e(e, t) {
|
|
1230
1250
|
t === void 0 && (t = {});
|
|
1231
|
-
var r = t, n = r.placement, a = n === void 0 ? e.placement : n,
|
|
1232
|
-
reference:
|
|
1233
|
-
element:
|
|
1251
|
+
var r = t, n = r.placement, a = n === void 0 ? e.placement : n, o = r.strategy, s = o === void 0 ? e.strategy : o, i = r.boundary, l = i === void 0 ? Qr : i, d = r.rootBoundary, c = d === void 0 ? Zt : d, O = r.elementContext, P = O === void 0 ? Re : O, m = r.altBoundary, b = m === void 0 ? !1 : m, $ = r.padding, T = $ === void 0 ? 0 : $, E = nr(typeof T != "number" ? T : ar(T, Ie)), D = P === Re ? Gr : Re, L = e.rects.popper, w = e.elements[b ? D : P], S = Dn(ke(w) ? w : w.contextElement || be(e.elements.popper), l, c, s), f = Pe(e.elements.reference), C = or({
|
|
1252
|
+
reference: f,
|
|
1253
|
+
element: L,
|
|
1234
1254
|
placement: a
|
|
1235
|
-
}), A = dt(Object.assign({},
|
|
1236
|
-
top: S.top -
|
|
1237
|
-
bottom:
|
|
1238
|
-
left: S.left -
|
|
1239
|
-
right:
|
|
1240
|
-
},
|
|
1241
|
-
if (
|
|
1242
|
-
var
|
|
1243
|
-
Object.keys(
|
|
1244
|
-
var
|
|
1245
|
-
|
|
1255
|
+
}), A = dt(Object.assign({}, L, C)), W = P === Re ? A : f, j = {
|
|
1256
|
+
top: S.top - W.top + E.top,
|
|
1257
|
+
bottom: W.bottom - S.bottom + E.bottom,
|
|
1258
|
+
left: S.left - W.left + E.left,
|
|
1259
|
+
right: W.right - S.right + E.right
|
|
1260
|
+
}, y = e.modifiersData.offset;
|
|
1261
|
+
if (P === Re && y) {
|
|
1262
|
+
var z = y[a];
|
|
1263
|
+
Object.keys(j).forEach(function(M) {
|
|
1264
|
+
var X = [de, ue].indexOf(M) >= 0 ? 1 : -1, Q = [ne, ue].indexOf(M) >= 0 ? "y" : "x";
|
|
1265
|
+
j[M] += z[Q] * X;
|
|
1246
1266
|
});
|
|
1247
1267
|
}
|
|
1248
|
-
return
|
|
1268
|
+
return j;
|
|
1249
1269
|
}
|
|
1250
|
-
function
|
|
1270
|
+
function Bn(e, t) {
|
|
1251
1271
|
t === void 0 && (t = {});
|
|
1252
|
-
var r = t, n = r.placement, a = r.boundary,
|
|
1253
|
-
return Ee(
|
|
1254
|
-
}) : Ie,
|
|
1255
|
-
return
|
|
1272
|
+
var r = t, n = r.placement, a = r.boundary, o = r.rootBoundary, s = r.padding, i = r.flipVariations, l = r.allowedAutoPlacements, d = l === void 0 ? Jt : l, c = Ee(n), O = c ? i ? Dt : Dt.filter(function(b) {
|
|
1273
|
+
return Ee(b) === c;
|
|
1274
|
+
}) : Ie, P = O.filter(function(b) {
|
|
1275
|
+
return d.indexOf(b) >= 0;
|
|
1256
1276
|
});
|
|
1257
|
-
|
|
1258
|
-
var m =
|
|
1259
|
-
return
|
|
1260
|
-
placement:
|
|
1277
|
+
P.length === 0 && (P = O);
|
|
1278
|
+
var m = P.reduce(function(b, $) {
|
|
1279
|
+
return b[$] = _e(e, {
|
|
1280
|
+
placement: $,
|
|
1261
1281
|
boundary: a,
|
|
1262
|
-
rootBoundary:
|
|
1263
|
-
padding:
|
|
1264
|
-
})[pe(
|
|
1282
|
+
rootBoundary: o,
|
|
1283
|
+
padding: s
|
|
1284
|
+
})[pe($)], b;
|
|
1265
1285
|
}, {});
|
|
1266
|
-
return Object.keys(m).sort(function(
|
|
1267
|
-
return m[
|
|
1286
|
+
return Object.keys(m).sort(function(b, $) {
|
|
1287
|
+
return m[b] - m[$];
|
|
1268
1288
|
});
|
|
1269
1289
|
}
|
|
1270
|
-
function
|
|
1290
|
+
function Rn(e) {
|
|
1271
1291
|
if (pe(e) === gt)
|
|
1272
1292
|
return [];
|
|
1273
1293
|
var t = Xe(e);
|
|
@@ -1276,49 +1296,49 @@ function Dn(e) {
|
|
|
1276
1296
|
function An(e) {
|
|
1277
1297
|
var t = e.state, r = e.options, n = e.name;
|
|
1278
1298
|
if (!t.modifiersData[n]._skip) {
|
|
1279
|
-
for (var a = r.mainAxis,
|
|
1280
|
-
return he.concat(pe(fe) === gt ?
|
|
1299
|
+
for (var a = r.mainAxis, o = a === void 0 ? !0 : a, s = r.altAxis, i = s === void 0 ? !0 : s, l = r.fallbackPlacements, d = r.padding, c = r.boundary, O = r.rootBoundary, P = r.altBoundary, m = r.flipVariations, b = m === void 0 ? !0 : m, $ = r.allowedAutoPlacements, T = t.options.placement, E = pe(T), D = E === T, L = l || (D || !b ? [Xe(T)] : Rn(T)), w = [T].concat(L).reduce(function(he, fe) {
|
|
1300
|
+
return he.concat(pe(fe) === gt ? Bn(t, {
|
|
1281
1301
|
placement: fe,
|
|
1282
1302
|
boundary: c,
|
|
1283
|
-
rootBoundary:
|
|
1284
|
-
padding:
|
|
1285
|
-
flipVariations:
|
|
1286
|
-
allowedAutoPlacements:
|
|
1303
|
+
rootBoundary: O,
|
|
1304
|
+
padding: d,
|
|
1305
|
+
flipVariations: b,
|
|
1306
|
+
allowedAutoPlacements: $
|
|
1287
1307
|
}) : fe);
|
|
1288
|
-
}, []), S = t.rects.reference,
|
|
1289
|
-
var
|
|
1290
|
-
placement:
|
|
1308
|
+
}, []), S = t.rects.reference, f = t.rects.popper, C = /* @__PURE__ */ new Map(), A = !0, W = w[0], j = 0; j < w.length; j++) {
|
|
1309
|
+
var y = w[j], z = pe(y), M = Ee(y) === Se, X = [ne, ue].indexOf(z) >= 0, Q = X ? "width" : "height", u = _e(t, {
|
|
1310
|
+
placement: y,
|
|
1291
1311
|
boundary: c,
|
|
1292
|
-
rootBoundary:
|
|
1293
|
-
altBoundary:
|
|
1294
|
-
padding:
|
|
1295
|
-
}),
|
|
1296
|
-
S[
|
|
1297
|
-
var
|
|
1298
|
-
if (
|
|
1312
|
+
rootBoundary: O,
|
|
1313
|
+
altBoundary: P,
|
|
1314
|
+
padding: d
|
|
1315
|
+
}), v = X ? M ? de : ae : M ? ue : ne;
|
|
1316
|
+
S[Q] > f[Q] && (v = Xe(v));
|
|
1317
|
+
var V = Xe(v), I = [];
|
|
1318
|
+
if (o && I.push(u[z] <= 0), i && I.push(u[v] <= 0, u[V] <= 0), I.every(function(he) {
|
|
1299
1319
|
return he;
|
|
1300
1320
|
})) {
|
|
1301
|
-
|
|
1321
|
+
W = y, A = !1;
|
|
1302
1322
|
break;
|
|
1303
1323
|
}
|
|
1304
|
-
C.set(
|
|
1324
|
+
C.set(y, I);
|
|
1305
1325
|
}
|
|
1306
1326
|
if (A)
|
|
1307
|
-
for (var
|
|
1327
|
+
for (var g = b ? 3 : 1, F = function(fe) {
|
|
1308
1328
|
var ye = w.find(function(Te) {
|
|
1309
1329
|
var me = C.get(Te);
|
|
1310
1330
|
if (me)
|
|
1311
|
-
return me.slice(0, fe).every(function(
|
|
1312
|
-
return
|
|
1331
|
+
return me.slice(0, fe).every(function(De) {
|
|
1332
|
+
return De;
|
|
1313
1333
|
});
|
|
1314
1334
|
});
|
|
1315
1335
|
if (ye)
|
|
1316
|
-
return
|
|
1317
|
-
},
|
|
1318
|
-
var
|
|
1319
|
-
if (
|
|
1336
|
+
return W = ye, "break";
|
|
1337
|
+
}, U = g; U > 0; U--) {
|
|
1338
|
+
var G = F(U);
|
|
1339
|
+
if (G === "break") break;
|
|
1320
1340
|
}
|
|
1321
|
-
t.placement !==
|
|
1341
|
+
t.placement !== W && (t.modifiersData[n]._skip = !0, t.placement = W, t.reset = !0);
|
|
1322
1342
|
}
|
|
1323
1343
|
}
|
|
1324
1344
|
const zn = {
|
|
@@ -1343,24 +1363,24 @@ function Wt(e, t, r) {
|
|
|
1343
1363
|
};
|
|
1344
1364
|
}
|
|
1345
1365
|
function Mt(e) {
|
|
1346
|
-
return [
|
|
1366
|
+
return [ne, de, ue, ae].some(function(t) {
|
|
1347
1367
|
return e[t] >= 0;
|
|
1348
1368
|
});
|
|
1349
1369
|
}
|
|
1350
1370
|
function Wn(e) {
|
|
1351
|
-
var t = e.state, r = e.name, n = t.rects.reference, a = t.rects.popper,
|
|
1371
|
+
var t = e.state, r = e.name, n = t.rects.reference, a = t.rects.popper, o = t.modifiersData.preventOverflow, s = _e(t, {
|
|
1352
1372
|
elementContext: "reference"
|
|
1353
|
-
}),
|
|
1373
|
+
}), i = _e(t, {
|
|
1354
1374
|
altBoundary: !0
|
|
1355
|
-
}),
|
|
1375
|
+
}), l = Wt(s, n), d = Wt(i, a, o), c = Mt(l), O = Mt(d);
|
|
1356
1376
|
t.modifiersData[r] = {
|
|
1357
|
-
referenceClippingOffsets:
|
|
1358
|
-
popperEscapeOffsets:
|
|
1377
|
+
referenceClippingOffsets: l,
|
|
1378
|
+
popperEscapeOffsets: d,
|
|
1359
1379
|
isReferenceHidden: c,
|
|
1360
|
-
hasPopperEscaped:
|
|
1380
|
+
hasPopperEscaped: O
|
|
1361
1381
|
}, t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
|
1362
1382
|
"data-popper-reference-hidden": c,
|
|
1363
|
-
"data-popper-escaped":
|
|
1383
|
+
"data-popper-escaped": O
|
|
1364
1384
|
});
|
|
1365
1385
|
}
|
|
1366
1386
|
const Mn = {
|
|
@@ -1371,22 +1391,22 @@ const Mn = {
|
|
|
1371
1391
|
fn: Wn
|
|
1372
1392
|
};
|
|
1373
1393
|
function Ln(e, t, r) {
|
|
1374
|
-
var n = pe(e), a = [
|
|
1394
|
+
var n = pe(e), a = [ae, ne].indexOf(n) >= 0 ? -1 : 1, o = typeof r == "function" ? r(Object.assign({}, t, {
|
|
1375
1395
|
placement: e
|
|
1376
|
-
})) : r,
|
|
1377
|
-
return
|
|
1378
|
-
x:
|
|
1379
|
-
y:
|
|
1396
|
+
})) : r, s = o[0], i = o[1];
|
|
1397
|
+
return s = s || 0, i = (i || 0) * a, [ae, de].indexOf(n) >= 0 ? {
|
|
1398
|
+
x: i,
|
|
1399
|
+
y: s
|
|
1380
1400
|
} : {
|
|
1381
|
-
x:
|
|
1382
|
-
y:
|
|
1401
|
+
x: s,
|
|
1402
|
+
y: i
|
|
1383
1403
|
};
|
|
1384
1404
|
}
|
|
1385
1405
|
function jn(e) {
|
|
1386
|
-
var t = e.state, r = e.options, n = e.name, a = r.offset,
|
|
1387
|
-
return c[
|
|
1388
|
-
}, {}),
|
|
1389
|
-
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x +=
|
|
1406
|
+
var t = e.state, r = e.options, n = e.name, a = r.offset, o = a === void 0 ? [0, 0] : a, s = Jt.reduce(function(c, O) {
|
|
1407
|
+
return c[O] = Ln(O, t.rects, o), c;
|
|
1408
|
+
}, {}), i = s[t.placement], l = i.x, d = i.y;
|
|
1409
|
+
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += d), t.modifiersData[n] = s;
|
|
1390
1410
|
}
|
|
1391
1411
|
const Nn = {
|
|
1392
1412
|
name: "offset",
|
|
@@ -1414,36 +1434,36 @@ function Fn(e) {
|
|
|
1414
1434
|
return e === "x" ? "y" : "x";
|
|
1415
1435
|
}
|
|
1416
1436
|
function Hn(e) {
|
|
1417
|
-
var t = e.state, r = e.options, n = e.name, a = r.mainAxis,
|
|
1418
|
-
boundary:
|
|
1419
|
-
rootBoundary:
|
|
1420
|
-
padding:
|
|
1437
|
+
var t = e.state, r = e.options, n = e.name, a = r.mainAxis, o = a === void 0 ? !0 : a, s = r.altAxis, i = s === void 0 ? !1 : s, l = r.boundary, d = r.rootBoundary, c = r.altBoundary, O = r.padding, P = r.tether, m = P === void 0 ? !0 : P, b = r.tetherOffset, $ = b === void 0 ? 0 : b, T = _e(t, {
|
|
1438
|
+
boundary: l,
|
|
1439
|
+
rootBoundary: d,
|
|
1440
|
+
padding: O,
|
|
1421
1441
|
altBoundary: c
|
|
1422
|
-
}), E = pe(t.placement), D = Ee(t.placement),
|
|
1442
|
+
}), E = pe(t.placement), D = Ee(t.placement), L = !D, w = yt(E), S = Fn(w), f = t.modifiersData.popperOffsets, C = t.rects.reference, A = t.rects.popper, W = typeof $ == "function" ? $(Object.assign({}, t.rects, {
|
|
1423
1443
|
placement: t.placement
|
|
1424
|
-
})) :
|
|
1425
|
-
mainAxis:
|
|
1426
|
-
altAxis:
|
|
1444
|
+
})) : $, j = typeof W == "number" ? {
|
|
1445
|
+
mainAxis: W,
|
|
1446
|
+
altAxis: W
|
|
1427
1447
|
} : Object.assign({
|
|
1428
1448
|
mainAxis: 0,
|
|
1429
1449
|
altAxis: 0
|
|
1430
|
-
},
|
|
1450
|
+
}, W), y = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, z = {
|
|
1431
1451
|
x: 0,
|
|
1432
1452
|
y: 0
|
|
1433
1453
|
};
|
|
1434
|
-
if (
|
|
1435
|
-
if (
|
|
1436
|
-
var
|
|
1454
|
+
if (f) {
|
|
1455
|
+
if (o) {
|
|
1456
|
+
var M, X = w === "y" ? ne : ae, Q = w === "y" ? ue : de, u = w === "y" ? "height" : "width", v = f[w], V = v + T[X], I = v - T[Q], g = m ? -A[u] / 2 : 0, F = D === Se ? C[u] : A[u], U = D === Se ? -A[u] : -C[u], G = t.elements.arrow, he = m && G ? bt(G) : {
|
|
1437
1457
|
width: 0,
|
|
1438
1458
|
height: 0
|
|
1439
|
-
}, fe = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : rr(), ye = fe[
|
|
1440
|
-
|
|
1459
|
+
}, fe = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : rr(), ye = fe[X], Te = fe[Q], me = ze(0, C[u], he[u]), De = L ? C[u] / 2 - g - me - ye - j.mainAxis : F - me - ye - j.mainAxis, He = L ? -C[u] / 2 + g + me + Te + j.mainAxis : U + me + Te + j.mainAxis, Be = t.elements.arrow && Fe(t.elements.arrow), rt = Be ? w === "y" ? Be.clientTop || 0 : Be.clientLeft || 0 : 0, p = (M = y?.[w]) != null ? M : 0, N = v + De - p - rt, B = v + He - p, oe = ze(m ? Ge(V, N) : V, v, m ? Oe(I, B) : I);
|
|
1460
|
+
f[w] = oe, z[w] = oe - v;
|
|
1441
1461
|
}
|
|
1442
|
-
if (
|
|
1443
|
-
var
|
|
1444
|
-
|
|
1462
|
+
if (i) {
|
|
1463
|
+
var J, nt = w === "x" ? ne : ae, $t = w === "x" ? ue : de, xe = f[S], qe = S === "y" ? "height" : "width", kt = xe + T[nt], Tt = xe - T[$t], at = [ne, ae].indexOf(E) !== -1, St = (J = y?.[S]) != null ? J : 0, Ct = at ? kt : xe - C[qe] - A[qe] - St + j.altAxis, Pt = at ? xe + C[qe] + A[qe] - St - j.altAxis : Tt, Et = m && at ? vn(Ct, xe, Pt) : ze(m ? Ct : kt, xe, m ? Pt : Tt);
|
|
1464
|
+
f[S] = Et, z[S] = Et - xe;
|
|
1445
1465
|
}
|
|
1446
|
-
t.modifiersData[n] =
|
|
1466
|
+
t.modifiersData[n] = z;
|
|
1447
1467
|
}
|
|
1448
1468
|
}
|
|
1449
1469
|
const qn = {
|
|
@@ -1460,7 +1480,7 @@ function Un(e) {
|
|
|
1460
1480
|
};
|
|
1461
1481
|
}
|
|
1462
1482
|
function Yn(e) {
|
|
1463
|
-
return e ===
|
|
1483
|
+
return e === ie(e) || !ce(e) ? xt(e) : Un(e);
|
|
1464
1484
|
}
|
|
1465
1485
|
function Xn(e) {
|
|
1466
1486
|
var t = e.getBoundingClientRect(), r = Ce(t.width) / e.offsetWidth || 1, n = Ce(t.height) / e.offsetHeight || 1;
|
|
@@ -1468,38 +1488,38 @@ function Xn(e) {
|
|
|
1468
1488
|
}
|
|
1469
1489
|
function Kn(e, t, r) {
|
|
1470
1490
|
r === void 0 && (r = !1);
|
|
1471
|
-
var n =
|
|
1491
|
+
var n = ce(t), a = ce(t) && Xn(t), o = be(t), s = Pe(e, a, r), i = {
|
|
1472
1492
|
scrollLeft: 0,
|
|
1473
1493
|
scrollTop: 0
|
|
1474
|
-
},
|
|
1494
|
+
}, l = {
|
|
1475
1495
|
x: 0,
|
|
1476
1496
|
y: 0
|
|
1477
1497
|
};
|
|
1478
1498
|
return (n || !n && !r) && ((ve(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
1479
|
-
Ot(
|
|
1480
|
-
x:
|
|
1481
|
-
y:
|
|
1482
|
-
width:
|
|
1483
|
-
height:
|
|
1499
|
+
Ot(o)) && (i = Yn(t)), ce(t) ? (l = Pe(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : o && (l.x = wt(o))), {
|
|
1500
|
+
x: s.left + i.scrollLeft - l.x,
|
|
1501
|
+
y: s.top + i.scrollTop - l.y,
|
|
1502
|
+
width: s.width,
|
|
1503
|
+
height: s.height
|
|
1484
1504
|
};
|
|
1485
1505
|
}
|
|
1486
1506
|
function Qn(e) {
|
|
1487
1507
|
var t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), n = [];
|
|
1488
|
-
e.forEach(function(
|
|
1489
|
-
t.set(
|
|
1508
|
+
e.forEach(function(o) {
|
|
1509
|
+
t.set(o.name, o);
|
|
1490
1510
|
});
|
|
1491
|
-
function a(
|
|
1492
|
-
r.add(
|
|
1493
|
-
var
|
|
1494
|
-
|
|
1495
|
-
if (!r.has(
|
|
1496
|
-
var
|
|
1497
|
-
|
|
1511
|
+
function a(o) {
|
|
1512
|
+
r.add(o.name);
|
|
1513
|
+
var s = [].concat(o.requires || [], o.requiresIfExists || []);
|
|
1514
|
+
s.forEach(function(i) {
|
|
1515
|
+
if (!r.has(i)) {
|
|
1516
|
+
var l = t.get(i);
|
|
1517
|
+
l && a(l);
|
|
1498
1518
|
}
|
|
1499
|
-
}), n.push(
|
|
1519
|
+
}), n.push(o);
|
|
1500
1520
|
}
|
|
1501
|
-
return e.forEach(function(
|
|
1502
|
-
r.has(
|
|
1521
|
+
return e.forEach(function(o) {
|
|
1522
|
+
r.has(o.name) || a(o);
|
|
1503
1523
|
}), n;
|
|
1504
1524
|
}
|
|
1505
1525
|
function Gn(e) {
|
|
@@ -1546,32 +1566,32 @@ function jt() {
|
|
|
1546
1566
|
}
|
|
1547
1567
|
function ea(e) {
|
|
1548
1568
|
e === void 0 && (e = {});
|
|
1549
|
-
var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, a = t.defaultOptions,
|
|
1550
|
-
return function(
|
|
1551
|
-
|
|
1569
|
+
var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, a = t.defaultOptions, o = a === void 0 ? Lt : a;
|
|
1570
|
+
return function(i, l, d) {
|
|
1571
|
+
d === void 0 && (d = o);
|
|
1552
1572
|
var c = {
|
|
1553
1573
|
placement: "bottom",
|
|
1554
1574
|
orderedModifiers: [],
|
|
1555
|
-
options: Object.assign({}, Lt,
|
|
1575
|
+
options: Object.assign({}, Lt, o),
|
|
1556
1576
|
modifiersData: {},
|
|
1557
1577
|
elements: {
|
|
1558
|
-
reference:
|
|
1559
|
-
popper:
|
|
1578
|
+
reference: i,
|
|
1579
|
+
popper: l
|
|
1560
1580
|
},
|
|
1561
1581
|
attributes: {},
|
|
1562
1582
|
styles: {}
|
|
1563
|
-
},
|
|
1583
|
+
}, O = [], P = !1, m = {
|
|
1564
1584
|
state: c,
|
|
1565
1585
|
setOptions: function(E) {
|
|
1566
1586
|
var D = typeof E == "function" ? E(c.options) : E;
|
|
1567
|
-
|
|
1568
|
-
reference:
|
|
1569
|
-
popper: We(
|
|
1587
|
+
$(), c.options = Object.assign({}, o, c.options, D), c.scrollParents = {
|
|
1588
|
+
reference: ke(i) ? We(i) : i.contextElement ? We(i.contextElement) : [],
|
|
1589
|
+
popper: We(l)
|
|
1570
1590
|
};
|
|
1571
|
-
var
|
|
1572
|
-
return c.orderedModifiers =
|
|
1591
|
+
var L = Gn(Jn([].concat(n, c.options.modifiers)));
|
|
1592
|
+
return c.orderedModifiers = L.filter(function(w) {
|
|
1573
1593
|
return w.enabled;
|
|
1574
|
-
}),
|
|
1594
|
+
}), b(), m.update();
|
|
1575
1595
|
},
|
|
1576
1596
|
// Sync update – it will always be executed, even if not necessary. This
|
|
1577
1597
|
// is useful for low frequency updates where sync behavior simplifies the
|
|
@@ -1579,25 +1599,25 @@ function ea(e) {
|
|
|
1579
1599
|
// For high frequency updates (e.g. `resize` and `scroll` events), always
|
|
1580
1600
|
// prefer the async Popper#update method
|
|
1581
1601
|
forceUpdate: function() {
|
|
1582
|
-
if (
|
|
1583
|
-
var E = c.elements, D = E.reference,
|
|
1584
|
-
if (jt(D,
|
|
1602
|
+
if (!P) {
|
|
1603
|
+
var E = c.elements, D = E.reference, L = E.popper;
|
|
1604
|
+
if (jt(D, L)) {
|
|
1585
1605
|
c.rects = {
|
|
1586
|
-
reference: Kn(D, Fe(
|
|
1587
|
-
popper: bt(
|
|
1588
|
-
}, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(
|
|
1589
|
-
return c.modifiersData[
|
|
1606
|
+
reference: Kn(D, Fe(L), c.options.strategy === "fixed"),
|
|
1607
|
+
popper: bt(L)
|
|
1608
|
+
}, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(j) {
|
|
1609
|
+
return c.modifiersData[j.name] = Object.assign({}, j.data);
|
|
1590
1610
|
});
|
|
1591
1611
|
for (var w = 0; w < c.orderedModifiers.length; w++) {
|
|
1592
1612
|
if (c.reset === !0) {
|
|
1593
1613
|
c.reset = !1, w = -1;
|
|
1594
1614
|
continue;
|
|
1595
1615
|
}
|
|
1596
|
-
var S = c.orderedModifiers[w],
|
|
1597
|
-
typeof
|
|
1616
|
+
var S = c.orderedModifiers[w], f = S.fn, C = S.options, A = C === void 0 ? {} : C, W = S.name;
|
|
1617
|
+
typeof f == "function" && (c = f({
|
|
1598
1618
|
state: c,
|
|
1599
1619
|
options: A,
|
|
1600
|
-
name:
|
|
1620
|
+
name: W,
|
|
1601
1621
|
instance: m
|
|
1602
1622
|
}) || c);
|
|
1603
1623
|
}
|
|
@@ -1612,38 +1632,38 @@ function ea(e) {
|
|
|
1612
1632
|
});
|
|
1613
1633
|
}),
|
|
1614
1634
|
destroy: function() {
|
|
1615
|
-
|
|
1635
|
+
$(), P = !0;
|
|
1616
1636
|
}
|
|
1617
1637
|
};
|
|
1618
|
-
if (!jt(
|
|
1638
|
+
if (!jt(i, l))
|
|
1619
1639
|
return m;
|
|
1620
|
-
m.setOptions(
|
|
1621
|
-
|
|
1640
|
+
m.setOptions(d).then(function(T) {
|
|
1641
|
+
!P && d.onFirstUpdate && d.onFirstUpdate(T);
|
|
1622
1642
|
});
|
|
1623
|
-
function
|
|
1643
|
+
function b() {
|
|
1624
1644
|
c.orderedModifiers.forEach(function(T) {
|
|
1625
|
-
var E = T.name, D = T.options,
|
|
1645
|
+
var E = T.name, D = T.options, L = D === void 0 ? {} : D, w = T.effect;
|
|
1626
1646
|
if (typeof w == "function") {
|
|
1627
1647
|
var S = w({
|
|
1628
1648
|
state: c,
|
|
1629
1649
|
name: E,
|
|
1630
1650
|
instance: m,
|
|
1631
|
-
options:
|
|
1632
|
-
}),
|
|
1651
|
+
options: L
|
|
1652
|
+
}), f = function() {
|
|
1633
1653
|
};
|
|
1634
|
-
|
|
1654
|
+
O.push(S || f);
|
|
1635
1655
|
}
|
|
1636
1656
|
});
|
|
1637
1657
|
}
|
|
1638
|
-
function
|
|
1639
|
-
|
|
1658
|
+
function $() {
|
|
1659
|
+
O.forEach(function(T) {
|
|
1640
1660
|
return T();
|
|
1641
|
-
}),
|
|
1661
|
+
}), O = [];
|
|
1642
1662
|
}
|
|
1643
1663
|
return m;
|
|
1644
1664
|
};
|
|
1645
1665
|
}
|
|
1646
|
-
var ta = [
|
|
1666
|
+
var ta = [kn, In, On, dn, Nn, zn, qn, bn, Mn], ra = /* @__PURE__ */ ea({
|
|
1647
1667
|
defaultModifiers: ta
|
|
1648
1668
|
}), na = typeof global == "object" && global && global.Object === Object && global, aa = typeof self == "object" && self && self.Object === Object && self, sr = na || aa || Function("return this")(), Ze = sr.Symbol, lr = Object.prototype, ia = lr.hasOwnProperty, oa = lr.toString, Ae = Ze ? Ze.toStringTag : void 0;
|
|
1649
1669
|
function sa(e) {
|
|
@@ -1685,7 +1705,7 @@ function Je(e) {
|
|
|
1685
1705
|
var t = typeof e;
|
|
1686
1706
|
return e != null && (t == "object" || t == "function");
|
|
1687
1707
|
}
|
|
1688
|
-
var _t = NaN, wa = /^[-+]0x[0-9a-f]+$/i, Oa = /^0b[01]+$/i,
|
|
1708
|
+
var _t = NaN, wa = /^[-+]0x[0-9a-f]+$/i, Oa = /^0b[01]+$/i, $a = /^0o[0-7]+$/i, ka = parseInt;
|
|
1689
1709
|
function It(e) {
|
|
1690
1710
|
if (typeof e == "number")
|
|
1691
1711
|
return e;
|
|
@@ -1699,57 +1719,57 @@ function It(e) {
|
|
|
1699
1719
|
return e === 0 ? e : +e;
|
|
1700
1720
|
e = xa(e);
|
|
1701
1721
|
var r = Oa.test(e);
|
|
1702
|
-
return r ||
|
|
1722
|
+
return r || $a.test(e) ? ka(e.slice(2), r ? 2 : 8) : wa.test(e) ? _t : +e;
|
|
1703
1723
|
}
|
|
1704
1724
|
var st = function() {
|
|
1705
1725
|
return sr.Date.now();
|
|
1706
1726
|
}, Ta = "Expected a function", Sa = Math.max, Ca = Math.min;
|
|
1707
1727
|
function ft(e, t, r) {
|
|
1708
|
-
var n, a,
|
|
1728
|
+
var n, a, o, s, i, l, d = 0, c = !1, O = !1, P = !0;
|
|
1709
1729
|
if (typeof e != "function")
|
|
1710
1730
|
throw new TypeError(Ta);
|
|
1711
|
-
t = It(t) || 0, Je(r) && (c = !!r.leading,
|
|
1712
|
-
function m(
|
|
1731
|
+
t = It(t) || 0, Je(r) && (c = !!r.leading, O = "maxWait" in r, o = O ? Sa(It(r.maxWait) || 0, t) : o, P = "trailing" in r ? !!r.trailing : P);
|
|
1732
|
+
function m(f) {
|
|
1713
1733
|
var C = n, A = a;
|
|
1714
|
-
return n = a = void 0,
|
|
1734
|
+
return n = a = void 0, d = f, s = e.apply(A, C), s;
|
|
1715
1735
|
}
|
|
1716
|
-
function
|
|
1717
|
-
return
|
|
1736
|
+
function b(f) {
|
|
1737
|
+
return d = f, i = setTimeout(E, t), c ? m(f) : s;
|
|
1718
1738
|
}
|
|
1719
|
-
function
|
|
1720
|
-
var C =
|
|
1721
|
-
return
|
|
1739
|
+
function $(f) {
|
|
1740
|
+
var C = f - l, A = f - d, W = t - C;
|
|
1741
|
+
return O ? Ca(W, o - A) : W;
|
|
1722
1742
|
}
|
|
1723
|
-
function T(
|
|
1724
|
-
var C =
|
|
1725
|
-
return
|
|
1743
|
+
function T(f) {
|
|
1744
|
+
var C = f - l, A = f - d;
|
|
1745
|
+
return l === void 0 || C >= t || C < 0 || O && A >= o;
|
|
1726
1746
|
}
|
|
1727
1747
|
function E() {
|
|
1728
|
-
var
|
|
1729
|
-
if (T(
|
|
1730
|
-
return D(
|
|
1731
|
-
|
|
1748
|
+
var f = st();
|
|
1749
|
+
if (T(f))
|
|
1750
|
+
return D(f);
|
|
1751
|
+
i = setTimeout(E, $(f));
|
|
1732
1752
|
}
|
|
1733
|
-
function D(
|
|
1734
|
-
return
|
|
1753
|
+
function D(f) {
|
|
1754
|
+
return i = void 0, P && n ? m(f) : (n = a = void 0, s);
|
|
1735
1755
|
}
|
|
1736
|
-
function
|
|
1737
|
-
|
|
1756
|
+
function L() {
|
|
1757
|
+
i !== void 0 && clearTimeout(i), d = 0, n = l = a = i = void 0;
|
|
1738
1758
|
}
|
|
1739
1759
|
function w() {
|
|
1740
|
-
return
|
|
1760
|
+
return i === void 0 ? s : D(st());
|
|
1741
1761
|
}
|
|
1742
1762
|
function S() {
|
|
1743
|
-
var
|
|
1744
|
-
if (n = arguments, a = this,
|
|
1745
|
-
if (
|
|
1746
|
-
return
|
|
1747
|
-
if (
|
|
1748
|
-
return clearTimeout(
|
|
1763
|
+
var f = st(), C = T(f);
|
|
1764
|
+
if (n = arguments, a = this, l = f, C) {
|
|
1765
|
+
if (i === void 0)
|
|
1766
|
+
return b(l);
|
|
1767
|
+
if (O)
|
|
1768
|
+
return clearTimeout(i), i = setTimeout(E, t), m(l);
|
|
1749
1769
|
}
|
|
1750
|
-
return
|
|
1770
|
+
return i === void 0 && (i = setTimeout(E, t)), s;
|
|
1751
1771
|
}
|
|
1752
|
-
return S.cancel =
|
|
1772
|
+
return S.cancel = L, S.flush = w, S;
|
|
1753
1773
|
}
|
|
1754
1774
|
var Pa = "Expected a function";
|
|
1755
1775
|
function Ea(e, t, r) {
|
|
@@ -1764,15 +1784,15 @@ function Ea(e, t, r) {
|
|
|
1764
1784
|
}
|
|
1765
1785
|
const Va = (e, t) => {
|
|
1766
1786
|
const r = (n) => {
|
|
1767
|
-
const a = e.value,
|
|
1768
|
-
!a || !
|
|
1787
|
+
const a = e.value, o = n.target;
|
|
1788
|
+
!a || !o || !(o instanceof Node) || a.contains(o) || t(n);
|
|
1769
1789
|
};
|
|
1770
1790
|
et(() => {
|
|
1771
1791
|
document.addEventListener("click", r, !0);
|
|
1772
1792
|
}), Ve(() => {
|
|
1773
1793
|
document.removeEventListener("click", r, !0);
|
|
1774
1794
|
});
|
|
1775
|
-
},
|
|
1795
|
+
}, Da = 80, pt = /* @__PURE__ */ ee({
|
|
1776
1796
|
name: "Popover",
|
|
1777
1797
|
__name: "Popover",
|
|
1778
1798
|
props: {
|
|
@@ -1791,18 +1811,18 @@ const Va = (e, t) => {
|
|
|
1791
1811
|
},
|
|
1792
1812
|
emits: ["visible-change", "click-outside", "scroll"],
|
|
1793
1813
|
setup(e, { expose: t, emit: r }) {
|
|
1794
|
-
const n =
|
|
1795
|
-
let
|
|
1796
|
-
const
|
|
1797
|
-
const
|
|
1798
|
-
return
|
|
1814
|
+
const n = q(!1), a = e, o = h(() => a.preserveContentMount || n.value), s = h(() => !a.preserveContentMount || n.value), i = r, l = q(), d = q(), c = q();
|
|
1815
|
+
let O = null, P = je({}), m = je({});
|
|
1816
|
+
const b = (y) => typeof y == "number" ? `${y}px` : y, $ = h(() => {
|
|
1817
|
+
const y = a.maxPopperHeight;
|
|
1818
|
+
return y != null && y !== "";
|
|
1799
1819
|
}), T = h(() => {
|
|
1800
|
-
const
|
|
1801
|
-
if (
|
|
1802
|
-
const
|
|
1803
|
-
|
|
1820
|
+
const y = {}, z = a.popperWidth;
|
|
1821
|
+
if (z != null && z !== "" && (y.width = b(z)), $.value) {
|
|
1822
|
+
const M = a.maxPopperHeight;
|
|
1823
|
+
y.maxHeight = b(M), y.overflowY = "auto", y.scrollbarWidth = "none", y.msOverflowStyle = "none";
|
|
1804
1824
|
}
|
|
1805
|
-
return
|
|
1825
|
+
return y.padding = b(a.padding), y;
|
|
1806
1826
|
}), E = h(() => ({
|
|
1807
1827
|
placement: a.placement,
|
|
1808
1828
|
modifiers: [
|
|
@@ -1815,89 +1835,89 @@ const Va = (e, t) => {
|
|
|
1815
1835
|
],
|
|
1816
1836
|
...a.popoverOptions
|
|
1817
1837
|
})), D = () => {
|
|
1818
|
-
a.disabled || (n.value = !0,
|
|
1819
|
-
},
|
|
1820
|
-
n.value = !1,
|
|
1821
|
-
}, w = ft(D, a.openDelay), S = ft(
|
|
1838
|
+
a.disabled || (n.value = !0, i("visible-change", !0));
|
|
1839
|
+
}, L = () => {
|
|
1840
|
+
n.value = !1, i("visible-change", !1);
|
|
1841
|
+
}, w = ft(D, a.openDelay), S = ft(L, a.closeDelay), f = () => {
|
|
1822
1842
|
a.disabled || (S.cancel(), w());
|
|
1823
1843
|
}, C = () => {
|
|
1824
1844
|
w.cancel(), S();
|
|
1825
1845
|
};
|
|
1826
|
-
Va(
|
|
1827
|
-
a.trigger === "click" && n.value && !a.manual && C(), n.value &&
|
|
1846
|
+
Va(l, () => {
|
|
1847
|
+
a.trigger === "click" && n.value && !a.manual && C(), n.value && i("click-outside", !0);
|
|
1828
1848
|
});
|
|
1829
1849
|
const A = () => {
|
|
1830
|
-
a.disabled || (n.value ? C() :
|
|
1831
|
-
},
|
|
1832
|
-
a.trigger === "hover" ? (m.mouseenter =
|
|
1850
|
+
a.disabled || (n.value ? C() : f());
|
|
1851
|
+
}, W = () => {
|
|
1852
|
+
a.trigger === "hover" ? (m.mouseenter = f, P.mouseleave = C) : a.trigger === "click" && (m.click = A);
|
|
1833
1853
|
};
|
|
1834
|
-
|
|
1854
|
+
re(
|
|
1835
1855
|
() => n.value,
|
|
1836
|
-
(
|
|
1837
|
-
|
|
1856
|
+
(y) => {
|
|
1857
|
+
y && (d.value && c.value ? O = ra(d.value, c.value, E.value) : O?.destroy());
|
|
1838
1858
|
},
|
|
1839
1859
|
{ flush: "post" }
|
|
1840
|
-
),
|
|
1860
|
+
), re(
|
|
1841
1861
|
() => a.manual,
|
|
1842
|
-
(
|
|
1843
|
-
|
|
1862
|
+
(y) => {
|
|
1863
|
+
y ? (m = {}, P = {}) : W();
|
|
1844
1864
|
}
|
|
1845
|
-
),
|
|
1865
|
+
), re(
|
|
1846
1866
|
() => a.trigger,
|
|
1847
|
-
(
|
|
1848
|
-
|
|
1867
|
+
(y, z) => {
|
|
1868
|
+
y !== z && (m = {}, P = {}, W());
|
|
1849
1869
|
}
|
|
1850
|
-
),
|
|
1870
|
+
), re(
|
|
1851
1871
|
() => a.disabled,
|
|
1852
|
-
(
|
|
1853
|
-
|
|
1872
|
+
(y) => {
|
|
1873
|
+
y && C();
|
|
1854
1874
|
}
|
|
1855
1875
|
), et(() => {
|
|
1856
|
-
a.manual ||
|
|
1876
|
+
a.manual || W();
|
|
1857
1877
|
});
|
|
1858
|
-
const
|
|
1859
|
-
const
|
|
1860
|
-
|
|
1861
|
-
},
|
|
1878
|
+
const j = Ea((y) => {
|
|
1879
|
+
const z = y.target;
|
|
1880
|
+
i("scroll", { scrollTop: z.scrollTop, scrollLeft: z.scrollLeft });
|
|
1881
|
+
}, Da);
|
|
1862
1882
|
return Ve(() => {
|
|
1863
|
-
|
|
1883
|
+
j.cancel(), O?.destroy();
|
|
1864
1884
|
}), t({
|
|
1865
1885
|
isOpen: n,
|
|
1866
|
-
open:
|
|
1886
|
+
open: f,
|
|
1867
1887
|
close: C
|
|
1868
|
-
}), (
|
|
1888
|
+
}), (y, z) => (x(), k("div", we({
|
|
1869
1889
|
class: "cregis-popover",
|
|
1870
1890
|
ref_key: "popoverRef",
|
|
1871
|
-
ref:
|
|
1872
|
-
}, Vt(
|
|
1891
|
+
ref: l
|
|
1892
|
+
}, Vt(se(P), !0)), [
|
|
1873
1893
|
R("div", we({
|
|
1874
1894
|
class: ["cregis-popover__trigger", { "cregis-popover__trigger--disabled": e.disabled }],
|
|
1875
1895
|
ref_key: "popoverTriggerRef",
|
|
1876
|
-
ref:
|
|
1877
|
-
}, Vt(
|
|
1878
|
-
|
|
1896
|
+
ref: d
|
|
1897
|
+
}, Vt(se(m), !0)), [
|
|
1898
|
+
K(y.$slots, "reference")
|
|
1879
1899
|
], 16),
|
|
1880
|
-
|
|
1881
|
-
default:
|
|
1882
|
-
|
|
1900
|
+
Z(vt, { name: "fade" }, {
|
|
1901
|
+
default: te(() => [
|
|
1902
|
+
o.value ? Le((x(), k("div", {
|
|
1883
1903
|
key: 0,
|
|
1884
|
-
class:
|
|
1904
|
+
class: _(["cregis-popover__content", { "cregis-popover__content--hide-scrollbar": $.value }]),
|
|
1885
1905
|
ref_key: "popoverContentRef",
|
|
1886
1906
|
ref: c,
|
|
1887
|
-
style:
|
|
1888
|
-
onScroll:
|
|
1889
|
-
(...
|
|
1907
|
+
style: le(T.value),
|
|
1908
|
+
onScroll: z[0] || (z[0] = //@ts-ignore
|
|
1909
|
+
(...M) => se(j) && se(j)(...M))
|
|
1890
1910
|
}, [
|
|
1891
|
-
|
|
1911
|
+
K(y.$slots, "default")
|
|
1892
1912
|
], 38)), [
|
|
1893
|
-
[mt,
|
|
1894
|
-
]) :
|
|
1913
|
+
[mt, s.value]
|
|
1914
|
+
]) : Y("", !0)
|
|
1895
1915
|
]),
|
|
1896
1916
|
_: 3
|
|
1897
1917
|
})
|
|
1898
1918
|
], 16));
|
|
1899
1919
|
}
|
|
1900
|
-
}), cr = Symbol("CregisSelect"),
|
|
1920
|
+
}), cr = Symbol("CregisSelect"), Ba = { class: "cregis-select__trigger-label" }, Ra = { class: "cregis-select__selected" }, Aa = {
|
|
1901
1921
|
key: 1,
|
|
1902
1922
|
class: "cregis-select__placeholder"
|
|
1903
1923
|
}, za = {
|
|
@@ -1906,7 +1926,7 @@ const Va = (e, t) => {
|
|
|
1906
1926
|
}, Wa = {
|
|
1907
1927
|
key: 2,
|
|
1908
1928
|
class: "cregis-select__dropdown-filter-empty"
|
|
1909
|
-
}, Ma = { class: "cregis-select__dropdown-content" }, si = /* @__PURE__ */
|
|
1929
|
+
}, Ma = { class: "cregis-select__dropdown-content" }, si = /* @__PURE__ */ ee({
|
|
1910
1930
|
name: "Select",
|
|
1911
1931
|
__name: "Select",
|
|
1912
1932
|
props: {
|
|
@@ -1927,146 +1947,146 @@ const Va = (e, t) => {
|
|
|
1927
1947
|
},
|
|
1928
1948
|
emits: ["update:modelValue", "change", "visible-change", "filter-input", "filter-clear"],
|
|
1929
1949
|
setup(e, { emit: t }) {
|
|
1930
|
-
const r = e, n = t, a =
|
|
1931
|
-
let
|
|
1932
|
-
const
|
|
1933
|
-
|
|
1934
|
-
},
|
|
1935
|
-
|
|
1936
|
-
},
|
|
1937
|
-
const
|
|
1938
|
-
return
|
|
1939
|
-
|
|
1950
|
+
const r = e, n = t, a = q(null), o = q(!1);
|
|
1951
|
+
let s = null;
|
|
1952
|
+
const i = () => {
|
|
1953
|
+
s !== null && (clearTimeout(s), s = null);
|
|
1954
|
+
}, l = (g) => {
|
|
1955
|
+
o.value = g, n("visible-change", g), !g && r.filterable && (w.value = "", S.value = "", i());
|
|
1956
|
+
}, d = (g) => typeof g == "number" ? `n:${g}` : `s:${g}`, c = je({}), O = je({}), P = q(0), m = q(null), b = (g, F, U) => {
|
|
1957
|
+
const G = d(g);
|
|
1958
|
+
return P.value++, c[G] = F, O[G] = U ?? F, () => {
|
|
1959
|
+
P.value--, delete c[G], delete O[G];
|
|
1940
1960
|
};
|
|
1941
|
-
},
|
|
1942
|
-
|
|
1961
|
+
}, $ = h(() => P.value === 0);
|
|
1962
|
+
re(
|
|
1943
1963
|
() => r.modelValue,
|
|
1944
|
-
(
|
|
1945
|
-
if (
|
|
1964
|
+
(g) => {
|
|
1965
|
+
if (g == null || g === "") {
|
|
1946
1966
|
m.value = null;
|
|
1947
1967
|
return;
|
|
1948
1968
|
}
|
|
1949
|
-
m.value && m.value.value !==
|
|
1969
|
+
m.value && m.value.value !== g && (m.value = null);
|
|
1950
1970
|
}
|
|
1951
1971
|
);
|
|
1952
1972
|
const T = h(() => {
|
|
1953
|
-
const
|
|
1954
|
-
return
|
|
1973
|
+
const g = r.modelValue;
|
|
1974
|
+
return g != null && g !== "";
|
|
1955
1975
|
}), E = h(() => {
|
|
1956
1976
|
if (!T.value) return "";
|
|
1957
|
-
const
|
|
1958
|
-
return m.value?.value ===
|
|
1959
|
-
}), D = (
|
|
1960
|
-
r.disabled || (m.value = { value:
|
|
1961
|
-
}, w =
|
|
1962
|
-
const
|
|
1963
|
-
return !r.filterable || !
|
|
1977
|
+
const g = r.modelValue;
|
|
1978
|
+
return m.value?.value === g ? m.value.label : c[d(g)] ?? String(g);
|
|
1979
|
+
}), D = (g) => r.modelValue === g, L = (g, F) => {
|
|
1980
|
+
r.disabled || (m.value = { value: g, label: F }, n("update:modelValue", g), n("change", g), a.value?.close());
|
|
1981
|
+
}, w = q(""), S = q(""), f = h(() => S.value.trim().toLowerCase()), C = h(() => {
|
|
1982
|
+
const g = f.value;
|
|
1983
|
+
return !r.filterable || !g ? !0 : Object.keys(c).some((F) => (O[F] ?? c[F]).toLowerCase().includes(g));
|
|
1964
1984
|
}), A = h(
|
|
1965
|
-
() => r.filterable && !!
|
|
1966
|
-
),
|
|
1967
|
-
r.filterable && (
|
|
1968
|
-
S.value = w.value.trim(),
|
|
1985
|
+
() => r.filterable && !!f.value && !C.value && !$.value
|
|
1986
|
+
), W = () => {
|
|
1987
|
+
r.filterable && (i(), s = setTimeout(() => {
|
|
1988
|
+
S.value = w.value.trim(), s = null;
|
|
1969
1989
|
}, r.filterDebounceMs));
|
|
1970
1990
|
};
|
|
1971
|
-
|
|
1972
|
-
r.filterable &&
|
|
1973
|
-
}),
|
|
1991
|
+
re(w, () => {
|
|
1992
|
+
r.filterable && W();
|
|
1993
|
+
}), re(
|
|
1974
1994
|
() => r.filterable,
|
|
1975
|
-
(
|
|
1976
|
-
|
|
1995
|
+
(g) => {
|
|
1996
|
+
g || (w.value = "", S.value = "", i());
|
|
1977
1997
|
}
|
|
1978
|
-
), Ve(() =>
|
|
1979
|
-
const
|
|
1980
|
-
n("filter-input", String(
|
|
1981
|
-
},
|
|
1982
|
-
S.value = "",
|
|
1998
|
+
), Ve(() => i());
|
|
1999
|
+
const j = (g) => {
|
|
2000
|
+
n("filter-input", String(g ?? ""));
|
|
2001
|
+
}, y = () => {
|
|
2002
|
+
S.value = "", i(), n("filter-clear");
|
|
1983
2003
|
};
|
|
1984
2004
|
Ht(cr, {
|
|
1985
2005
|
modelValue: h(() => r.modelValue),
|
|
1986
2006
|
disabled: h(() => !!r.disabled),
|
|
1987
|
-
selectOption:
|
|
2007
|
+
selectOption: L,
|
|
1988
2008
|
isOptionSelected: D,
|
|
1989
|
-
registerOption:
|
|
1990
|
-
filterQuery:
|
|
2009
|
+
registerOption: b,
|
|
2010
|
+
filterQuery: f
|
|
1991
2011
|
});
|
|
1992
|
-
const
|
|
1993
|
-
if (r.popperWidth) return
|
|
1994
|
-
const
|
|
1995
|
-
return typeof
|
|
1996
|
-
}),
|
|
1997
|
-
width:
|
|
1998
|
-
})),
|
|
1999
|
-
|
|
2012
|
+
const z = (g) => typeof g == "number" ? `${g}px` : g, M = h(() => {
|
|
2013
|
+
if (r.popperWidth) return z(r.popperWidth);
|
|
2014
|
+
const g = r.triggerWidth;
|
|
2015
|
+
return typeof g == "number" ? g + 8 : `calc(${g} + 8px)`;
|
|
2016
|
+
}), X = h(() => typeof M.value == "number" ? `${M.value - 12}px` : `calc(${M.value} - 12px)`), Q = h(() => r.align === "center" ? "bottom" : r.align === "left" ? "bottom-start" : "bottom-end"), u = h(() => ({
|
|
2017
|
+
width: z(r.triggerWidth)
|
|
2018
|
+
})), v = h(() => r.size === "large" ? "20px" : r.size === "medium" ? "14px" : "12px"), V = q(0), I = (g) => {
|
|
2019
|
+
V.value = g.scrollTop;
|
|
2000
2020
|
};
|
|
2001
|
-
return (
|
|
2002
|
-
class:
|
|
2021
|
+
return (g, F) => (x(), k("div", {
|
|
2022
|
+
class: _(["cregis-select", { "is-disabled": e.disabled }])
|
|
2003
2023
|
}, [
|
|
2004
|
-
|
|
2024
|
+
Z(pt, {
|
|
2005
2025
|
ref_key: "popoverRef",
|
|
2006
2026
|
ref: a,
|
|
2007
2027
|
"preserve-content-mount": "",
|
|
2008
|
-
"popper-width":
|
|
2009
|
-
placement:
|
|
2028
|
+
"popper-width": M.value,
|
|
2029
|
+
placement: Q.value,
|
|
2010
2030
|
disabled: !!e.disabled,
|
|
2011
2031
|
padding: 0,
|
|
2012
2032
|
"max-popper-height": e.maxPopperHeight,
|
|
2013
|
-
onVisibleChange:
|
|
2014
|
-
onScroll:
|
|
2033
|
+
onVisibleChange: l,
|
|
2034
|
+
onScroll: I
|
|
2015
2035
|
}, {
|
|
2016
|
-
reference:
|
|
2036
|
+
reference: te(() => [
|
|
2017
2037
|
R("div", {
|
|
2018
|
-
class:
|
|
2019
|
-
style:
|
|
2038
|
+
class: _(["cregis-select__trigger", { [`cregis-select__trigger--${e.size}`]: e.size, [`cregis-select__trigger--${e.type}`]: e.type }]),
|
|
2039
|
+
style: le(u.value)
|
|
2020
2040
|
}, [
|
|
2021
|
-
R("div",
|
|
2022
|
-
T.value ?
|
|
2041
|
+
R("div", Ba, [
|
|
2042
|
+
T.value ? K(g.$slots, "label", {
|
|
2023
2043
|
key: 0,
|
|
2024
2044
|
modelValue: e.modelValue,
|
|
2025
2045
|
displayText: E.value,
|
|
2026
2046
|
placeholder: e.placeholder,
|
|
2027
2047
|
hasSelection: T.value
|
|
2028
2048
|
}, () => [
|
|
2029
|
-
R("p",
|
|
2030
|
-
]) : (
|
|
2049
|
+
R("p", Ra, H(E.value), 1)
|
|
2050
|
+
]) : (x(), k("p", Aa, H(e.placeholder), 1))
|
|
2031
2051
|
]),
|
|
2032
2052
|
R("span", {
|
|
2033
|
-
class:
|
|
2053
|
+
class: _(["cregis-select__icon", { "is-open": o.value }])
|
|
2034
2054
|
}, [
|
|
2035
|
-
|
|
2036
|
-
size:
|
|
2055
|
+
Z(se(Kt), {
|
|
2056
|
+
size: v.value,
|
|
2037
2057
|
color: e.disabled ? "var(--text-base-quaternary)" : "var(--material-foreground-base-secondary)"
|
|
2038
2058
|
}, null, 8, ["size", "color"])
|
|
2039
2059
|
], 2)
|
|
2040
2060
|
], 6)
|
|
2041
2061
|
]),
|
|
2042
|
-
default:
|
|
2062
|
+
default: te(() => [
|
|
2043
2063
|
R("div", {
|
|
2044
|
-
class:
|
|
2064
|
+
class: _(["cregis-select__dropdown", { "is-empty": $.value }])
|
|
2045
2065
|
}, [
|
|
2046
|
-
|
|
2047
|
-
e.filterable &&
|
|
2066
|
+
$.value ? (x(), k("p", za, H(e.noDataText), 1)) : Y("", !0),
|
|
2067
|
+
e.filterable && !$.value ? (x(), k("div", {
|
|
2048
2068
|
key: 1,
|
|
2049
|
-
class:
|
|
2069
|
+
class: _(["cregis-select__dropdown-filter", { "backdrop-fixed-header": V.value > 10 }])
|
|
2050
2070
|
}, [
|
|
2051
|
-
|
|
2071
|
+
Z(Qt, {
|
|
2052
2072
|
modelValue: w.value,
|
|
2053
|
-
"onUpdate:modelValue":
|
|
2073
|
+
"onUpdate:modelValue": F[0] || (F[0] = (U) => w.value = U),
|
|
2054
2074
|
placeholder: e.searchText,
|
|
2055
|
-
width:
|
|
2075
|
+
width: X.value,
|
|
2056
2076
|
size: "small",
|
|
2057
2077
|
clearable: "",
|
|
2058
|
-
onInput:
|
|
2059
|
-
onClear:
|
|
2078
|
+
onInput: j,
|
|
2079
|
+
onClear: y
|
|
2060
2080
|
}, {
|
|
2061
|
-
prefix:
|
|
2062
|
-
|
|
2081
|
+
prefix: te(() => [
|
|
2082
|
+
Z(se(Xt), { size: "14px" })
|
|
2063
2083
|
]),
|
|
2064
2084
|
_: 1
|
|
2065
2085
|
}, 8, ["modelValue", "placeholder", "width"])
|
|
2066
|
-
], 2)) :
|
|
2067
|
-
A.value ? (
|
|
2086
|
+
], 2)) : Y("", !0),
|
|
2087
|
+
A.value ? (x(), k("p", Wa, H(e.noMatchText), 1)) : Y("", !0),
|
|
2068
2088
|
R("div", Ma, [
|
|
2069
|
-
|
|
2089
|
+
K(g.$slots, "default")
|
|
2070
2090
|
])
|
|
2071
2091
|
], 2)
|
|
2072
2092
|
]),
|
|
@@ -2074,7 +2094,7 @@ const Va = (e, t) => {
|
|
|
2074
2094
|
}, 8, ["popper-width", "placement", "disabled", "max-popper-height"])
|
|
2075
2095
|
], 2));
|
|
2076
2096
|
}
|
|
2077
|
-
}), La = ["aria-selected"], li = /* @__PURE__ */
|
|
2097
|
+
}), La = ["aria-selected"], li = /* @__PURE__ */ ee({
|
|
2078
2098
|
name: "Option",
|
|
2079
2099
|
__name: "Option",
|
|
2080
2100
|
props: {
|
|
@@ -2086,32 +2106,32 @@ const Va = (e, t) => {
|
|
|
2086
2106
|
setup(e) {
|
|
2087
2107
|
const t = e, r = qt(cr, null);
|
|
2088
2108
|
let n;
|
|
2089
|
-
const a = () => t.filterText ?? t.label,
|
|
2109
|
+
const a = () => t.filterText ?? t.label, o = () => {
|
|
2090
2110
|
n?.(), r && (n = r.registerOption(t.value, t.label, a()));
|
|
2091
2111
|
};
|
|
2092
|
-
et(
|
|
2093
|
-
const
|
|
2112
|
+
et(o), Ve(() => n?.()), re(() => [t.value, t.label, t.filterText], o);
|
|
2113
|
+
const s = h(() => r?.isOptionSelected(t.value) ?? !1), i = () => {
|
|
2094
2114
|
t.disabled || r?.disabled.value || r?.selectOption(t.value, t.label);
|
|
2095
|
-
},
|
|
2096
|
-
const c =
|
|
2115
|
+
}, l = h(() => r?.filterQuery?.value ?? ""), d = h(() => {
|
|
2116
|
+
const c = l.value;
|
|
2097
2117
|
return c ? a().toLowerCase().includes(c) : !0;
|
|
2098
2118
|
});
|
|
2099
|
-
return (c,
|
|
2100
|
-
class:
|
|
2119
|
+
return (c, O) => Le((x(), k("div", {
|
|
2120
|
+
class: _(["cregis-select__option", { "is-selected": s.value, "is-disabled": e.disabled }]),
|
|
2101
2121
|
role: "option",
|
|
2102
|
-
"aria-selected":
|
|
2103
|
-
onClick:
|
|
2122
|
+
"aria-selected": s.value,
|
|
2123
|
+
onClick: i
|
|
2104
2124
|
}, [
|
|
2105
|
-
|
|
2125
|
+
K(c.$slots, "default", {
|
|
2106
2126
|
label: e.label,
|
|
2107
2127
|
value: e.value,
|
|
2108
2128
|
disabled: !!e.disabled,
|
|
2109
|
-
selected:
|
|
2129
|
+
selected: s.value
|
|
2110
2130
|
}, () => [
|
|
2111
|
-
|
|
2131
|
+
$e(H(e.label), 1)
|
|
2112
2132
|
])
|
|
2113
2133
|
], 10, La)), [
|
|
2114
|
-
[mt,
|
|
2134
|
+
[mt, d.value]
|
|
2115
2135
|
]);
|
|
2116
2136
|
}
|
|
2117
2137
|
}), ja = { class: "cregis-cascader__trigger-label" }, Na = { class: "cregis-cascader__selected" }, _a = {
|
|
@@ -2129,7 +2149,7 @@ const Va = (e, t) => {
|
|
|
2129
2149
|
}, Ua = { class: "cregis-cascader__suboption-amount-container" }, Ya = {
|
|
2130
2150
|
key: 0,
|
|
2131
2151
|
class: "cregis-cascader__suboption-amount"
|
|
2132
|
-
}, Xa = { class: "cregis-cascader__suboption-panel" }, Ka = ["onClick"], Qa = ["onClick"], ci = /* @__PURE__ */
|
|
2152
|
+
}, Xa = { class: "cregis-cascader__suboption-panel" }, Ka = ["onClick"], Qa = ["onClick"], ci = /* @__PURE__ */ ee({
|
|
2133
2153
|
name: "Cascader",
|
|
2134
2154
|
__name: "Cascader",
|
|
2135
2155
|
props: {
|
|
@@ -2154,286 +2174,286 @@ const Va = (e, t) => {
|
|
|
2154
2174
|
},
|
|
2155
2175
|
emits: ["update:modelValue", "change", "visible-change", "filter-input", "filter-clear"],
|
|
2156
2176
|
setup(e, { emit: t }) {
|
|
2157
|
-
const r = e, n = t, a =
|
|
2158
|
-
let
|
|
2159
|
-
const
|
|
2160
|
-
|
|
2161
|
-
},
|
|
2162
|
-
r.filterable && (
|
|
2163
|
-
|
|
2177
|
+
const r = e, n = t, a = q(null), o = q(!1);
|
|
2178
|
+
let s = null;
|
|
2179
|
+
const i = () => {
|
|
2180
|
+
s !== null && (clearTimeout(s), s = null);
|
|
2181
|
+
}, l = q(""), d = q(""), c = h(() => d.value.trim().toLowerCase()), O = () => {
|
|
2182
|
+
r.filterable && (i(), s = setTimeout(() => {
|
|
2183
|
+
d.value = l.value.trim(), s = null;
|
|
2164
2184
|
}, r.filterDebounceMs));
|
|
2165
2185
|
};
|
|
2166
|
-
|
|
2167
|
-
r.filterable &&
|
|
2168
|
-
}),
|
|
2186
|
+
re(l, () => {
|
|
2187
|
+
r.filterable && O();
|
|
2188
|
+
}), re(
|
|
2169
2189
|
() => r.filterable,
|
|
2170
|
-
(
|
|
2171
|
-
|
|
2190
|
+
(p) => {
|
|
2191
|
+
p || (l.value = "", d.value = "", i());
|
|
2172
2192
|
}
|
|
2173
|
-
), Ve(() =>
|
|
2174
|
-
const
|
|
2175
|
-
n("filter-input", String(
|
|
2193
|
+
), Ve(() => i());
|
|
2194
|
+
const P = (p) => {
|
|
2195
|
+
n("filter-input", String(p ?? ""));
|
|
2176
2196
|
}, m = () => {
|
|
2177
|
-
|
|
2178
|
-
},
|
|
2179
|
-
const
|
|
2180
|
-
return !
|
|
2181
|
-
}, T = (
|
|
2197
|
+
d.value = "", i(), n("filter-clear");
|
|
2198
|
+
}, b = (p) => (p.filterText ?? p.label).toLowerCase(), $ = (p) => {
|
|
2199
|
+
const N = c.value;
|
|
2200
|
+
return !N || b(p).includes(N) ? !0 : (p.children ?? []).some((oe) => b(oe).includes(N));
|
|
2201
|
+
}, T = (p, N) => {
|
|
2182
2202
|
const B = c.value;
|
|
2183
|
-
return !B ||
|
|
2184
|
-
}, E = h(() => r.options.filter((
|
|
2185
|
-
() => r.filterable && !!
|
|
2186
|
-
), S = (
|
|
2187
|
-
|
|
2188
|
-
},
|
|
2189
|
-
const
|
|
2190
|
-
if (
|
|
2203
|
+
return !B || b(p).includes(B) ? !0 : b(N).includes(B);
|
|
2204
|
+
}, E = h(() => r.options.filter((p) => $(p))), D = h(() => r.options.length === 0), L = h(() => (c.value, r.options.some((p) => $(p)))), w = h(
|
|
2205
|
+
() => r.filterable && !!d.value.trim() && !L.value && !D.value
|
|
2206
|
+
), S = (p) => {
|
|
2207
|
+
o.value = p, n("visible-change", p), !p && r.filterable && (l.value = "", d.value = "", i());
|
|
2208
|
+
}, f = q(null), C = (p) => {
|
|
2209
|
+
const N = r.options.find((B) => B.value === p);
|
|
2210
|
+
if (N)
|
|
2191
2211
|
return {
|
|
2192
2212
|
level: 1,
|
|
2193
|
-
label:
|
|
2194
|
-
primary:
|
|
2213
|
+
label: N.label,
|
|
2214
|
+
primary: N,
|
|
2195
2215
|
sub: void 0
|
|
2196
2216
|
};
|
|
2197
2217
|
for (const B of r.options) {
|
|
2198
|
-
const
|
|
2199
|
-
if (
|
|
2218
|
+
const oe = B.children?.find((J) => J.value === p);
|
|
2219
|
+
if (oe)
|
|
2200
2220
|
return {
|
|
2201
2221
|
level: 2,
|
|
2202
|
-
label:
|
|
2222
|
+
label: oe.label,
|
|
2203
2223
|
primary: B,
|
|
2204
|
-
sub:
|
|
2224
|
+
sub: oe
|
|
2205
2225
|
};
|
|
2206
2226
|
}
|
|
2207
2227
|
return {
|
|
2208
2228
|
level: 0,
|
|
2209
|
-
label: String(
|
|
2229
|
+
label: String(p),
|
|
2210
2230
|
primary: void 0,
|
|
2211
2231
|
sub: void 0
|
|
2212
2232
|
};
|
|
2213
2233
|
}, A = h(() => {
|
|
2214
|
-
const
|
|
2215
|
-
return
|
|
2234
|
+
const p = r.modelValue;
|
|
2235
|
+
return p == null || p === "" ? {
|
|
2216
2236
|
level: 0,
|
|
2217
2237
|
label: "",
|
|
2218
2238
|
primary: void 0,
|
|
2219
2239
|
sub: void 0
|
|
2220
|
-
} :
|
|
2221
|
-
level:
|
|
2222
|
-
label:
|
|
2223
|
-
primary:
|
|
2224
|
-
sub:
|
|
2225
|
-
} : C(
|
|
2240
|
+
} : f.value !== null && f.value.value === p ? {
|
|
2241
|
+
level: f.value.level,
|
|
2242
|
+
label: f.value.label,
|
|
2243
|
+
primary: f.value.primary,
|
|
2244
|
+
sub: f.value.sub
|
|
2245
|
+
} : C(p);
|
|
2226
2246
|
});
|
|
2227
|
-
|
|
2247
|
+
re(
|
|
2228
2248
|
() => r.modelValue,
|
|
2229
|
-
(
|
|
2230
|
-
if (
|
|
2231
|
-
|
|
2249
|
+
(p) => {
|
|
2250
|
+
if (p == null || p === "") {
|
|
2251
|
+
f.value = null;
|
|
2232
2252
|
return;
|
|
2233
2253
|
}
|
|
2234
|
-
|
|
2254
|
+
f.value !== null && f.value.value !== p && (f.value = null);
|
|
2235
2255
|
}
|
|
2236
2256
|
);
|
|
2237
|
-
const
|
|
2238
|
-
const
|
|
2239
|
-
return
|
|
2240
|
-
},
|
|
2241
|
-
r.disabled ||
|
|
2242
|
-
},
|
|
2243
|
-
r.disabled ||
|
|
2244
|
-
},
|
|
2257
|
+
const W = h(() => A.value.level > 0), j = h(() => A.value.label), y = h(() => r.modelValue), z = h(() => j.value), M = h(() => A.value.level), X = h(() => A.value.primary), Q = h(() => A.value.sub), u = (p) => (p.children?.length ?? 0) > 0, v = (p) => r.modelValue === p, V = (p) => {
|
|
2258
|
+
const N = r.modelValue;
|
|
2259
|
+
return N == null || N === "" ? !1 : (p.children ?? []).some((B) => B.value === N);
|
|
2260
|
+
}, I = (p, N) => {
|
|
2261
|
+
r.disabled || p.disabled || N.disabled || (f.value = { value: N.value, label: N.label, level: 2, primary: p, sub: N }, n("update:modelValue", N.value), n("change", N.value), a.value?.close());
|
|
2262
|
+
}, g = (p) => {
|
|
2263
|
+
r.disabled || p.disabled || u(p) || (f.value = { value: p.value, label: p.label, level: 1, primary: p }, n("update:modelValue", p.value), n("change", p.value), a.value?.close());
|
|
2264
|
+
}, F = (p) => typeof p == "number" ? `${p}px` : p, U = h(() => {
|
|
2245
2265
|
if (r.popperWidth !== void 0 && r.popperWidth !== null && r.popperWidth !== "")
|
|
2246
|
-
return
|
|
2247
|
-
const
|
|
2248
|
-
return typeof
|
|
2249
|
-
}),
|
|
2250
|
-
maxHeight:
|
|
2266
|
+
return F(r.popperWidth);
|
|
2267
|
+
const p = r.triggerWidth;
|
|
2268
|
+
return typeof p == "number" ? `${p + 8}px` : `calc(${p} + 8px)`;
|
|
2269
|
+
}), G = h(() => F(r.subPopperWidth)), he = h(() => typeof U.value == "number" ? `${U.value - 12}px` : `calc(${U.value} - 12px)`), fe = h(() => ({
|
|
2270
|
+
maxHeight: F(r.maxPopperHeight),
|
|
2251
2271
|
overflowY: "auto"
|
|
2252
2272
|
})), ye = { strategy: "fixed" }, Te = h(() => r.align === "center" ? "bottom" : r.align === "left" ? "bottom-start" : "bottom-end"), me = h(() => ({
|
|
2253
|
-
width:
|
|
2254
|
-
})),
|
|
2255
|
-
const
|
|
2256
|
-
He.value =
|
|
2273
|
+
width: F(r.triggerWidth)
|
|
2274
|
+
})), De = h(() => r.size === "large" ? "20px" : r.size === "medium" ? "14px" : "12px"), He = q(0), Be = (p) => {
|
|
2275
|
+
const N = p.target;
|
|
2276
|
+
He.value = N.scrollTop;
|
|
2257
2277
|
}, rt = [-16, -8];
|
|
2258
|
-
return (
|
|
2259
|
-
class:
|
|
2278
|
+
return (p, N) => (x(), k("div", {
|
|
2279
|
+
class: _(["cregis-cascader", { "is-disabled": e.disabled }])
|
|
2260
2280
|
}, [
|
|
2261
|
-
|
|
2281
|
+
Z(pt, {
|
|
2262
2282
|
ref_key: "popoverRef",
|
|
2263
2283
|
ref: a,
|
|
2264
2284
|
"preserve-content-mount": "",
|
|
2265
|
-
"popper-width":
|
|
2285
|
+
"popper-width": U.value,
|
|
2266
2286
|
placement: Te.value,
|
|
2267
2287
|
offset: e.offset,
|
|
2268
2288
|
disabled: !!e.disabled,
|
|
2269
2289
|
padding: 0,
|
|
2270
2290
|
onVisibleChange: S
|
|
2271
2291
|
}, {
|
|
2272
|
-
reference:
|
|
2273
|
-
|
|
2292
|
+
reference: te(() => [
|
|
2293
|
+
p.$slots.trigger ? K(p.$slots, "trigger", {
|
|
2274
2294
|
key: 0,
|
|
2275
|
-
modelValue:
|
|
2276
|
-
selectedLabel:
|
|
2277
|
-
level:
|
|
2278
|
-
primaryOption:
|
|
2279
|
-
subOption:
|
|
2295
|
+
modelValue: y.value,
|
|
2296
|
+
selectedLabel: z.value,
|
|
2297
|
+
level: M.value,
|
|
2298
|
+
primaryOption: X.value,
|
|
2299
|
+
subOption: Q.value,
|
|
2280
2300
|
placeholder: e.placeholder,
|
|
2281
|
-
hasSelection:
|
|
2282
|
-
open:
|
|
2301
|
+
hasSelection: W.value,
|
|
2302
|
+
open: o.value,
|
|
2283
2303
|
disabled: !!e.disabled
|
|
2284
|
-
}) : (
|
|
2304
|
+
}) : (x(), k("div", {
|
|
2285
2305
|
key: 1,
|
|
2286
|
-
class:
|
|
2287
|
-
style:
|
|
2306
|
+
class: _(["cregis-cascader__trigger", { [`cregis-cascader__trigger--${e.size}`]: e.size, [`cregis-cascader__trigger--${e.type}`]: e.type }]),
|
|
2307
|
+
style: le(me.value)
|
|
2288
2308
|
}, [
|
|
2289
2309
|
R("div", ja, [
|
|
2290
|
-
|
|
2310
|
+
W.value ? K(p.$slots, "label", {
|
|
2291
2311
|
key: 0,
|
|
2292
|
-
modelValue:
|
|
2293
|
-
selectedLabel:
|
|
2294
|
-
level:
|
|
2295
|
-
primaryOption:
|
|
2296
|
-
subOption:
|
|
2312
|
+
modelValue: y.value,
|
|
2313
|
+
selectedLabel: z.value,
|
|
2314
|
+
level: M.value,
|
|
2315
|
+
primaryOption: X.value,
|
|
2316
|
+
subOption: Q.value,
|
|
2297
2317
|
placeholder: e.placeholder,
|
|
2298
|
-
hasSelection:
|
|
2318
|
+
hasSelection: W.value
|
|
2299
2319
|
}, () => [
|
|
2300
|
-
R("p", Na, j
|
|
2301
|
-
]) : (
|
|
2320
|
+
R("p", Na, H(j.value), 1)
|
|
2321
|
+
]) : (x(), k("p", _a, H(e.placeholder), 1))
|
|
2302
2322
|
]),
|
|
2303
2323
|
R("span", {
|
|
2304
|
-
class:
|
|
2324
|
+
class: _(["cregis-cascader__icon", { "is-open": o.value }])
|
|
2305
2325
|
}, [
|
|
2306
|
-
|
|
2307
|
-
size:
|
|
2326
|
+
Z(se(Kt), {
|
|
2327
|
+
size: De.value,
|
|
2308
2328
|
color: e.disabled ? "var(--text-base-quaternary)" : "var(--material-foreground-base-secondary)"
|
|
2309
2329
|
}, null, 8, ["size", "color"])
|
|
2310
2330
|
], 2)
|
|
2311
2331
|
], 6))
|
|
2312
2332
|
]),
|
|
2313
|
-
default:
|
|
2333
|
+
default: te(() => [
|
|
2314
2334
|
R("div", {
|
|
2315
|
-
class:
|
|
2316
|
-
style:
|
|
2317
|
-
onScroll:
|
|
2335
|
+
class: _(["cregis-cascader__dropdown", { "is-empty": D.value }]),
|
|
2336
|
+
style: le(fe.value),
|
|
2337
|
+
onScroll: Be
|
|
2318
2338
|
}, [
|
|
2319
|
-
D.value ? (
|
|
2320
|
-
e.filterable && !D.value ? (
|
|
2339
|
+
D.value ? (x(), k("p", Ia, H(e.noDataText), 1)) : Y("", !0),
|
|
2340
|
+
e.filterable && !D.value ? (x(), k("div", {
|
|
2321
2341
|
key: 1,
|
|
2322
|
-
class:
|
|
2342
|
+
class: _(["cregis-cascader__dropdown-filter", { "backdrop-fixed-header": He.value > 10 }])
|
|
2323
2343
|
}, [
|
|
2324
|
-
|
|
2325
|
-
modelValue:
|
|
2326
|
-
"onUpdate:modelValue":
|
|
2344
|
+
Z(Qt, {
|
|
2345
|
+
modelValue: l.value,
|
|
2346
|
+
"onUpdate:modelValue": N[0] || (N[0] = (B) => l.value = B),
|
|
2327
2347
|
placeholder: e.searchText,
|
|
2328
2348
|
width: he.value,
|
|
2329
2349
|
size: "small",
|
|
2330
2350
|
clearable: "",
|
|
2331
|
-
onInput:
|
|
2351
|
+
onInput: P,
|
|
2332
2352
|
onClear: m
|
|
2333
2353
|
}, {
|
|
2334
|
-
prefix:
|
|
2335
|
-
|
|
2354
|
+
prefix: te(() => [
|
|
2355
|
+
Z(se(Xt), { size: "14px" })
|
|
2336
2356
|
]),
|
|
2337
2357
|
_: 1
|
|
2338
2358
|
}, 8, ["modelValue", "placeholder", "width"])
|
|
2339
|
-
], 2)) :
|
|
2340
|
-
w.value ? (
|
|
2359
|
+
], 2)) : Y("", !0),
|
|
2360
|
+
w.value ? (x(), k("p", Fa, H(e.noMatchText), 1)) : Y("", !0),
|
|
2341
2361
|
R("ul", Ha, [
|
|
2342
|
-
(
|
|
2362
|
+
(x(!0), k(lt, null, ct(E.value, (B, oe) => (x(), k("li", {
|
|
2343
2363
|
key: B.value,
|
|
2344
|
-
class:
|
|
2364
|
+
class: _(["cregis-cascader__dropdown-item", { "is-disabled": B.disabled }])
|
|
2345
2365
|
}, [
|
|
2346
|
-
|
|
2347
|
-
|
|
2366
|
+
u(B) ? (x(), k("div", qa, [
|
|
2367
|
+
Z(pt, {
|
|
2348
2368
|
trigger: "hover",
|
|
2349
2369
|
placement: "right-start",
|
|
2350
2370
|
offset: rt,
|
|
2351
2371
|
"popover-options": ye,
|
|
2352
|
-
"popper-width":
|
|
2372
|
+
"popper-width": G.value,
|
|
2353
2373
|
padding: 4,
|
|
2354
2374
|
disabled: !!B.disabled || !!e.disabled
|
|
2355
2375
|
}, {
|
|
2356
|
-
reference:
|
|
2376
|
+
reference: te(() => [
|
|
2357
2377
|
R("div", {
|
|
2358
|
-
class:
|
|
2378
|
+
class: _(["cregis-cascader__suboption-trigger", {
|
|
2359
2379
|
"is-disabled": B.disabled,
|
|
2360
|
-
"is-parent-active":
|
|
2380
|
+
"is-parent-active": V(B)
|
|
2361
2381
|
}])
|
|
2362
2382
|
}, [
|
|
2363
|
-
|
|
2364
|
-
modelValue:
|
|
2365
|
-
selectedLabel:
|
|
2366
|
-
level:
|
|
2367
|
-
primaryOption:
|
|
2368
|
-
subOption:
|
|
2383
|
+
K(p.$slots, "option", {
|
|
2384
|
+
modelValue: y.value,
|
|
2385
|
+
selectedLabel: z.value,
|
|
2386
|
+
level: M.value,
|
|
2387
|
+
primaryOption: X.value,
|
|
2388
|
+
subOption: Q.value,
|
|
2369
2389
|
option: B,
|
|
2370
|
-
index:
|
|
2390
|
+
index: oe,
|
|
2371
2391
|
disabled: !!B.disabled,
|
|
2372
|
-
selected:
|
|
2373
|
-
isParentOfSelected:
|
|
2392
|
+
selected: v(B.value),
|
|
2393
|
+
isParentOfSelected: V(B)
|
|
2374
2394
|
}, () => [
|
|
2375
|
-
R("p", null,
|
|
2395
|
+
R("p", null, H(B.label), 1)
|
|
2376
2396
|
]),
|
|
2377
2397
|
R("div", Ua, [
|
|
2378
|
-
e.showSubOptionAmount ? (
|
|
2379
|
-
|
|
2398
|
+
e.showSubOptionAmount ? (x(), k("div", Ya, H(B.children.length), 1)) : Y("", !0),
|
|
2399
|
+
Z(se(br), {
|
|
2380
2400
|
size: "14px",
|
|
2381
2401
|
color: "currentColor"
|
|
2382
2402
|
})
|
|
2383
2403
|
])
|
|
2384
2404
|
], 2)
|
|
2385
2405
|
]),
|
|
2386
|
-
default:
|
|
2406
|
+
default: te(() => [
|
|
2387
2407
|
R("div", Xa, [
|
|
2388
|
-
(
|
|
2389
|
-
key:
|
|
2390
|
-
class:
|
|
2391
|
-
"is-active":
|
|
2392
|
-
"is-disabled":
|
|
2408
|
+
(x(!0), k(lt, null, ct(B.children, (J, nt) => Le((x(), k("div", {
|
|
2409
|
+
key: J.value,
|
|
2410
|
+
class: _(["cregis-cascader__suboption-row", {
|
|
2411
|
+
"is-active": v(J.value),
|
|
2412
|
+
"is-disabled": J.disabled
|
|
2393
2413
|
}]),
|
|
2394
2414
|
role: "menuitem",
|
|
2395
|
-
onClick: (
|
|
2415
|
+
onClick: ($t) => I(B, J)
|
|
2396
2416
|
}, [
|
|
2397
|
-
|
|
2398
|
-
modelValue:
|
|
2399
|
-
selectedLabel:
|
|
2400
|
-
level:
|
|
2401
|
-
primaryOption:
|
|
2402
|
-
subOption:
|
|
2403
|
-
option:
|
|
2417
|
+
K(p.$slots, "subOption", {
|
|
2418
|
+
modelValue: y.value,
|
|
2419
|
+
selectedLabel: z.value,
|
|
2420
|
+
level: M.value,
|
|
2421
|
+
primaryOption: X.value,
|
|
2422
|
+
subOption: Q.value,
|
|
2423
|
+
option: J,
|
|
2404
2424
|
index: nt,
|
|
2405
2425
|
parent: B,
|
|
2406
|
-
parentIndex:
|
|
2407
|
-
selected:
|
|
2408
|
-
disabled: !!
|
|
2426
|
+
parentIndex: oe,
|
|
2427
|
+
selected: v(J.value),
|
|
2428
|
+
disabled: !!J.disabled
|
|
2409
2429
|
}, () => [
|
|
2410
|
-
|
|
2430
|
+
$e(H(J.label), 1)
|
|
2411
2431
|
])
|
|
2412
2432
|
], 10, Ka)), [
|
|
2413
|
-
[mt, T(B,
|
|
2433
|
+
[mt, T(B, J)]
|
|
2414
2434
|
])), 128))
|
|
2415
2435
|
])
|
|
2416
2436
|
]),
|
|
2417
2437
|
_: 2
|
|
2418
2438
|
}, 1032, ["popper-width", "disabled"])
|
|
2419
|
-
])) : (
|
|
2439
|
+
])) : (x(), k("div", {
|
|
2420
2440
|
key: 1,
|
|
2421
2441
|
class: "cregis-cascader__leaf-only",
|
|
2422
|
-
onClick: (
|
|
2442
|
+
onClick: (J) => g(B)
|
|
2423
2443
|
}, [
|
|
2424
|
-
|
|
2425
|
-
modelValue:
|
|
2426
|
-
selectedLabel:
|
|
2427
|
-
level:
|
|
2428
|
-
primaryOption:
|
|
2429
|
-
subOption:
|
|
2444
|
+
K(p.$slots, "option", {
|
|
2445
|
+
modelValue: y.value,
|
|
2446
|
+
selectedLabel: z.value,
|
|
2447
|
+
level: M.value,
|
|
2448
|
+
primaryOption: X.value,
|
|
2449
|
+
subOption: Q.value,
|
|
2430
2450
|
option: B,
|
|
2431
|
-
index:
|
|
2451
|
+
index: oe,
|
|
2432
2452
|
disabled: !!B.disabled,
|
|
2433
|
-
selected:
|
|
2453
|
+
selected: v(B.value),
|
|
2434
2454
|
isParentOfSelected: !1
|
|
2435
2455
|
}, () => [
|
|
2436
|
-
R("p", null,
|
|
2456
|
+
R("p", null, H(B.label), 1)
|
|
2437
2457
|
])
|
|
2438
2458
|
], 8, Qa))
|
|
2439
2459
|
], 2))), 128))
|