@cregis/ui 1.1.7 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.js +1140 -1077
- package/dist/types/index.d.ts +5 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createI18n as Kn } from "vue-i18n";
|
|
2
|
-
import { defineComponent as oe, useSlots as
|
|
3
|
-
import { EdsLoad as
|
|
2
|
+
import { defineComponent as oe, useSlots as $n, ref as V, computed as p, openBlock as u, createElementBlock as m, normalizeClass as X, createElementVNode as z, mergeProps as Be, createBlock as de, resolveDynamicComponent as it, normalizeStyle as G, renderSlot as ae, toDisplayString as F, createCommentVNode as j, unref as Y, watch as ie, nextTick as ge, onMounted as Pe, onBeforeUnmount as It, withDirectives as Fe, vModelDynamic as Gn, withModifiers as He, vModelText as Zn, createVNode as ne, withCtx as ve, createTextVNode as ye, reactive as je, onUnmounted as ze, provide as Nt, toRef as ht, Fragment as Le, renderList as Ve, inject as jt, Transition as st, render as Ue, h as _t, getCurrentScope as Qn, onScopeDispose as Jn, readonly as Ot, toHandlers as Tt, Teleport as Ft, vShow as $t, createSlots as on } from "vue";
|
|
3
|
+
import { EdsLoad as Wt, EdsCloseCircleFill as ea, EdsTickFill as Cn, EdsWarningFill as ta, EdsSearch as On, EdsArrowDownMiniIos as Ht, EdsArrowRightMiniIos as na, EdsAdd as sn, EdsClose as Ut, EdsWarningLonely as aa, EdsTimeWait as ia, EdsArrowRefuses as ra, EdsTick as la, EdsNoData as oa } from "@cregis/icon";
|
|
4
4
|
const sa = {
|
|
5
5
|
input: {
|
|
6
6
|
placeholder: "請輸入"
|
|
@@ -101,7 +101,7 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
101
101
|
legacy: !1
|
|
102
102
|
})), zt), Dl = (e) => {
|
|
103
103
|
Tn().global.locale.value = e;
|
|
104
|
-
}, he = (e, t) => Tn().global.t(e, t), da = ["disabled"], fa = ["disabled"], va = ["disabled"],
|
|
104
|
+
}, he = (e, t) => Tn().global.t(e, t), da = ["disabled"], fa = ["disabled"], va = ["disabled"], _e = /* @__PURE__ */ oe({
|
|
105
105
|
name: "Button",
|
|
106
106
|
inheritAttrs: !1,
|
|
107
107
|
__name: "Button",
|
|
@@ -122,7 +122,7 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
122
122
|
isActive: { type: Boolean }
|
|
123
123
|
},
|
|
124
124
|
setup(e) {
|
|
125
|
-
const t = e, n =
|
|
125
|
+
const t = e, n = $n(), a = V(null);
|
|
126
126
|
function i() {
|
|
127
127
|
t.disabled || t.loading || a.value?.click();
|
|
128
128
|
}
|
|
@@ -148,9 +148,9 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
148
148
|
});
|
|
149
149
|
return (c, d) => e.icon || c.$slots.icon ? (u(), m("div", {
|
|
150
150
|
key: 0,
|
|
151
|
-
class:
|
|
151
|
+
class: X(["cregis-button__icon-wrapper", { "cregis-button__icon-wrapper--professional": e.iconType === "professional" }])
|
|
152
152
|
}, [
|
|
153
|
-
|
|
153
|
+
z("button", Be({
|
|
154
154
|
ref_key: "iconButtonRef",
|
|
155
155
|
ref: a
|
|
156
156
|
}, c.$attrs, {
|
|
@@ -169,16 +169,16 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
169
169
|
}, null, 8, ["size"])) : (u(), m("span", {
|
|
170
170
|
key: 1,
|
|
171
171
|
class: "cregis-button__icon-slot-inner",
|
|
172
|
-
style:
|
|
172
|
+
style: G({ "--cregis-btn-icon-slot-size": o.value })
|
|
173
173
|
}, [
|
|
174
174
|
ae(c.$slots, "icon")
|
|
175
175
|
], 4))
|
|
176
176
|
], 16, da),
|
|
177
177
|
e.iconText ? (u(), m("span", {
|
|
178
178
|
key: 0,
|
|
179
|
-
class:
|
|
179
|
+
class: X(["cregis-button__icon-text", { "is-disabled": e.disabled }]),
|
|
180
180
|
onClick: i
|
|
181
|
-
},
|
|
181
|
+
}, F(e.iconText), 3)) : j("", !0)
|
|
182
182
|
], 2)) : e.link ? (u(), m("button", Be({ key: 1 }, c.$attrs, {
|
|
183
183
|
class: ["cregis-button__link", {
|
|
184
184
|
[`cregis-button__link--${e.type}`]: e.type,
|
|
@@ -207,7 +207,7 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
207
207
|
}],
|
|
208
208
|
disabled: e.disabled || e.loading
|
|
209
209
|
}), [
|
|
210
|
-
e.loading ? (u(), de(
|
|
210
|
+
e.loading ? (u(), de(Y(Wt), {
|
|
211
211
|
key: 0,
|
|
212
212
|
class: "loading",
|
|
213
213
|
size: l.value,
|
|
@@ -245,12 +245,12 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
245
245
|
setup(e, { expose: t, emit: n }) {
|
|
246
246
|
const a = e, i = n, r = (f) => {
|
|
247
247
|
if (f === "" || f === null || f === void 0) return "";
|
|
248
|
-
const
|
|
249
|
-
if (
|
|
250
|
-
const
|
|
251
|
-
if (!Number.isNaN(
|
|
252
|
-
if (/^-/.test(
|
|
253
|
-
const ee =
|
|
248
|
+
const T = String(f).trim();
|
|
249
|
+
if (T === "") return "";
|
|
250
|
+
const I = Number(T.replace(/,/g, ""));
|
|
251
|
+
if (!Number.isNaN(I) && I < 0) return Math.abs(I);
|
|
252
|
+
if (/^-/.test(T)) {
|
|
253
|
+
const ee = T.replace(/^-+/, "");
|
|
254
254
|
return ee === "" ? "" : ee;
|
|
255
255
|
}
|
|
256
256
|
return f;
|
|
@@ -259,105 +259,105 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
259
259
|
return f === void 0 || !Number.isFinite(f) ? null : Math.max(0, Math.floor(f));
|
|
260
260
|
}), l = p(() => a.type === "number" && o.value !== null), s = p(() => l.value ? "text" : a.type), v = p(() => l.value ? "decimal" : void 0), c = (f) => f.replace(/[,,。.]/g, "."), d = (f) => {
|
|
261
261
|
if (f === "" || f === null || f === void 0) return "";
|
|
262
|
-
let
|
|
263
|
-
if (
|
|
264
|
-
let
|
|
265
|
-
!a.nonNegative &&
|
|
266
|
-
const ee =
|
|
267
|
-
return ee !== -1 && (
|
|
262
|
+
let T = c(String(f).trim());
|
|
263
|
+
if (T === "") return "";
|
|
264
|
+
let I = !1;
|
|
265
|
+
!a.nonNegative && T.startsWith("-") && (I = !0, T = T.slice(1)), T = T.replace(/[^\d.]/g, "");
|
|
266
|
+
const ee = T.indexOf(".");
|
|
267
|
+
return ee !== -1 && (T = T.slice(0, ee + 1) + T.slice(ee + 1).replace(/\./g, "")), (I ? "-" : "") + T;
|
|
268
268
|
}, g = (f) => {
|
|
269
|
-
const
|
|
270
|
-
if (
|
|
269
|
+
const T = o.value;
|
|
270
|
+
if (T === null) return f;
|
|
271
271
|
if (f === "" || f === null || f === void 0) return "";
|
|
272
|
-
const
|
|
273
|
-
if (
|
|
274
|
-
const ee =
|
|
275
|
-
let ce = ee ?
|
|
272
|
+
const I = String(f).trim();
|
|
273
|
+
if (I === "") return "";
|
|
274
|
+
const ee = I.startsWith("-");
|
|
275
|
+
let ce = ee ? I.slice(1) : I;
|
|
276
276
|
const b = ce.indexOf(".");
|
|
277
277
|
if (b === -1) return f;
|
|
278
|
-
const
|
|
279
|
-
return
|
|
278
|
+
const re = ce.slice(0, b), le = ce.slice(b + 1);
|
|
279
|
+
return T === 0 ? (ee ? "-" : "") + re : le.length <= T ? f : (ee ? "-" : "") + re + "." + le.slice(0, T);
|
|
280
280
|
}, h = (f) => {
|
|
281
|
-
let
|
|
282
|
-
return l.value && (
|
|
283
|
-
}, y =
|
|
281
|
+
let T = f;
|
|
282
|
+
return l.value && (T = d(T)), a.nonNegative && (T = r(T)), o.value !== null && (T = g(T)), T;
|
|
283
|
+
}, y = V(
|
|
284
284
|
a.type === "number" ? h(a.modelValue) : a.modelValue
|
|
285
285
|
);
|
|
286
|
-
|
|
286
|
+
ie(
|
|
287
287
|
() => a.modelValue,
|
|
288
288
|
(f) => {
|
|
289
289
|
y.value = a.type === "number" ? h(f) : f, ge(() => te());
|
|
290
290
|
}
|
|
291
291
|
);
|
|
292
|
-
const
|
|
293
|
-
let
|
|
294
|
-
const
|
|
295
|
-
await ge(),
|
|
296
|
-
},
|
|
292
|
+
const C = V(), B = V(), O = V(0), $ = V(!1), E = V(!1);
|
|
293
|
+
let x = null, k = null, w = null;
|
|
294
|
+
const W = async () => {
|
|
295
|
+
await ge(), C.value?.focus();
|
|
296
|
+
}, R = async () => {
|
|
297
297
|
if (a.type === "number") {
|
|
298
298
|
const f = h(y.value);
|
|
299
299
|
f !== y.value && (y.value = f);
|
|
300
300
|
}
|
|
301
|
-
i("update:modelValue", y.value), i("input", y.value), await ge(),
|
|
302
|
-
},
|
|
301
|
+
i("update:modelValue", y.value), i("input", y.value), await ge(), Z(), te();
|
|
302
|
+
}, H = () => {
|
|
303
303
|
i("change", y.value);
|
|
304
|
-
},
|
|
305
|
-
|
|
306
|
-
},
|
|
307
|
-
|
|
308
|
-
}, se = p(() => a.clearable && !a.disabled && !!y.value &&
|
|
304
|
+
}, U = (f) => {
|
|
305
|
+
$.value = !0, i("focus", f);
|
|
306
|
+
}, M = (f) => {
|
|
307
|
+
$.value = !1, i("blur", f);
|
|
308
|
+
}, se = p(() => a.clearable && !a.disabled && !!y.value && $.value), Q = () => {
|
|
309
309
|
y.value = "", i("update:modelValue", ""), i("clear"), i("input", ""), i("change", ""), ge(() => te());
|
|
310
310
|
}, te = () => {
|
|
311
311
|
if (a.type !== "textarea" || a.disabled) {
|
|
312
|
-
|
|
312
|
+
E.value = !1;
|
|
313
313
|
return;
|
|
314
314
|
}
|
|
315
315
|
k && cancelAnimationFrame(k), k = requestAnimationFrame(() => {
|
|
316
|
-
const f =
|
|
317
|
-
if (!f || f.tagName !== "TEXTAREA" || !
|
|
318
|
-
|
|
316
|
+
const f = C.value, T = B.value;
|
|
317
|
+
if (!f || f.tagName !== "TEXTAREA" || !T) {
|
|
318
|
+
E.value = !1;
|
|
319
319
|
return;
|
|
320
320
|
}
|
|
321
|
-
const
|
|
321
|
+
const I = f;
|
|
322
322
|
if (!String(y.value)) {
|
|
323
|
-
|
|
323
|
+
E.value = !1;
|
|
324
324
|
return;
|
|
325
325
|
}
|
|
326
|
-
const ee = window.getComputedStyle(
|
|
327
|
-
|
|
326
|
+
const ee = window.getComputedStyle(I), ce = parseFloat(ee.paddingBottom) || 0, b = T.getBoundingClientRect().top - I.getBoundingClientRect().top;
|
|
327
|
+
E.value = I.scrollHeight - ce > I.scrollTop + b + 0.5;
|
|
328
328
|
});
|
|
329
329
|
}, pe = () => {
|
|
330
330
|
te();
|
|
331
|
-
},
|
|
332
|
-
|
|
333
|
-
if (
|
|
334
|
-
const f =
|
|
335
|
-
|
|
331
|
+
}, Z = () => {
|
|
332
|
+
x && cancelAnimationFrame(x), x = requestAnimationFrame(() => {
|
|
333
|
+
if (!C.value || C.value.tagName !== "INPUT") return;
|
|
334
|
+
const f = C.value, T = f.value, I = document.createElement("span");
|
|
335
|
+
I.style.position = "absolute", I.style.visibility = "hidden", I.style.whiteSpace = "pre", I.style.font = window.getComputedStyle(f).font, I.style.letterSpacing = window.getComputedStyle(f).letterSpacing, I.textContent = T || " ", document.body.appendChild(I), O.value = I.getBoundingClientRect().width, document.body.removeChild(I);
|
|
336
336
|
});
|
|
337
|
-
},
|
|
337
|
+
}, D = p(() => {
|
|
338
338
|
const f = {};
|
|
339
|
-
return
|
|
340
|
-
}),
|
|
339
|
+
return O.value > 0 && (f.position = "absolute", f.left = `${O.value + 16}px`), f;
|
|
340
|
+
}), N = async () => {
|
|
341
341
|
try {
|
|
342
342
|
y.value = await navigator.clipboard.readText(), i("update:modelValue", y.value), await ge(), te();
|
|
343
343
|
} catch (f) {
|
|
344
344
|
console.error("paste error:", f);
|
|
345
345
|
}
|
|
346
346
|
};
|
|
347
|
-
|
|
347
|
+
ie(
|
|
348
348
|
() => [a.rows, a.disabled],
|
|
349
349
|
() => ge(() => te())
|
|
350
|
-
),
|
|
350
|
+
), Pe(() => {
|
|
351
351
|
a.type === "textarea" && ge(() => {
|
|
352
|
-
te(), !(
|
|
352
|
+
te(), !(!C.value || typeof ResizeObserver > "u") && (w = new ResizeObserver(() => te()), w.observe(C.value));
|
|
353
353
|
});
|
|
354
354
|
}), It(() => {
|
|
355
|
-
k && cancelAnimationFrame(k),
|
|
355
|
+
k && cancelAnimationFrame(k), w?.disconnect();
|
|
356
356
|
});
|
|
357
|
-
const
|
|
357
|
+
const A = p(() => a.type === "number" && a.nonNegative ? 0 : void 0), q = (f) => f === "." || f === "," || f === "," || f === "。" || f === "." || f === "Decimal", J = (f) => {
|
|
358
358
|
if (a.type !== "number" || f.isComposing) return;
|
|
359
|
-
const
|
|
360
|
-
if ((a.nonNegative ||
|
|
359
|
+
const T = o.value;
|
|
360
|
+
if ((a.nonNegative || T !== null) && (f.key === "e" || f.key === "E")) {
|
|
361
361
|
f.preventDefault();
|
|
362
362
|
return;
|
|
363
363
|
}
|
|
@@ -365,95 +365,95 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
365
365
|
f.preventDefault();
|
|
366
366
|
return;
|
|
367
367
|
}
|
|
368
|
-
if (
|
|
368
|
+
if (T === 0 && q(f.key)) {
|
|
369
369
|
f.preventDefault();
|
|
370
370
|
return;
|
|
371
371
|
}
|
|
372
|
-
if (
|
|
373
|
-
const
|
|
374
|
-
c(
|
|
372
|
+
if (T !== null && T > 0 && q(f.key)) {
|
|
373
|
+
const I = f.target;
|
|
374
|
+
c(I.value).includes(".") && f.preventDefault();
|
|
375
375
|
return;
|
|
376
376
|
}
|
|
377
|
-
if (
|
|
378
|
-
const
|
|
377
|
+
if (T !== null && T > 0 && f.key !== "." && /^\d$/.test(f.key)) {
|
|
378
|
+
const I = f.target, ee = c(I.value), ce = I.selectionStart, b = I.selectionEnd;
|
|
379
379
|
if (ce === null || b === null) return;
|
|
380
|
-
const
|
|
381
|
-
|
|
380
|
+
const re = ee.slice(0, ce) + f.key + ee.slice(b), le = re.indexOf(".");
|
|
381
|
+
le !== -1 && re.slice(le + 1).replace(/\D/g, "").length > T && f.preventDefault();
|
|
382
382
|
}
|
|
383
383
|
};
|
|
384
384
|
return t({
|
|
385
|
-
focus:
|
|
386
|
-
updateTextWidth:
|
|
387
|
-
}), (f,
|
|
385
|
+
focus: W,
|
|
386
|
+
updateTextWidth: Z
|
|
387
|
+
}), (f, T) => e.type !== "textarea" ? (u(), m("div", {
|
|
388
388
|
key: 0,
|
|
389
|
-
class:
|
|
389
|
+
class: X(["cregis-input", {
|
|
390
390
|
[`cregis-input--${e.size}`]: e.size,
|
|
391
391
|
"is-disabled": e.disabled,
|
|
392
392
|
"is-prefix": f.$slots.prefix,
|
|
393
393
|
"is-suffix": f.$slots.suffix
|
|
394
394
|
}]),
|
|
395
|
-
style:
|
|
395
|
+
style: G([{ width: e.width }, e.inputStyle])
|
|
396
396
|
}, [
|
|
397
|
-
|
|
398
|
-
class:
|
|
397
|
+
z("div", {
|
|
398
|
+
class: X(["cregis-input__wrapper", { "is-focus": $.value }])
|
|
399
399
|
}, [
|
|
400
400
|
f.$slots.prefix ? (u(), m("span", pa, [
|
|
401
401
|
ae(f.$slots, "prefix")
|
|
402
402
|
])) : j("", !0),
|
|
403
|
-
|
|
403
|
+
Fe(z("input", Be({
|
|
404
404
|
class: "cregis-input__inner",
|
|
405
|
-
"onUpdate:modelValue":
|
|
405
|
+
"onUpdate:modelValue": T[0] || (T[0] = (I) => y.value = I),
|
|
406
406
|
ref_key: "inputRef",
|
|
407
|
-
ref:
|
|
407
|
+
ref: C,
|
|
408
408
|
type: s.value,
|
|
409
409
|
inputmode: v.value,
|
|
410
|
-
placeholder: e.placeholder ||
|
|
410
|
+
placeholder: e.placeholder || Y(he)("input.placeholder")
|
|
411
411
|
}, f.$attrs, {
|
|
412
|
-
min:
|
|
412
|
+
min: A.value,
|
|
413
413
|
spellcheck: "false",
|
|
414
414
|
disabled: e.disabled,
|
|
415
|
-
onInput:
|
|
416
|
-
onChange:
|
|
417
|
-
onFocus:
|
|
418
|
-
onBlur:
|
|
415
|
+
onInput: R,
|
|
416
|
+
onChange: H,
|
|
417
|
+
onFocus: U,
|
|
418
|
+
onBlur: M,
|
|
419
419
|
onKeydown: J
|
|
420
420
|
}), null, 16, ma), [
|
|
421
421
|
[Gn, y.value]
|
|
422
422
|
]),
|
|
423
423
|
e.unit && y.value ? (u(), m("span", {
|
|
424
424
|
key: 1,
|
|
425
|
-
style:
|
|
425
|
+
style: G(D.value),
|
|
426
426
|
class: "cregis-input__unit"
|
|
427
|
-
},
|
|
427
|
+
}, F(e.unit), 5)) : j("", !0),
|
|
428
428
|
f.$slots.suffix || se.value ? (u(), m("span", ha, [
|
|
429
429
|
ae(f.$slots, "suffix"),
|
|
430
|
-
se.value ? (u(), de(
|
|
430
|
+
se.value ? (u(), de(_e, {
|
|
431
431
|
key: 0,
|
|
432
|
-
icon:
|
|
432
|
+
icon: Y(ea),
|
|
433
433
|
"icon-type": "square",
|
|
434
434
|
onClick: Q,
|
|
435
|
-
onMousedown:
|
|
435
|
+
onMousedown: T[1] || (T[1] = He(() => {
|
|
436
436
|
}, ["prevent"]))
|
|
437
437
|
}, null, 8, ["icon"])) : j("", !0)
|
|
438
438
|
])) : j("", !0)
|
|
439
439
|
], 2)
|
|
440
440
|
], 6)) : (u(), m("div", {
|
|
441
441
|
key: 1,
|
|
442
|
-
class:
|
|
443
|
-
style:
|
|
442
|
+
class: X(["cregis-textarea", { "is-disabled": e.disabled }]),
|
|
443
|
+
style: G([{ width: e.width }, e.inputStyle])
|
|
444
444
|
}, [
|
|
445
|
-
|
|
445
|
+
Fe(z("textarea", Be({ class: "cregis-textarea__wrapper" }, f.$attrs, {
|
|
446
446
|
spellcheck: "false",
|
|
447
447
|
ref_key: "inputRef",
|
|
448
|
-
ref:
|
|
448
|
+
ref: C,
|
|
449
449
|
disabled: e.disabled,
|
|
450
|
-
placeholder: e.placeholder ||
|
|
450
|
+
placeholder: e.placeholder || Y(he)("input.placeholder"),
|
|
451
451
|
rows: e.rows,
|
|
452
|
-
"onUpdate:modelValue":
|
|
453
|
-
onInput:
|
|
454
|
-
onChange:
|
|
455
|
-
onFocus:
|
|
456
|
-
onBlur:
|
|
452
|
+
"onUpdate:modelValue": T[2] || (T[2] = (I) => y.value = I),
|
|
453
|
+
onInput: R,
|
|
454
|
+
onChange: H,
|
|
455
|
+
onFocus: U,
|
|
456
|
+
onBlur: M,
|
|
457
457
|
onScroll: pe
|
|
458
458
|
}), null, 16, ga), [
|
|
459
459
|
[Zn, y.value]
|
|
@@ -461,21 +461,21 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
461
461
|
e.disabled ? j("", !0) : (u(), m("div", {
|
|
462
462
|
key: 0,
|
|
463
463
|
ref_key: "textareaButtonsRef",
|
|
464
|
-
ref:
|
|
465
|
-
class:
|
|
464
|
+
ref: B,
|
|
465
|
+
class: X(["cregis-textarea__buttons", { "has-bg": E.value }])
|
|
466
466
|
}, [
|
|
467
|
-
ne(
|
|
467
|
+
ne(_e, {
|
|
468
468
|
class: "cregis-textarea__button",
|
|
469
469
|
link: "",
|
|
470
470
|
size: "small",
|
|
471
|
-
onClick:
|
|
471
|
+
onClick: N
|
|
472
472
|
}, {
|
|
473
473
|
default: ve(() => [
|
|
474
|
-
ye(
|
|
474
|
+
ye(F(e.pasteText), 1)
|
|
475
475
|
]),
|
|
476
476
|
_: 1
|
|
477
477
|
}),
|
|
478
|
-
ne(
|
|
478
|
+
ne(_e, {
|
|
479
479
|
class: "cregis-textarea__button",
|
|
480
480
|
link: "",
|
|
481
481
|
size: "small",
|
|
@@ -483,7 +483,7 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
483
483
|
onClick: Q
|
|
484
484
|
}, {
|
|
485
485
|
default: ve(() => [
|
|
486
|
-
ye(
|
|
486
|
+
ye(F(e.clearText), 1)
|
|
487
487
|
]),
|
|
488
488
|
_: 1
|
|
489
489
|
}, 8, ["disabled"])
|
|
@@ -495,7 +495,7 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
495
495
|
"stroke-width": "1",
|
|
496
496
|
fill: "none",
|
|
497
497
|
"fill-rule": "evenodd"
|
|
498
|
-
}, wa = { transform: "translate(-394.000000, -457.000000)" }, xa = { transform: "translate(394.000000, 457.000000)" }, ka = ["width", "height"],
|
|
498
|
+
}, wa = { transform: "translate(-394.000000, -457.000000)" }, xa = { transform: "translate(394.000000, 457.000000)" }, ka = ["width", "height"], Ln = /* @__PURE__ */ oe({
|
|
499
499
|
__name: "checked-basis",
|
|
500
500
|
props: {
|
|
501
501
|
size: { default: "16px" }
|
|
@@ -509,16 +509,16 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
509
509
|
xmlns: "http://www.w3.org/2000/svg",
|
|
510
510
|
"xmlns:xlink": "http://www.w3.org/1999/xlink"
|
|
511
511
|
}, [
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
512
|
+
z("g", ya, [
|
|
513
|
+
z("g", wa, [
|
|
514
|
+
z("g", xa, [
|
|
515
|
+
z("rect", {
|
|
516
516
|
x: "0",
|
|
517
517
|
y: "0",
|
|
518
518
|
width: e.size,
|
|
519
519
|
height: e.size
|
|
520
520
|
}, null, 8, ka),
|
|
521
|
-
n[0] || (n[0] =
|
|
521
|
+
n[0] || (n[0] = z("path", {
|
|
522
522
|
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",
|
|
523
523
|
fill: "currentColor",
|
|
524
524
|
"fill-rule": "nonzero"
|
|
@@ -528,7 +528,7 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
528
528
|
])
|
|
529
529
|
], 8, ba));
|
|
530
530
|
}
|
|
531
|
-
}),
|
|
531
|
+
}), Sa = {
|
|
532
532
|
key: 0,
|
|
533
533
|
class: "cregis-checkbox--indeterminate"
|
|
534
534
|
}, qt = /* @__PURE__ */ oe({
|
|
@@ -546,7 +546,7 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
546
546
|
const n = e, a = t, i = p(() => n.modelValue), r = () => {
|
|
547
547
|
n.disabled || a("update:modelValue", !i.value);
|
|
548
548
|
};
|
|
549
|
-
return
|
|
549
|
+
return ie(
|
|
550
550
|
() => i.value,
|
|
551
551
|
() => {
|
|
552
552
|
a("change", i.value);
|
|
@@ -555,25 +555,25 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
555
555
|
class: "cregis-checkbox__wrapper",
|
|
556
556
|
onClick: r
|
|
557
557
|
}, [
|
|
558
|
-
|
|
559
|
-
class:
|
|
558
|
+
z("div", {
|
|
559
|
+
class: X(["cregis-checkbox", {
|
|
560
560
|
"is-disabled": e.disabled,
|
|
561
561
|
"is-checked": i.value,
|
|
562
562
|
"is-circle": e.circle,
|
|
563
563
|
"is-indeterminate": e.indeterminate
|
|
564
564
|
}])
|
|
565
565
|
}, [
|
|
566
|
-
e.indeterminate ? (u(), m("div",
|
|
566
|
+
e.indeterminate ? (u(), m("div", Sa)) : (u(), de(Ln, {
|
|
567
567
|
key: 1,
|
|
568
568
|
size: "10px"
|
|
569
569
|
}))
|
|
570
570
|
], 2),
|
|
571
571
|
o.$slots.default || e.label ? (u(), m("span", {
|
|
572
572
|
key: 0,
|
|
573
|
-
class:
|
|
573
|
+
class: X(["cregis-checkbox__label", { "is-disabled": e.disabled }])
|
|
574
574
|
}, [
|
|
575
575
|
ae(o.$slots, "default", {}, () => [
|
|
576
|
-
ye(
|
|
576
|
+
ye(F(e.label), 1)
|
|
577
577
|
])
|
|
578
578
|
], 2)) : j("", !0)
|
|
579
579
|
]));
|
|
@@ -596,20 +596,20 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
596
596
|
class: "cregis-radio__wrapper",
|
|
597
597
|
onClick: r
|
|
598
598
|
}, [
|
|
599
|
-
|
|
600
|
-
class:
|
|
599
|
+
z("div", {
|
|
600
|
+
class: X(["cregis-radio", {
|
|
601
601
|
"is-disabled": e.disabled,
|
|
602
602
|
"is-checked": i.value
|
|
603
603
|
}])
|
|
604
604
|
}, [...l[0] || (l[0] = [
|
|
605
|
-
|
|
605
|
+
z("div", { class: "cregis-radio__inner" }, null, -1)
|
|
606
606
|
])], 2),
|
|
607
607
|
o.$slots.default || e.label ? (u(), m("span", {
|
|
608
608
|
key: 0,
|
|
609
|
-
class:
|
|
609
|
+
class: X(["cregis-radio__label", { "is-disabled": e.disabled }])
|
|
610
610
|
}, [
|
|
611
611
|
ae(o.$slots, "default", {}, () => [
|
|
612
|
-
ye(
|
|
612
|
+
ye(F(e.label), 1)
|
|
613
613
|
])
|
|
614
614
|
], 2)) : j("", !0)
|
|
615
615
|
]));
|
|
@@ -646,58 +646,121 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
646
646
|
margin: n.value
|
|
647
647
|
});
|
|
648
648
|
return (i, r) => (u(), m("div", {
|
|
649
|
-
class:
|
|
649
|
+
class: X(["cregis-divider", {
|
|
650
650
|
[`cregis-divider--${e.direction}`]: e.direction
|
|
651
651
|
}]),
|
|
652
|
-
style:
|
|
652
|
+
style: G(a.value)
|
|
653
653
|
}, null, 6));
|
|
654
654
|
}
|
|
655
|
-
}),
|
|
655
|
+
}), En = Symbol("TABS_KEY"), $a = ["onClick"], Ca = { style: { display: "none" } }, Nl = /* @__PURE__ */ oe({
|
|
656
656
|
name: "Tabs",
|
|
657
657
|
__name: "Tabs",
|
|
658
658
|
props: {
|
|
659
659
|
modelValue: {},
|
|
660
660
|
type: { default: "default" },
|
|
661
|
-
size: { default: "medium" }
|
|
661
|
+
size: { default: "medium" },
|
|
662
|
+
width: {}
|
|
662
663
|
},
|
|
663
664
|
emits: ["update:modelValue"],
|
|
664
|
-
setup(e) {
|
|
665
|
-
const
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
665
|
+
setup(e, { emit: t }) {
|
|
666
|
+
const n = e, a = t;
|
|
667
|
+
function i(O) {
|
|
668
|
+
a("update:modelValue", O);
|
|
669
|
+
}
|
|
670
|
+
const r = V(null), o = je([]);
|
|
671
|
+
let l = 0;
|
|
672
|
+
function s() {
|
|
673
|
+
return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
674
|
+
}
|
|
675
|
+
function v() {
|
|
676
|
+
l && (cancelAnimationFrame(l), l = 0);
|
|
677
|
+
}
|
|
678
|
+
function c(O, $) {
|
|
679
|
+
const E = O.scrollLeft, x = $ - E;
|
|
680
|
+
if (Math.abs(x) < 1) return;
|
|
681
|
+
v();
|
|
682
|
+
const k = 220, w = performance.now(), W = (H) => 1 - (1 - H) ** 3, R = (H) => {
|
|
683
|
+
const U = Math.min(1, (H - w) / k);
|
|
684
|
+
O.scrollLeft = E + x * W(U), U < 1 ? l = requestAnimationFrame(R) : l = 0;
|
|
685
|
+
};
|
|
686
|
+
l = requestAnimationFrame(R);
|
|
687
|
+
}
|
|
688
|
+
function d(O = !0) {
|
|
689
|
+
const $ = r.value;
|
|
690
|
+
if (!$) return;
|
|
691
|
+
const E = $.querySelector(".cregis-tabs__item.is-active");
|
|
692
|
+
if (!E) return;
|
|
693
|
+
const x = E.offsetLeft, k = x + E.offsetWidth, w = $.scrollLeft, W = w + $.clientWidth;
|
|
694
|
+
let R = w;
|
|
695
|
+
if (x < w)
|
|
696
|
+
R = x;
|
|
697
|
+
else if (k > W)
|
|
698
|
+
R = k - $.clientWidth;
|
|
699
|
+
else
|
|
700
|
+
return;
|
|
701
|
+
O && !s() ? c($, R) : (v(), $.scrollLeft = R);
|
|
702
|
+
}
|
|
703
|
+
function g(O) {
|
|
704
|
+
const $ = r.value;
|
|
705
|
+
if (!$ || $.scrollWidth <= $.clientWidth || Math.abs(O.deltaX) >= Math.abs(O.deltaY)) return;
|
|
706
|
+
const E = $.scrollWidth - $.clientWidth, x = Math.max(0, Math.min(E, $.scrollLeft + O.deltaY));
|
|
707
|
+
x !== $.scrollLeft && (O.preventDefault(), v(), $.scrollLeft = x);
|
|
708
|
+
}
|
|
709
|
+
ie(
|
|
710
|
+
() => n.modelValue,
|
|
711
|
+
() => {
|
|
712
|
+
d(!0);
|
|
713
|
+
},
|
|
714
|
+
{ flush: "post" }
|
|
715
|
+
), Pe(() => {
|
|
716
|
+
r.value?.addEventListener("wheel", g, { passive: !1 }), ge(() => d(!1));
|
|
717
|
+
}), ze(() => {
|
|
718
|
+
v(), r.value?.removeEventListener("wheel", g);
|
|
719
|
+
});
|
|
720
|
+
const h = (O) => {
|
|
721
|
+
o.some(($) => $.name === O.name) || o.push(O);
|
|
722
|
+
}, y = (O) => {
|
|
723
|
+
const $ = o.findIndex((E) => E.name === O);
|
|
724
|
+
$ !== -1 && o.splice($, 1);
|
|
725
|
+
}, C = p(() => {
|
|
726
|
+
if (!(n.width === void 0 || n.width === ""))
|
|
727
|
+
return {
|
|
728
|
+
width: typeof n.width == "number" ? `${n.width}px` : n.width
|
|
729
|
+
};
|
|
730
|
+
}), B = p(() => n.type === "card" ? n.size === "large" ? {
|
|
671
731
|
borderRadius: "13px"
|
|
672
|
-
} :
|
|
732
|
+
} : n.size === "medium" ? {
|
|
673
733
|
borderRadius: "11px"
|
|
674
734
|
} : {
|
|
675
735
|
borderRadius: "9px"
|
|
676
736
|
} : {
|
|
677
737
|
borderRadius: 0
|
|
678
738
|
});
|
|
679
|
-
return Nt(
|
|
680
|
-
activeName: ht(
|
|
681
|
-
registerTab:
|
|
682
|
-
unregisterTab:
|
|
683
|
-
}), (
|
|
684
|
-
|
|
739
|
+
return Nt(En, {
|
|
740
|
+
activeName: ht(n, "modelValue"),
|
|
741
|
+
registerTab: h,
|
|
742
|
+
unregisterTab: y
|
|
743
|
+
}), (O, $) => (u(), m("div", {
|
|
744
|
+
ref_key: "tabsRef",
|
|
745
|
+
ref: r,
|
|
746
|
+
class: X(["cregis-tabs", {
|
|
685
747
|
[`cregis-tabs--${e.type}`]: e.type,
|
|
686
748
|
[`cregis-tabs--${e.size}`]: e.size
|
|
687
|
-
}])
|
|
749
|
+
}]),
|
|
750
|
+
style: G(C.value)
|
|
688
751
|
}, [
|
|
689
|
-
(u(!0), m(
|
|
690
|
-
key:
|
|
691
|
-
class:
|
|
692
|
-
style:
|
|
693
|
-
onClick: (
|
|
752
|
+
(u(!0), m(Le, null, Ve(o, (E) => (u(), m("div", {
|
|
753
|
+
key: E.name,
|
|
754
|
+
class: X(["cregis-tabs__item", { "is-active": e.modelValue === E.name }]),
|
|
755
|
+
style: G(B.value),
|
|
756
|
+
onClick: (x) => i(E.name)
|
|
694
757
|
}, [
|
|
695
|
-
|
|
696
|
-
], 14,
|
|
697
|
-
|
|
698
|
-
ae(
|
|
758
|
+
z("span", null, F(E.label), 1)
|
|
759
|
+
], 14, $a))), 128)),
|
|
760
|
+
z("div", Ca, [
|
|
761
|
+
ae(O.$slots, "default")
|
|
699
762
|
])
|
|
700
|
-
],
|
|
763
|
+
], 6));
|
|
701
764
|
}
|
|
702
765
|
}), jl = /* @__PURE__ */ oe({
|
|
703
766
|
name: "TabPane",
|
|
@@ -707,22 +770,22 @@ const Tn = () => (zt || (zt = Kn({
|
|
|
707
770
|
name: {}
|
|
708
771
|
},
|
|
709
772
|
setup(e) {
|
|
710
|
-
const t = e, n = jt(
|
|
773
|
+
const t = e, n = jt(En);
|
|
711
774
|
if (!n) throw new Error("TabPane must be used within Tabs");
|
|
712
|
-
return
|
|
775
|
+
return Pe(() => {
|
|
713
776
|
n.registerTab({ label: t.label, name: t.name });
|
|
714
|
-
}),
|
|
777
|
+
}), ie(
|
|
715
778
|
() => t.label,
|
|
716
779
|
(a) => {
|
|
717
780
|
n.unregisterTab(t.name), n.registerTab({ label: a, name: t.name });
|
|
718
781
|
}
|
|
719
|
-
),
|
|
782
|
+
), ze(() => {
|
|
720
783
|
n.unregisterTab(t.name);
|
|
721
784
|
}), (a, i) => null;
|
|
722
785
|
}
|
|
723
786
|
});
|
|
724
787
|
let gt = 1e5;
|
|
725
|
-
const Yt = () => (gt = gt + 1, gt),
|
|
788
|
+
const Yt = () => (gt = gt + 1, gt), _l = (e) => {
|
|
726
789
|
gt = e;
|
|
727
790
|
}, Oa = {
|
|
728
791
|
key: 1,
|
|
@@ -739,7 +802,7 @@ const Yt = () => (gt = gt + 1, gt), Hl = (e) => {
|
|
|
739
802
|
onVanish: {}
|
|
740
803
|
},
|
|
741
804
|
setup(e) {
|
|
742
|
-
const t = e, n =
|
|
805
|
+
const t = e, n = V(!1);
|
|
743
806
|
let a;
|
|
744
807
|
const i = p(() => ({
|
|
745
808
|
zIndex: Yt()
|
|
@@ -755,8 +818,8 @@ const Yt = () => (gt = gt + 1, gt), Hl = (e) => {
|
|
|
755
818
|
}), ge(() => {
|
|
756
819
|
n.value = !0;
|
|
757
820
|
}), (l, s) => (u(), m("div", {
|
|
758
|
-
class:
|
|
759
|
-
style:
|
|
821
|
+
class: X(["cregis-message__wrapper", { "cregis-message__wrapper--success": e.type === "success" }]),
|
|
822
|
+
style: G(i.value)
|
|
760
823
|
}, [
|
|
761
824
|
ne(st, {
|
|
762
825
|
name: "cregis-message",
|
|
@@ -766,17 +829,17 @@ const Yt = () => (gt = gt + 1, gt), Hl = (e) => {
|
|
|
766
829
|
default: ve(() => [
|
|
767
830
|
n.value && e.type !== "success" ? (u(), m("div", {
|
|
768
831
|
key: 0,
|
|
769
|
-
class:
|
|
832
|
+
class: X(["cregis-message", { "cregis-message--danger": e.type === "danger" }]),
|
|
770
833
|
role: "status",
|
|
771
834
|
"aria-live": "polite"
|
|
772
|
-
},
|
|
773
|
-
|
|
774
|
-
ne(
|
|
835
|
+
}, F(e.message), 3)) : n.value && e.type === "success" ? (u(), m("div", Oa, [
|
|
836
|
+
z("div", Ta, [
|
|
837
|
+
ne(Y(Cn), {
|
|
775
838
|
size: "16px",
|
|
776
839
|
color: "var(--material-same-white-primary)"
|
|
777
840
|
})
|
|
778
841
|
]),
|
|
779
|
-
|
|
842
|
+
z("p", null, F(e.message), 1)
|
|
780
843
|
])) : j("", !0)
|
|
781
844
|
]),
|
|
782
845
|
_: 1
|
|
@@ -784,8 +847,8 @@ const Yt = () => (gt = gt + 1, gt), Hl = (e) => {
|
|
|
784
847
|
], 6));
|
|
785
848
|
}
|
|
786
849
|
});
|
|
787
|
-
let
|
|
788
|
-
function
|
|
850
|
+
let Lt = !1;
|
|
851
|
+
function La(e) {
|
|
789
852
|
return typeof e == "string" ? { message: e, duration: 1e3, type: "default" } : {
|
|
790
853
|
message: e.message,
|
|
791
854
|
duration: e.duration ?? 1e3,
|
|
@@ -793,28 +856,28 @@ function Ea(e) {
|
|
|
793
856
|
};
|
|
794
857
|
}
|
|
795
858
|
function cn(e) {
|
|
796
|
-
if (
|
|
797
|
-
const { message: t, duration: n, type: a } =
|
|
798
|
-
|
|
859
|
+
if (Lt) return;
|
|
860
|
+
const { message: t, duration: n, type: a } = La(e);
|
|
861
|
+
Lt = !0;
|
|
799
862
|
const i = document.createElement("div");
|
|
800
863
|
document.body.appendChild(i), Ue(
|
|
801
|
-
|
|
864
|
+
_t(za, {
|
|
802
865
|
message: t,
|
|
803
866
|
duration: n,
|
|
804
867
|
type: a,
|
|
805
868
|
onVanish: () => {
|
|
806
|
-
|
|
869
|
+
Lt = !1, Ue(null, i), i.remove();
|
|
807
870
|
}
|
|
808
871
|
}),
|
|
809
872
|
i
|
|
810
873
|
);
|
|
811
874
|
}
|
|
812
|
-
const
|
|
875
|
+
const Ea = { class: "cregis-notification__wrapper" }, Ra = {
|
|
813
876
|
key: 0,
|
|
814
877
|
class: "cregis-notification",
|
|
815
878
|
role: "status",
|
|
816
879
|
"aria-live": "polite"
|
|
817
|
-
}, Ba = { class: "cregis-notification__content" },
|
|
880
|
+
}, Ba = { class: "cregis-notification__content" }, Wa = { class: "cregis-notification__title" }, Aa = { class: "cregis-notification__message" }, Va = /* @__PURE__ */ oe({
|
|
818
881
|
name: "Notification",
|
|
819
882
|
__name: "Notification",
|
|
820
883
|
props: {
|
|
@@ -825,7 +888,7 @@ const Ra = { class: "cregis-notification__wrapper" }, La = {
|
|
|
825
888
|
onVanish: {}
|
|
826
889
|
},
|
|
827
890
|
setup(e) {
|
|
828
|
-
const t = e, n =
|
|
891
|
+
const t = e, n = V(!1), a = () => {
|
|
829
892
|
n.value = !1;
|
|
830
893
|
}, i = () => {
|
|
831
894
|
t.onVanish?.();
|
|
@@ -833,27 +896,27 @@ const Ra = { class: "cregis-notification__wrapper" }, La = {
|
|
|
833
896
|
return It(() => {
|
|
834
897
|
}), ge(() => {
|
|
835
898
|
n.value = !0;
|
|
836
|
-
}), (r, o) => (u(), m("div",
|
|
899
|
+
}), (r, o) => (u(), m("div", Ea, [
|
|
837
900
|
ne(st, {
|
|
838
901
|
name: "cregis-notification",
|
|
839
902
|
onAfterLeave: i
|
|
840
903
|
}, {
|
|
841
904
|
default: ve(() => [
|
|
842
|
-
n.value ? (u(), m("div",
|
|
843
|
-
(u(), de(it(
|
|
905
|
+
n.value ? (u(), m("div", Ra, [
|
|
906
|
+
(u(), de(it(Y(ta)), {
|
|
844
907
|
size: "18px",
|
|
845
908
|
color: "var(--material-danger-primary)"
|
|
846
909
|
})),
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
910
|
+
z("div", Ba, [
|
|
911
|
+
z("div", Wa, F(e.title), 1),
|
|
912
|
+
z("div", Aa, F(e.message), 1)
|
|
850
913
|
]),
|
|
851
|
-
ne(
|
|
914
|
+
ne(_e, {
|
|
852
915
|
type: "sameWhite",
|
|
853
916
|
onClick: a
|
|
854
917
|
}, {
|
|
855
918
|
default: ve(() => [
|
|
856
|
-
ye(
|
|
919
|
+
ye(F(e.btnText), 1)
|
|
857
920
|
]),
|
|
858
921
|
_: 1
|
|
859
922
|
})
|
|
@@ -864,29 +927,29 @@ const Ra = { class: "cregis-notification__wrapper" }, La = {
|
|
|
864
927
|
]));
|
|
865
928
|
}
|
|
866
929
|
});
|
|
867
|
-
let
|
|
868
|
-
function
|
|
869
|
-
if (
|
|
930
|
+
let Et = !1;
|
|
931
|
+
function Fl(e) {
|
|
932
|
+
if (Et) return;
|
|
870
933
|
const { title: t, message: n, type: a, btnText: i } = e;
|
|
871
|
-
|
|
934
|
+
Et = !0;
|
|
872
935
|
const r = document.createElement("div");
|
|
873
936
|
document.body.appendChild(r), Ue(
|
|
874
|
-
|
|
937
|
+
_t(Va, {
|
|
875
938
|
title: t,
|
|
876
939
|
message: n,
|
|
877
940
|
type: a,
|
|
878
941
|
btnText: i,
|
|
879
942
|
onVanish: () => {
|
|
880
|
-
|
|
943
|
+
Et = !1, Ue(null, r), r.remove();
|
|
881
944
|
}
|
|
882
945
|
}),
|
|
883
946
|
r
|
|
884
947
|
);
|
|
885
948
|
}
|
|
886
|
-
const
|
|
949
|
+
const Pa = { class: "cregis-progress__wrapper" }, Da = { class: "cregis-progress__track-wrap" }, Ma = { class: "cregis-progress cregis-progress--striped active" }, Ia = {
|
|
887
950
|
key: 0,
|
|
888
951
|
class: "cregis-progress__sliding-block"
|
|
889
|
-
},
|
|
952
|
+
}, Hl = /* @__PURE__ */ oe({
|
|
890
953
|
name: "Progress",
|
|
891
954
|
__name: "Progress",
|
|
892
955
|
props: {
|
|
@@ -902,18 +965,18 @@ const Aa = { class: "cregis-progress__wrapper" }, Da = { class: "cregis-progress
|
|
|
902
965
|
})), i = p(() => ({
|
|
903
966
|
"--cregis-progress-tip-left": `${n.value}%`
|
|
904
967
|
})), r = p(() => `${Math.round(t.percentage)}%`);
|
|
905
|
-
return (o, l) => (u(), m("div",
|
|
906
|
-
|
|
968
|
+
return (o, l) => (u(), m("div", Pa, [
|
|
969
|
+
z("div", Da, [
|
|
907
970
|
e.showPercentage && !t.loading ? (u(), m("div", {
|
|
908
971
|
key: 0,
|
|
909
972
|
class: "cregis-progress__tip",
|
|
910
|
-
style:
|
|
973
|
+
style: G(i.value),
|
|
911
974
|
"aria-live": "polite"
|
|
912
|
-
},
|
|
913
|
-
|
|
914
|
-
|
|
975
|
+
}, F(r.value), 5)) : j("", !0),
|
|
976
|
+
z("div", Ma, [
|
|
977
|
+
z("div", {
|
|
915
978
|
class: "cregis-progress__bar",
|
|
916
|
-
style:
|
|
979
|
+
style: G(a.value)
|
|
917
980
|
}, null, 4),
|
|
918
981
|
t.loading ? (u(), m("div", Ia)) : j("", !0)
|
|
919
982
|
])
|
|
@@ -921,15 +984,15 @@ const Aa = { class: "cregis-progress__wrapper" }, Da = { class: "cregis-progress
|
|
|
921
984
|
]));
|
|
922
985
|
}
|
|
923
986
|
});
|
|
924
|
-
var we = "top", Oe = "bottom", Te = "right", xe = "left", Xt = "auto", ct = [we, Oe, Te, xe], qe = "start", rt = "end", Na = "clippingParents",
|
|
987
|
+
var we = "top", Oe = "bottom", Te = "right", xe = "left", Xt = "auto", ct = [we, Oe, Te, xe], qe = "start", rt = "end", Na = "clippingParents", Rn = "viewport", Ge = "popper", ja = "reference", un = /* @__PURE__ */ ct.reduce(function(e, t) {
|
|
925
988
|
return e.concat([t + "-" + qe, t + "-" + rt]);
|
|
926
989
|
}, []), Bn = /* @__PURE__ */ [].concat(ct, [Xt]).reduce(function(e, t) {
|
|
927
990
|
return e.concat([t, t + "-" + qe, t + "-" + rt]);
|
|
928
|
-
}, []),
|
|
991
|
+
}, []), _a = "beforeRead", Fa = "read", Ha = "afterRead", Ua = "beforeMain", qa = "main", Ya = "afterMain", Xa = "beforeWrite", Ka = "write", Ga = "afterWrite", Za = [_a, Fa, Ha, Ua, qa, Ya, Xa, Ka, Ga];
|
|
929
992
|
function Re(e) {
|
|
930
993
|
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
931
994
|
}
|
|
932
|
-
function
|
|
995
|
+
function Se(e) {
|
|
933
996
|
if (e == null)
|
|
934
997
|
return window;
|
|
935
998
|
if (e.toString() !== "[object Window]") {
|
|
@@ -938,18 +1001,18 @@ function $e(e) {
|
|
|
938
1001
|
}
|
|
939
1002
|
return e;
|
|
940
1003
|
}
|
|
941
|
-
function
|
|
942
|
-
var t =
|
|
1004
|
+
function Ne(e) {
|
|
1005
|
+
var t = Se(e).Element;
|
|
943
1006
|
return e instanceof t || e instanceof Element;
|
|
944
1007
|
}
|
|
945
1008
|
function Ce(e) {
|
|
946
|
-
var t =
|
|
1009
|
+
var t = Se(e).HTMLElement;
|
|
947
1010
|
return e instanceof t || e instanceof HTMLElement;
|
|
948
1011
|
}
|
|
949
1012
|
function Kt(e) {
|
|
950
1013
|
if (typeof ShadowRoot > "u")
|
|
951
1014
|
return !1;
|
|
952
|
-
var t =
|
|
1015
|
+
var t = Se(e).ShadowRoot;
|
|
953
1016
|
return e instanceof t || e instanceof ShadowRoot;
|
|
954
1017
|
}
|
|
955
1018
|
function Qa(e) {
|
|
@@ -997,21 +1060,21 @@ const ei = {
|
|
|
997
1060
|
function Ee(e) {
|
|
998
1061
|
return e.split("-")[0];
|
|
999
1062
|
}
|
|
1000
|
-
var
|
|
1001
|
-
function
|
|
1063
|
+
var Ie = Math.max, yt = Math.min, Ye = Math.round;
|
|
1064
|
+
function At() {
|
|
1002
1065
|
var e = navigator.userAgentData;
|
|
1003
1066
|
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
|
|
1004
1067
|
return t.brand + "/" + t.version;
|
|
1005
1068
|
}).join(" ") : navigator.userAgent;
|
|
1006
1069
|
}
|
|
1007
|
-
function
|
|
1008
|
-
return !/^((?!chrome|android).)*safari/i.test(
|
|
1070
|
+
function Wn() {
|
|
1071
|
+
return !/^((?!chrome|android).)*safari/i.test(At());
|
|
1009
1072
|
}
|
|
1010
1073
|
function Xe(e, t, n) {
|
|
1011
1074
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1012
1075
|
var a = e.getBoundingClientRect(), i = 1, r = 1;
|
|
1013
1076
|
t && Ce(e) && (i = e.offsetWidth > 0 && Ye(a.width) / e.offsetWidth || 1, r = e.offsetHeight > 0 && Ye(a.height) / e.offsetHeight || 1);
|
|
1014
|
-
var o =
|
|
1077
|
+
var o = Ne(e) ? Se(e) : window, l = o.visualViewport, s = !Wn() && n, v = (a.left + (s && l ? l.offsetLeft : 0)) / i, c = (a.top + (s && l ? l.offsetTop : 0)) / r, d = a.width / i, g = a.height / r;
|
|
1015
1078
|
return {
|
|
1016
1079
|
width: d,
|
|
1017
1080
|
height: g,
|
|
@@ -1032,7 +1095,7 @@ function Gt(e) {
|
|
|
1032
1095
|
height: a
|
|
1033
1096
|
};
|
|
1034
1097
|
}
|
|
1035
|
-
function
|
|
1098
|
+
function An(e, t) {
|
|
1036
1099
|
var n = t.getRootNode && t.getRootNode();
|
|
1037
1100
|
if (e.contains(t))
|
|
1038
1101
|
return !0;
|
|
@@ -1046,14 +1109,14 @@ function Pn(e, t) {
|
|
|
1046
1109
|
}
|
|
1047
1110
|
return !1;
|
|
1048
1111
|
}
|
|
1049
|
-
function
|
|
1050
|
-
return
|
|
1112
|
+
function We(e) {
|
|
1113
|
+
return Se(e).getComputedStyle(e);
|
|
1051
1114
|
}
|
|
1052
1115
|
function ti(e) {
|
|
1053
1116
|
return ["table", "td", "th"].indexOf(Re(e)) >= 0;
|
|
1054
1117
|
}
|
|
1055
|
-
function
|
|
1056
|
-
return ((
|
|
1118
|
+
function De(e) {
|
|
1119
|
+
return ((Ne(e) ? e.ownerDocument : (
|
|
1057
1120
|
// $FlowFixMe[prop-missing]
|
|
1058
1121
|
e.document
|
|
1059
1122
|
)) || window.document).documentElement;
|
|
@@ -1067,23 +1130,23 @@ function Ct(e) {
|
|
|
1067
1130
|
e.parentNode || // DOM Element detected
|
|
1068
1131
|
(Kt(e) ? e.host : null) || // ShadowRoot detected
|
|
1069
1132
|
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
1070
|
-
|
|
1133
|
+
De(e)
|
|
1071
1134
|
);
|
|
1072
1135
|
}
|
|
1073
1136
|
function dn(e) {
|
|
1074
1137
|
return !Ce(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
1075
|
-
|
|
1138
|
+
We(e).position === "fixed" ? null : e.offsetParent;
|
|
1076
1139
|
}
|
|
1077
1140
|
function ni(e) {
|
|
1078
|
-
var t = /firefox/i.test(
|
|
1141
|
+
var t = /firefox/i.test(At()), n = /Trident/i.test(At());
|
|
1079
1142
|
if (n && Ce(e)) {
|
|
1080
|
-
var a =
|
|
1143
|
+
var a = We(e);
|
|
1081
1144
|
if (a.position === "fixed")
|
|
1082
1145
|
return null;
|
|
1083
1146
|
}
|
|
1084
1147
|
var i = Ct(e);
|
|
1085
1148
|
for (Kt(i) && (i = i.host); Ce(i) && ["html", "body"].indexOf(Re(i)) < 0; ) {
|
|
1086
|
-
var r =
|
|
1149
|
+
var r = We(i);
|
|
1087
1150
|
if (r.transform !== "none" || r.perspective !== "none" || r.contain === "paint" || ["transform", "perspective"].indexOf(r.willChange) !== -1 || t && r.willChange === "filter" || t && r.filter && r.filter !== "none")
|
|
1088
1151
|
return i;
|
|
1089
1152
|
i = i.parentNode;
|
|
@@ -1091,21 +1154,21 @@ function ni(e) {
|
|
|
1091
1154
|
return null;
|
|
1092
1155
|
}
|
|
1093
1156
|
function ut(e) {
|
|
1094
|
-
for (var t =
|
|
1157
|
+
for (var t = Se(e), n = dn(e); n && ti(n) && We(n).position === "static"; )
|
|
1095
1158
|
n = dn(n);
|
|
1096
|
-
return n && (Re(n) === "html" || Re(n) === "body" &&
|
|
1159
|
+
return n && (Re(n) === "html" || Re(n) === "body" && We(n).position === "static") ? t : n || ni(e) || t;
|
|
1097
1160
|
}
|
|
1098
1161
|
function Zt(e) {
|
|
1099
1162
|
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
1100
1163
|
}
|
|
1101
1164
|
function et(e, t, n) {
|
|
1102
|
-
return
|
|
1165
|
+
return Ie(e, yt(t, n));
|
|
1103
1166
|
}
|
|
1104
1167
|
function ai(e, t, n) {
|
|
1105
1168
|
var a = et(e, t, n);
|
|
1106
1169
|
return a > n ? n : a;
|
|
1107
1170
|
}
|
|
1108
|
-
function
|
|
1171
|
+
function Vn() {
|
|
1109
1172
|
return {
|
|
1110
1173
|
top: 0,
|
|
1111
1174
|
right: 0,
|
|
@@ -1113,8 +1176,8 @@ function Wn() {
|
|
|
1113
1176
|
left: 0
|
|
1114
1177
|
};
|
|
1115
1178
|
}
|
|
1116
|
-
function
|
|
1117
|
-
return Object.assign({},
|
|
1179
|
+
function Pn(e) {
|
|
1180
|
+
return Object.assign({}, Vn(), e);
|
|
1118
1181
|
}
|
|
1119
1182
|
function Dn(e, t) {
|
|
1120
1183
|
return t.reduce(function(n, a) {
|
|
@@ -1124,18 +1187,18 @@ function Dn(e, t) {
|
|
|
1124
1187
|
var ii = function(t, n) {
|
|
1125
1188
|
return t = typeof t == "function" ? t(Object.assign({}, n.rects, {
|
|
1126
1189
|
placement: n.placement
|
|
1127
|
-
})) : t,
|
|
1190
|
+
})) : t, Pn(typeof t != "number" ? t : Dn(t, ct));
|
|
1128
1191
|
};
|
|
1129
1192
|
function ri(e) {
|
|
1130
1193
|
var t, n = e.state, a = e.name, i = e.options, r = n.elements.arrow, o = n.modifiersData.popperOffsets, l = Ee(n.placement), s = Zt(l), v = [xe, Te].indexOf(l) >= 0, c = v ? "height" : "width";
|
|
1131
1194
|
if (!(!r || !o)) {
|
|
1132
|
-
var d = ii(i.padding, n), g = Gt(r), h = s === "y" ? we : xe, y = s === "y" ? Oe : Te,
|
|
1133
|
-
n.modifiersData[a] = (t = {}, t[
|
|
1195
|
+
var d = ii(i.padding, n), g = Gt(r), h = s === "y" ? we : xe, y = s === "y" ? Oe : Te, C = n.rects.reference[c] + n.rects.reference[s] - o[s] - n.rects.popper[c], B = o[s] - n.rects.reference[s], O = ut(r), $ = O ? s === "y" ? O.clientHeight || 0 : O.clientWidth || 0 : 0, E = C / 2 - B / 2, x = d[h], k = $ - g[c] - d[y], w = $ / 2 - g[c] / 2 + E, W = et(x, w, k), R = s;
|
|
1196
|
+
n.modifiersData[a] = (t = {}, t[R] = W, t.centerOffset = W - w, t);
|
|
1134
1197
|
}
|
|
1135
1198
|
}
|
|
1136
1199
|
function li(e) {
|
|
1137
1200
|
var t = e.state, n = e.options, a = n.element, i = a === void 0 ? "[data-popper-arrow]" : a;
|
|
1138
|
-
i != null && (typeof i == "string" && (i = t.elements.popper.querySelector(i), !i) ||
|
|
1201
|
+
i != null && (typeof i == "string" && (i = t.elements.popper.querySelector(i), !i) || An(t.elements.popper, i) && (t.elements.arrow = i));
|
|
1139
1202
|
}
|
|
1140
1203
|
const oi = {
|
|
1141
1204
|
name: "arrow",
|
|
@@ -1163,48 +1226,48 @@ function ci(e, t) {
|
|
|
1163
1226
|
};
|
|
1164
1227
|
}
|
|
1165
1228
|
function fn(e) {
|
|
1166
|
-
var t, n = e.popper, a = e.popperRect, i = e.placement, r = e.variation, o = e.offsets, l = e.position, s = e.gpuAcceleration, v = e.adaptive, c = e.roundOffsets, d = e.isFixed, g = o.x, h = g === void 0 ? 0 : g, y = o.y,
|
|
1229
|
+
var t, n = e.popper, a = e.popperRect, i = e.placement, r = e.variation, o = e.offsets, l = e.position, s = e.gpuAcceleration, v = e.adaptive, c = e.roundOffsets, d = e.isFixed, g = o.x, h = g === void 0 ? 0 : g, y = o.y, C = y === void 0 ? 0 : y, B = typeof c == "function" ? c({
|
|
1167
1230
|
x: h,
|
|
1168
|
-
y:
|
|
1231
|
+
y: C
|
|
1169
1232
|
}) : {
|
|
1170
1233
|
x: h,
|
|
1171
|
-
y:
|
|
1234
|
+
y: C
|
|
1172
1235
|
};
|
|
1173
|
-
h =
|
|
1174
|
-
var
|
|
1236
|
+
h = B.x, C = B.y;
|
|
1237
|
+
var O = o.hasOwnProperty("x"), $ = o.hasOwnProperty("y"), E = xe, x = we, k = window;
|
|
1175
1238
|
if (v) {
|
|
1176
|
-
var
|
|
1177
|
-
if (
|
|
1178
|
-
|
|
1179
|
-
var
|
|
1239
|
+
var w = ut(n), W = "clientHeight", R = "clientWidth";
|
|
1240
|
+
if (w === Se(n) && (w = De(n), We(w).position !== "static" && l === "absolute" && (W = "scrollHeight", R = "scrollWidth")), w = w, i === we || (i === xe || i === Te) && r === rt) {
|
|
1241
|
+
x = Oe;
|
|
1242
|
+
var H = d && w === k && k.visualViewport ? k.visualViewport.height : (
|
|
1180
1243
|
// $FlowFixMe[prop-missing]
|
|
1181
|
-
|
|
1244
|
+
w[W]
|
|
1182
1245
|
);
|
|
1183
|
-
|
|
1246
|
+
C -= H - a.height, C *= s ? 1 : -1;
|
|
1184
1247
|
}
|
|
1185
1248
|
if (i === xe || (i === we || i === Oe) && r === rt) {
|
|
1186
|
-
|
|
1187
|
-
var
|
|
1249
|
+
E = Te;
|
|
1250
|
+
var U = d && w === k && k.visualViewport ? k.visualViewport.width : (
|
|
1188
1251
|
// $FlowFixMe[prop-missing]
|
|
1189
|
-
|
|
1252
|
+
w[R]
|
|
1190
1253
|
);
|
|
1191
|
-
h -=
|
|
1254
|
+
h -= U - a.width, h *= s ? 1 : -1;
|
|
1192
1255
|
}
|
|
1193
1256
|
}
|
|
1194
|
-
var
|
|
1257
|
+
var M = Object.assign({
|
|
1195
1258
|
position: l
|
|
1196
1259
|
}, v && si), se = c === !0 ? ci({
|
|
1197
1260
|
x: h,
|
|
1198
|
-
y:
|
|
1199
|
-
},
|
|
1261
|
+
y: C
|
|
1262
|
+
}, Se(n)) : {
|
|
1200
1263
|
x: h,
|
|
1201
|
-
y:
|
|
1264
|
+
y: C
|
|
1202
1265
|
};
|
|
1203
|
-
if (h = se.x,
|
|
1266
|
+
if (h = se.x, C = se.y, s) {
|
|
1204
1267
|
var Q;
|
|
1205
|
-
return Object.assign({},
|
|
1268
|
+
return Object.assign({}, M, (Q = {}, Q[x] = $ ? "0" : "", Q[E] = O ? "0" : "", Q.transform = (k.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + C + "px)" : "translate3d(" + h + "px, " + C + "px, 0)", Q));
|
|
1206
1269
|
}
|
|
1207
|
-
return Object.assign({},
|
|
1270
|
+
return Object.assign({}, M, (t = {}, t[x] = $ ? C + "px" : "", t[E] = O ? h + "px" : "", t.transform = "", t));
|
|
1208
1271
|
}
|
|
1209
1272
|
function ui(e) {
|
|
1210
1273
|
var t = e.state, n = e.options, a = n.gpuAcceleration, i = a === void 0 ? !0 : a, r = n.adaptive, o = r === void 0 ? !0 : r, l = n.roundOffsets, s = l === void 0 ? !0 : l, v = {
|
|
@@ -1240,7 +1303,7 @@ var pt = {
|
|
|
1240
1303
|
passive: !0
|
|
1241
1304
|
};
|
|
1242
1305
|
function fi(e) {
|
|
1243
|
-
var t = e.state, n = e.instance, a = e.options, i = a.scroll, r = i === void 0 ? !0 : i, o = a.resize, l = o === void 0 ? !0 : o, s =
|
|
1306
|
+
var t = e.state, n = e.instance, a = e.options, i = a.scroll, r = i === void 0 ? !0 : i, o = a.resize, l = o === void 0 ? !0 : o, s = Se(t.elements.popper), v = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
1244
1307
|
return r && v.forEach(function(c) {
|
|
1245
1308
|
c.addEventListener("scroll", n.update, pt);
|
|
1246
1309
|
}), l && s.addEventListener("resize", n.update, pt), function() {
|
|
@@ -1279,20 +1342,20 @@ function vn(e) {
|
|
|
1279
1342
|
});
|
|
1280
1343
|
}
|
|
1281
1344
|
function Qt(e) {
|
|
1282
|
-
var t =
|
|
1345
|
+
var t = Se(e), n = t.pageXOffset, a = t.pageYOffset;
|
|
1283
1346
|
return {
|
|
1284
1347
|
scrollLeft: n,
|
|
1285
1348
|
scrollTop: a
|
|
1286
1349
|
};
|
|
1287
1350
|
}
|
|
1288
1351
|
function Jt(e) {
|
|
1289
|
-
return Xe(
|
|
1352
|
+
return Xe(De(e)).left + Qt(e).scrollLeft;
|
|
1290
1353
|
}
|
|
1291
1354
|
function hi(e, t) {
|
|
1292
|
-
var n =
|
|
1355
|
+
var n = Se(e), a = De(e), i = n.visualViewport, r = a.clientWidth, o = a.clientHeight, l = 0, s = 0;
|
|
1293
1356
|
if (i) {
|
|
1294
1357
|
r = i.width, o = i.height;
|
|
1295
|
-
var v =
|
|
1358
|
+
var v = Wn();
|
|
1296
1359
|
(v || !v && t === "fixed") && (l = i.offsetLeft, s = i.offsetTop);
|
|
1297
1360
|
}
|
|
1298
1361
|
return {
|
|
@@ -1303,8 +1366,8 @@ function hi(e, t) {
|
|
|
1303
1366
|
};
|
|
1304
1367
|
}
|
|
1305
1368
|
function gi(e) {
|
|
1306
|
-
var t, n =
|
|
1307
|
-
return
|
|
1369
|
+
var t, n = De(e), a = Qt(e), i = (t = e.ownerDocument) == null ? void 0 : t.body, r = Ie(n.scrollWidth, n.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), o = Ie(n.scrollHeight, n.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), l = -a.scrollLeft + Jt(e), s = -a.scrollTop;
|
|
1370
|
+
return We(i || n).direction === "rtl" && (l += Ie(n.clientWidth, i ? i.clientWidth : 0) - r), {
|
|
1308
1371
|
width: r,
|
|
1309
1372
|
height: o,
|
|
1310
1373
|
x: l,
|
|
@@ -1312,7 +1375,7 @@ function gi(e) {
|
|
|
1312
1375
|
};
|
|
1313
1376
|
}
|
|
1314
1377
|
function en(e) {
|
|
1315
|
-
var t =
|
|
1378
|
+
var t = We(e), n = t.overflow, a = t.overflowX, i = t.overflowY;
|
|
1316
1379
|
return /auto|scroll|overlay|hidden/.test(n + i + a);
|
|
1317
1380
|
}
|
|
1318
1381
|
function Mn(e) {
|
|
@@ -1321,13 +1384,13 @@ function Mn(e) {
|
|
|
1321
1384
|
function tt(e, t) {
|
|
1322
1385
|
var n;
|
|
1323
1386
|
t === void 0 && (t = []);
|
|
1324
|
-
var a = Mn(e), i = a === ((n = e.ownerDocument) == null ? void 0 : n.body), r =
|
|
1387
|
+
var a = Mn(e), i = a === ((n = e.ownerDocument) == null ? void 0 : n.body), r = Se(a), o = i ? [r].concat(r.visualViewport || [], en(a) ? a : []) : a, l = t.concat(o);
|
|
1325
1388
|
return i ? l : (
|
|
1326
1389
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
1327
1390
|
l.concat(tt(Ct(o)))
|
|
1328
1391
|
);
|
|
1329
1392
|
}
|
|
1330
|
-
function
|
|
1393
|
+
function Vt(e) {
|
|
1331
1394
|
return Object.assign({}, e, {
|
|
1332
1395
|
left: e.x,
|
|
1333
1396
|
top: e.y,
|
|
@@ -1340,18 +1403,18 @@ function bi(e, t) {
|
|
|
1340
1403
|
return n.top = n.top + e.clientTop, n.left = n.left + e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n;
|
|
1341
1404
|
}
|
|
1342
1405
|
function pn(e, t, n) {
|
|
1343
|
-
return t ===
|
|
1406
|
+
return t === Rn ? Vt(hi(e, n)) : Ne(t) ? bi(t, n) : Vt(gi(De(e)));
|
|
1344
1407
|
}
|
|
1345
1408
|
function yi(e) {
|
|
1346
|
-
var t = tt(Ct(e)), n = ["absolute", "fixed"].indexOf(
|
|
1347
|
-
return
|
|
1348
|
-
return
|
|
1409
|
+
var t = tt(Ct(e)), n = ["absolute", "fixed"].indexOf(We(e).position) >= 0, a = n && Ce(e) ? ut(e) : e;
|
|
1410
|
+
return Ne(a) ? t.filter(function(i) {
|
|
1411
|
+
return Ne(i) && An(i, a) && Re(i) !== "body";
|
|
1349
1412
|
}) : [];
|
|
1350
1413
|
}
|
|
1351
1414
|
function wi(e, t, n, a) {
|
|
1352
1415
|
var i = t === "clippingParents" ? yi(e) : [].concat(t), r = [].concat(i, [n]), o = r[0], l = r.reduce(function(s, v) {
|
|
1353
1416
|
var c = pn(e, v, a);
|
|
1354
|
-
return s.top =
|
|
1417
|
+
return s.top = Ie(c.top, s.top), s.right = yt(c.right, s.right), s.bottom = yt(c.bottom, s.bottom), s.left = Ie(c.left, s.left), s;
|
|
1355
1418
|
}, pn(e, o, a));
|
|
1356
1419
|
return l.width = l.right - l.left, l.height = l.bottom - l.top, l.x = l.left, l.y = l.top, l;
|
|
1357
1420
|
}
|
|
@@ -1404,24 +1467,24 @@ function In(e) {
|
|
|
1404
1467
|
}
|
|
1405
1468
|
function lt(e, t) {
|
|
1406
1469
|
t === void 0 && (t = {});
|
|
1407
|
-
var n = t, a = n.placement, i = a === void 0 ? e.placement : a, r = n.strategy, o = r === void 0 ? e.strategy : r, l = n.boundary, s = l === void 0 ? Na : l, v = n.rootBoundary, c = v === void 0 ?
|
|
1408
|
-
reference:
|
|
1409
|
-
element:
|
|
1470
|
+
var n = t, a = n.placement, i = a === void 0 ? e.placement : a, r = n.strategy, o = r === void 0 ? e.strategy : r, l = n.boundary, s = l === void 0 ? Na : l, v = n.rootBoundary, c = v === void 0 ? Rn : v, d = n.elementContext, g = d === void 0 ? Ge : d, h = n.altBoundary, y = h === void 0 ? !1 : h, C = n.padding, B = C === void 0 ? 0 : C, O = Pn(typeof B != "number" ? B : Dn(B, ct)), $ = g === Ge ? ja : Ge, E = e.rects.popper, x = e.elements[y ? $ : g], k = wi(Ne(x) ? x : x.contextElement || De(e.elements.popper), s, c, o), w = Xe(e.elements.reference), W = In({
|
|
1471
|
+
reference: w,
|
|
1472
|
+
element: E,
|
|
1410
1473
|
placement: i
|
|
1411
|
-
}),
|
|
1412
|
-
top: k.top -
|
|
1413
|
-
bottom:
|
|
1414
|
-
left: k.left -
|
|
1415
|
-
right:
|
|
1416
|
-
},
|
|
1417
|
-
if (g === Ge &&
|
|
1418
|
-
var se =
|
|
1419
|
-
Object.keys(
|
|
1474
|
+
}), R = Vt(Object.assign({}, E, W)), H = g === Ge ? R : w, U = {
|
|
1475
|
+
top: k.top - H.top + O.top,
|
|
1476
|
+
bottom: H.bottom - k.bottom + O.bottom,
|
|
1477
|
+
left: k.left - H.left + O.left,
|
|
1478
|
+
right: H.right - k.right + O.right
|
|
1479
|
+
}, M = e.modifiersData.offset;
|
|
1480
|
+
if (g === Ge && M) {
|
|
1481
|
+
var se = M[i];
|
|
1482
|
+
Object.keys(U).forEach(function(Q) {
|
|
1420
1483
|
var te = [Te, Oe].indexOf(Q) >= 0 ? 1 : -1, pe = [we, Oe].indexOf(Q) >= 0 ? "y" : "x";
|
|
1421
|
-
|
|
1484
|
+
U[Q] += se[pe] * te;
|
|
1422
1485
|
});
|
|
1423
1486
|
}
|
|
1424
|
-
return
|
|
1487
|
+
return U;
|
|
1425
1488
|
}
|
|
1426
1489
|
function xi(e, t) {
|
|
1427
1490
|
t === void 0 && (t = {});
|
|
@@ -1431,16 +1494,16 @@ function xi(e, t) {
|
|
|
1431
1494
|
return v.indexOf(y) >= 0;
|
|
1432
1495
|
});
|
|
1433
1496
|
g.length === 0 && (g = d);
|
|
1434
|
-
var h = g.reduce(function(y,
|
|
1435
|
-
return y[
|
|
1436
|
-
placement:
|
|
1497
|
+
var h = g.reduce(function(y, C) {
|
|
1498
|
+
return y[C] = lt(e, {
|
|
1499
|
+
placement: C,
|
|
1437
1500
|
boundary: i,
|
|
1438
1501
|
rootBoundary: r,
|
|
1439
1502
|
padding: o
|
|
1440
|
-
})[Ee(
|
|
1503
|
+
})[Ee(C)], y;
|
|
1441
1504
|
}, {});
|
|
1442
|
-
return Object.keys(h).sort(function(y,
|
|
1443
|
-
return h[y] - h[
|
|
1505
|
+
return Object.keys(h).sort(function(y, C) {
|
|
1506
|
+
return h[y] - h[C];
|
|
1444
1507
|
});
|
|
1445
1508
|
}
|
|
1446
1509
|
function ki(e) {
|
|
@@ -1449,59 +1512,59 @@ function ki(e) {
|
|
|
1449
1512
|
var t = bt(e);
|
|
1450
1513
|
return [vn(e), t, vn(t)];
|
|
1451
1514
|
}
|
|
1452
|
-
function
|
|
1515
|
+
function Si(e) {
|
|
1453
1516
|
var t = e.state, n = e.options, a = e.name;
|
|
1454
1517
|
if (!t.modifiersData[a]._skip) {
|
|
1455
|
-
for (var i = n.mainAxis, r = i === void 0 ? !0 : i, o = n.altAxis, l = o === void 0 ? !0 : o, s = n.fallbackPlacements, v = n.padding, c = n.boundary, d = n.rootBoundary, g = n.altBoundary, h = n.flipVariations, y = h === void 0 ? !0 : h,
|
|
1456
|
-
return
|
|
1518
|
+
for (var i = n.mainAxis, r = i === void 0 ? !0 : i, o = n.altAxis, l = o === void 0 ? !0 : o, s = n.fallbackPlacements, v = n.padding, c = n.boundary, d = n.rootBoundary, g = n.altBoundary, h = n.flipVariations, y = h === void 0 ? !0 : h, C = n.allowedAutoPlacements, B = t.options.placement, O = Ee(B), $ = O === B, E = s || ($ || !y ? [bt(B)] : ki(B)), x = [B].concat(E).reduce(function(I, ee) {
|
|
1519
|
+
return I.concat(Ee(ee) === Xt ? xi(t, {
|
|
1457
1520
|
placement: ee,
|
|
1458
1521
|
boundary: c,
|
|
1459
1522
|
rootBoundary: d,
|
|
1460
1523
|
padding: v,
|
|
1461
1524
|
flipVariations: y,
|
|
1462
|
-
allowedAutoPlacements:
|
|
1525
|
+
allowedAutoPlacements: C
|
|
1463
1526
|
}) : ee);
|
|
1464
|
-
}, []), k = t.rects.reference,
|
|
1465
|
-
var
|
|
1466
|
-
placement:
|
|
1527
|
+
}, []), k = t.rects.reference, w = t.rects.popper, W = /* @__PURE__ */ new Map(), R = !0, H = x[0], U = 0; U < x.length; U++) {
|
|
1528
|
+
var M = x[U], se = Ee(M), Q = Ke(M) === qe, te = [we, Oe].indexOf(se) >= 0, pe = te ? "width" : "height", Z = lt(t, {
|
|
1529
|
+
placement: M,
|
|
1467
1530
|
boundary: c,
|
|
1468
1531
|
rootBoundary: d,
|
|
1469
1532
|
altBoundary: g,
|
|
1470
1533
|
padding: v
|
|
1471
|
-
}),
|
|
1472
|
-
k[pe] >
|
|
1473
|
-
var
|
|
1474
|
-
if (r &&
|
|
1475
|
-
return
|
|
1534
|
+
}), D = te ? Q ? Te : xe : Q ? Oe : we;
|
|
1535
|
+
k[pe] > w[pe] && (D = bt(D));
|
|
1536
|
+
var N = bt(D), A = [];
|
|
1537
|
+
if (r && A.push(Z[se] <= 0), l && A.push(Z[D] <= 0, Z[N] <= 0), A.every(function(I) {
|
|
1538
|
+
return I;
|
|
1476
1539
|
})) {
|
|
1477
|
-
|
|
1540
|
+
H = M, R = !1;
|
|
1478
1541
|
break;
|
|
1479
1542
|
}
|
|
1480
|
-
|
|
1543
|
+
W.set(M, A);
|
|
1481
1544
|
}
|
|
1482
|
-
if (
|
|
1483
|
-
for (var
|
|
1484
|
-
var ce =
|
|
1485
|
-
var
|
|
1486
|
-
if (
|
|
1487
|
-
return
|
|
1488
|
-
return
|
|
1545
|
+
if (R)
|
|
1546
|
+
for (var q = y ? 3 : 1, J = function(ee) {
|
|
1547
|
+
var ce = x.find(function(b) {
|
|
1548
|
+
var re = W.get(b);
|
|
1549
|
+
if (re)
|
|
1550
|
+
return re.slice(0, ee).every(function(le) {
|
|
1551
|
+
return le;
|
|
1489
1552
|
});
|
|
1490
1553
|
});
|
|
1491
1554
|
if (ce)
|
|
1492
|
-
return
|
|
1493
|
-
}, f =
|
|
1494
|
-
var
|
|
1495
|
-
if (
|
|
1555
|
+
return H = ce, "break";
|
|
1556
|
+
}, f = q; f > 0; f--) {
|
|
1557
|
+
var T = J(f);
|
|
1558
|
+
if (T === "break") break;
|
|
1496
1559
|
}
|
|
1497
|
-
t.placement !==
|
|
1560
|
+
t.placement !== H && (t.modifiersData[a]._skip = !0, t.placement = H, t.reset = !0);
|
|
1498
1561
|
}
|
|
1499
1562
|
}
|
|
1500
|
-
const
|
|
1563
|
+
const $i = {
|
|
1501
1564
|
name: "flip",
|
|
1502
1565
|
enabled: !0,
|
|
1503
1566
|
phase: "main",
|
|
1504
|
-
fn:
|
|
1567
|
+
fn: Si,
|
|
1505
1568
|
requiresIfExists: ["offset"],
|
|
1506
1569
|
data: {
|
|
1507
1570
|
_skip: !1
|
|
@@ -1564,14 +1627,14 @@ function zi(e) {
|
|
|
1564
1627
|
}, {}), l = o[t.placement], s = l.x, v = l.y;
|
|
1565
1628
|
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += s, t.modifiersData.popperOffsets.y += v), t.modifiersData[a] = o;
|
|
1566
1629
|
}
|
|
1567
|
-
const
|
|
1630
|
+
const Li = {
|
|
1568
1631
|
name: "offset",
|
|
1569
1632
|
enabled: !0,
|
|
1570
1633
|
phase: "main",
|
|
1571
1634
|
requires: ["popperOffsets"],
|
|
1572
1635
|
fn: zi
|
|
1573
1636
|
};
|
|
1574
|
-
function
|
|
1637
|
+
function Ei(e) {
|
|
1575
1638
|
var t = e.state, n = e.name;
|
|
1576
1639
|
t.modifiersData[n] = In({
|
|
1577
1640
|
reference: t.rects.reference,
|
|
@@ -1579,64 +1642,64 @@ function Ri(e) {
|
|
|
1579
1642
|
placement: t.placement
|
|
1580
1643
|
});
|
|
1581
1644
|
}
|
|
1582
|
-
const
|
|
1645
|
+
const Ri = {
|
|
1583
1646
|
name: "popperOffsets",
|
|
1584
1647
|
enabled: !0,
|
|
1585
1648
|
phase: "read",
|
|
1586
|
-
fn:
|
|
1649
|
+
fn: Ei,
|
|
1587
1650
|
data: {}
|
|
1588
1651
|
};
|
|
1589
1652
|
function Bi(e) {
|
|
1590
1653
|
return e === "x" ? "y" : "x";
|
|
1591
1654
|
}
|
|
1592
|
-
function
|
|
1593
|
-
var t = e.state, n = e.options, a = e.name, i = n.mainAxis, r = i === void 0 ? !0 : i, o = n.altAxis, l = o === void 0 ? !1 : o, s = n.boundary, v = n.rootBoundary, c = n.altBoundary, d = n.padding, g = n.tether, h = g === void 0 ? !0 : g, y = n.tetherOffset,
|
|
1655
|
+
function Wi(e) {
|
|
1656
|
+
var t = e.state, n = e.options, a = e.name, i = n.mainAxis, r = i === void 0 ? !0 : i, o = n.altAxis, l = o === void 0 ? !1 : o, s = n.boundary, v = n.rootBoundary, c = n.altBoundary, d = n.padding, g = n.tether, h = g === void 0 ? !0 : g, y = n.tetherOffset, C = y === void 0 ? 0 : y, B = lt(t, {
|
|
1594
1657
|
boundary: s,
|
|
1595
1658
|
rootBoundary: v,
|
|
1596
1659
|
padding: d,
|
|
1597
1660
|
altBoundary: c
|
|
1598
|
-
}),
|
|
1661
|
+
}), O = Ee(t.placement), $ = Ke(t.placement), E = !$, x = Zt(O), k = Bi(x), w = t.modifiersData.popperOffsets, W = t.rects.reference, R = t.rects.popper, H = typeof C == "function" ? C(Object.assign({}, t.rects, {
|
|
1599
1662
|
placement: t.placement
|
|
1600
|
-
})) :
|
|
1601
|
-
mainAxis:
|
|
1602
|
-
altAxis:
|
|
1663
|
+
})) : C, U = typeof H == "number" ? {
|
|
1664
|
+
mainAxis: H,
|
|
1665
|
+
altAxis: H
|
|
1603
1666
|
} : Object.assign({
|
|
1604
1667
|
mainAxis: 0,
|
|
1605
1668
|
altAxis: 0
|
|
1606
|
-
},
|
|
1669
|
+
}, H), M = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, se = {
|
|
1607
1670
|
x: 0,
|
|
1608
1671
|
y: 0
|
|
1609
1672
|
};
|
|
1610
|
-
if (
|
|
1673
|
+
if (w) {
|
|
1611
1674
|
if (r) {
|
|
1612
|
-
var Q, te =
|
|
1675
|
+
var Q, te = x === "y" ? we : xe, pe = x === "y" ? Oe : Te, Z = x === "y" ? "height" : "width", D = w[x], N = D + B[te], A = D - B[pe], q = h ? -R[Z] / 2 : 0, J = $ === qe ? W[Z] : R[Z], f = $ === qe ? -R[Z] : -W[Z], T = t.elements.arrow, I = h && T ? Gt(T) : {
|
|
1613
1676
|
width: 0,
|
|
1614
1677
|
height: 0
|
|
1615
|
-
}, ee = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding :
|
|
1616
|
-
x
|
|
1678
|
+
}, ee = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Vn(), ce = ee[te], b = ee[pe], re = et(0, W[Z], I[Z]), le = E ? W[Z] / 2 - q - re - ce - U.mainAxis : J - re - ce - U.mainAxis, ke = E ? -W[Z] / 2 + q + re + b + U.mainAxis : f + re + b + U.mainAxis, Me = t.elements.arrow && ut(t.elements.arrow), L = Me ? x === "y" ? Me.clientTop || 0 : Me.clientLeft || 0 : 0, P = (Q = M?.[x]) != null ? Q : 0, fe = D + le - P - L, ue = D + ke - P, Ae = et(h ? yt(N, fe) : N, D, h ? Ie(A, ue) : A);
|
|
1679
|
+
w[x] = Ae, se[x] = Ae - D;
|
|
1617
1680
|
}
|
|
1618
1681
|
if (l) {
|
|
1619
|
-
var dt,
|
|
1620
|
-
|
|
1682
|
+
var dt, S = x === "x" ? we : xe, K = x === "x" ? Oe : Te, _ = w[k], be = k === "y" ? "height" : "width", me = _ + B[S], ft = _ - B[K], vt = [we, xe].indexOf(O) !== -1, nn = (dt = M?.[k]) != null ? dt : 0, an = vt ? me : _ - W[be] - R[be] - nn + U.altAxis, rn = vt ? _ + W[be] + R[be] - nn - U.altAxis : ft, ln = h && vt ? ai(an, _, rn) : et(h ? an : me, _, h ? rn : ft);
|
|
1683
|
+
w[k] = ln, se[k] = ln - _;
|
|
1621
1684
|
}
|
|
1622
1685
|
t.modifiersData[a] = se;
|
|
1623
1686
|
}
|
|
1624
1687
|
}
|
|
1625
|
-
const
|
|
1688
|
+
const Ai = {
|
|
1626
1689
|
name: "preventOverflow",
|
|
1627
1690
|
enabled: !0,
|
|
1628
1691
|
phase: "main",
|
|
1629
|
-
fn:
|
|
1692
|
+
fn: Wi,
|
|
1630
1693
|
requiresIfExists: ["offset"]
|
|
1631
1694
|
};
|
|
1632
|
-
function
|
|
1695
|
+
function Vi(e) {
|
|
1633
1696
|
return {
|
|
1634
1697
|
scrollLeft: e.scrollLeft,
|
|
1635
1698
|
scrollTop: e.scrollTop
|
|
1636
1699
|
};
|
|
1637
1700
|
}
|
|
1638
|
-
function
|
|
1639
|
-
return e ===
|
|
1701
|
+
function Pi(e) {
|
|
1702
|
+
return e === Se(e) || !Ce(e) ? Qt(e) : Vi(e);
|
|
1640
1703
|
}
|
|
1641
1704
|
function Di(e) {
|
|
1642
1705
|
var t = e.getBoundingClientRect(), n = Ye(t.width) / e.offsetWidth || 1, a = Ye(t.height) / e.offsetHeight || 1;
|
|
@@ -1644,7 +1707,7 @@ function Di(e) {
|
|
|
1644
1707
|
}
|
|
1645
1708
|
function Mi(e, t, n) {
|
|
1646
1709
|
n === void 0 && (n = !1);
|
|
1647
|
-
var a = Ce(t), i = Ce(t) && Di(t), r =
|
|
1710
|
+
var a = Ce(t), i = Ce(t) && Di(t), r = De(t), o = Xe(e, i, n), l = {
|
|
1648
1711
|
scrollLeft: 0,
|
|
1649
1712
|
scrollTop: 0
|
|
1650
1713
|
}, s = {
|
|
@@ -1652,7 +1715,7 @@ function Mi(e, t, n) {
|
|
|
1652
1715
|
y: 0
|
|
1653
1716
|
};
|
|
1654
1717
|
return (a || !a && !n) && ((Re(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
1655
|
-
en(r)) && (l =
|
|
1718
|
+
en(r)) && (l = Pi(t)), Ce(t) ? (s = Xe(t, !0), s.x += t.clientLeft, s.y += t.clientTop) : r && (s.x = Jt(r))), {
|
|
1656
1719
|
x: o.left + l.scrollLeft - s.x,
|
|
1657
1720
|
y: o.top + l.scrollTop - s.y,
|
|
1658
1721
|
width: o.width,
|
|
@@ -1696,7 +1759,7 @@ function ji(e) {
|
|
|
1696
1759
|
})), t;
|
|
1697
1760
|
};
|
|
1698
1761
|
}
|
|
1699
|
-
function
|
|
1762
|
+
function _i(e) {
|
|
1700
1763
|
var t = e.reduce(function(n, a) {
|
|
1701
1764
|
var i = n[a.name];
|
|
1702
1765
|
return n[a.name] = i ? Object.assign({}, i, a, {
|
|
@@ -1720,7 +1783,7 @@ function bn() {
|
|
|
1720
1783
|
return !(a && typeof a.getBoundingClientRect == "function");
|
|
1721
1784
|
});
|
|
1722
1785
|
}
|
|
1723
|
-
function
|
|
1786
|
+
function Fi(e) {
|
|
1724
1787
|
e === void 0 && (e = {});
|
|
1725
1788
|
var t = e, n = t.defaultModifiers, a = n === void 0 ? [] : n, i = t.defaultOptions, r = i === void 0 ? gn : i;
|
|
1726
1789
|
return function(l, s, v) {
|
|
@@ -1738,15 +1801,15 @@ function _i(e) {
|
|
|
1738
1801
|
styles: {}
|
|
1739
1802
|
}, d = [], g = !1, h = {
|
|
1740
1803
|
state: c,
|
|
1741
|
-
setOptions: function(
|
|
1742
|
-
var
|
|
1743
|
-
|
|
1744
|
-
reference:
|
|
1804
|
+
setOptions: function(O) {
|
|
1805
|
+
var $ = typeof O == "function" ? O(c.options) : O;
|
|
1806
|
+
C(), c.options = Object.assign({}, r, c.options, $), c.scrollParents = {
|
|
1807
|
+
reference: Ne(l) ? tt(l) : l.contextElement ? tt(l.contextElement) : [],
|
|
1745
1808
|
popper: tt(s)
|
|
1746
1809
|
};
|
|
1747
|
-
var
|
|
1748
|
-
return c.orderedModifiers =
|
|
1749
|
-
return
|
|
1810
|
+
var E = Ni(_i([].concat(a, c.options.modifiers)));
|
|
1811
|
+
return c.orderedModifiers = E.filter(function(x) {
|
|
1812
|
+
return x.enabled;
|
|
1750
1813
|
}), y(), h.update();
|
|
1751
1814
|
},
|
|
1752
1815
|
// Sync update – it will always be executed, even if not necessary. This
|
|
@@ -1756,24 +1819,24 @@ function _i(e) {
|
|
|
1756
1819
|
// prefer the async Popper#update method
|
|
1757
1820
|
forceUpdate: function() {
|
|
1758
1821
|
if (!g) {
|
|
1759
|
-
var
|
|
1760
|
-
if (bn(
|
|
1822
|
+
var O = c.elements, $ = O.reference, E = O.popper;
|
|
1823
|
+
if (bn($, E)) {
|
|
1761
1824
|
c.rects = {
|
|
1762
|
-
reference: Mi(
|
|
1763
|
-
popper: Gt(
|
|
1764
|
-
}, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(
|
|
1765
|
-
return c.modifiersData[
|
|
1825
|
+
reference: Mi($, ut(E), c.options.strategy === "fixed"),
|
|
1826
|
+
popper: Gt(E)
|
|
1827
|
+
}, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(U) {
|
|
1828
|
+
return c.modifiersData[U.name] = Object.assign({}, U.data);
|
|
1766
1829
|
});
|
|
1767
|
-
for (var
|
|
1830
|
+
for (var x = 0; x < c.orderedModifiers.length; x++) {
|
|
1768
1831
|
if (c.reset === !0) {
|
|
1769
|
-
c.reset = !1,
|
|
1832
|
+
c.reset = !1, x = -1;
|
|
1770
1833
|
continue;
|
|
1771
1834
|
}
|
|
1772
|
-
var k = c.orderedModifiers[
|
|
1773
|
-
typeof
|
|
1835
|
+
var k = c.orderedModifiers[x], w = k.fn, W = k.options, R = W === void 0 ? {} : W, H = k.name;
|
|
1836
|
+
typeof w == "function" && (c = w({
|
|
1774
1837
|
state: c,
|
|
1775
|
-
options:
|
|
1776
|
-
name:
|
|
1838
|
+
options: R,
|
|
1839
|
+
name: H,
|
|
1777
1840
|
instance: h
|
|
1778
1841
|
}) || c);
|
|
1779
1842
|
}
|
|
@@ -1783,45 +1846,45 @@ function _i(e) {
|
|
|
1783
1846
|
// Async and optimistically optimized update – it will not be executed if
|
|
1784
1847
|
// not necessary (debounced to run at most once-per-tick)
|
|
1785
1848
|
update: ji(function() {
|
|
1786
|
-
return new Promise(function(
|
|
1787
|
-
h.forceUpdate(),
|
|
1849
|
+
return new Promise(function(B) {
|
|
1850
|
+
h.forceUpdate(), B(c);
|
|
1788
1851
|
});
|
|
1789
1852
|
}),
|
|
1790
1853
|
destroy: function() {
|
|
1791
|
-
|
|
1854
|
+
C(), g = !0;
|
|
1792
1855
|
}
|
|
1793
1856
|
};
|
|
1794
1857
|
if (!bn(l, s))
|
|
1795
1858
|
return h;
|
|
1796
|
-
h.setOptions(v).then(function(
|
|
1797
|
-
!g && v.onFirstUpdate && v.onFirstUpdate(
|
|
1859
|
+
h.setOptions(v).then(function(B) {
|
|
1860
|
+
!g && v.onFirstUpdate && v.onFirstUpdate(B);
|
|
1798
1861
|
});
|
|
1799
1862
|
function y() {
|
|
1800
|
-
c.orderedModifiers.forEach(function(
|
|
1801
|
-
var
|
|
1802
|
-
if (typeof
|
|
1803
|
-
var k =
|
|
1863
|
+
c.orderedModifiers.forEach(function(B) {
|
|
1864
|
+
var O = B.name, $ = B.options, E = $ === void 0 ? {} : $, x = B.effect;
|
|
1865
|
+
if (typeof x == "function") {
|
|
1866
|
+
var k = x({
|
|
1804
1867
|
state: c,
|
|
1805
|
-
name:
|
|
1868
|
+
name: O,
|
|
1806
1869
|
instance: h,
|
|
1807
|
-
options:
|
|
1808
|
-
}),
|
|
1870
|
+
options: E
|
|
1871
|
+
}), w = function() {
|
|
1809
1872
|
};
|
|
1810
|
-
d.push(k ||
|
|
1873
|
+
d.push(k || w);
|
|
1811
1874
|
}
|
|
1812
1875
|
});
|
|
1813
1876
|
}
|
|
1814
|
-
function
|
|
1815
|
-
d.forEach(function(
|
|
1816
|
-
return
|
|
1877
|
+
function C() {
|
|
1878
|
+
d.forEach(function(B) {
|
|
1879
|
+
return B();
|
|
1817
1880
|
}), d = [];
|
|
1818
1881
|
}
|
|
1819
1882
|
return h;
|
|
1820
1883
|
};
|
|
1821
1884
|
}
|
|
1822
|
-
var
|
|
1823
|
-
defaultModifiers:
|
|
1824
|
-
}), Ui = typeof global == "object" && global && global.Object === Object && global, qi = typeof self == "object" && self && self.Object === Object && self, jn = Ui || qi || Function("return this")(), wt = jn.Symbol,
|
|
1885
|
+
var Hi = [vi, Ri, di, ei, Li, $i, Ai, oi, Oi], Nn = /* @__PURE__ */ Fi({
|
|
1886
|
+
defaultModifiers: Hi
|
|
1887
|
+
}), Ui = typeof global == "object" && global && global.Object === Object && global, qi = typeof self == "object" && self && self.Object === Object && self, jn = Ui || qi || Function("return this")(), wt = jn.Symbol, _n = Object.prototype, Yi = _n.hasOwnProperty, Xi = _n.toString, Ze = wt ? wt.toStringTag : void 0;
|
|
1825
1888
|
function Ki(e) {
|
|
1826
1889
|
var t = Yi.call(e, Ze), n = e[Ze];
|
|
1827
1890
|
try {
|
|
@@ -1877,75 +1940,75 @@ function xn(e) {
|
|
|
1877
1940
|
var n = ur.test(e);
|
|
1878
1941
|
return n || dr.test(e) ? fr(e.slice(2), n ? 2 : 8) : cr.test(e) ? wn : +e;
|
|
1879
1942
|
}
|
|
1880
|
-
var
|
|
1943
|
+
var Rt = function() {
|
|
1881
1944
|
return jn.Date.now();
|
|
1882
1945
|
}, vr = "Expected a function", pr = Math.max, mr = Math.min;
|
|
1883
|
-
function
|
|
1946
|
+
function Pt(e, t, n) {
|
|
1884
1947
|
var a, i, r, o, l, s, v = 0, c = !1, d = !1, g = !0;
|
|
1885
1948
|
if (typeof e != "function")
|
|
1886
1949
|
throw new TypeError(vr);
|
|
1887
1950
|
t = xn(t) || 0, xt(n) && (c = !!n.leading, d = "maxWait" in n, r = d ? pr(xn(n.maxWait) || 0, t) : r, g = "trailing" in n ? !!n.trailing : g);
|
|
1888
|
-
function h(
|
|
1889
|
-
var
|
|
1890
|
-
return a = i = void 0, v =
|
|
1951
|
+
function h(w) {
|
|
1952
|
+
var W = a, R = i;
|
|
1953
|
+
return a = i = void 0, v = w, o = e.apply(R, W), o;
|
|
1891
1954
|
}
|
|
1892
|
-
function y(
|
|
1893
|
-
return v =
|
|
1955
|
+
function y(w) {
|
|
1956
|
+
return v = w, l = setTimeout(O, t), c ? h(w) : o;
|
|
1894
1957
|
}
|
|
1895
|
-
function
|
|
1896
|
-
var
|
|
1897
|
-
return d ? mr(
|
|
1958
|
+
function C(w) {
|
|
1959
|
+
var W = w - s, R = w - v, H = t - W;
|
|
1960
|
+
return d ? mr(H, r - R) : H;
|
|
1898
1961
|
}
|
|
1899
|
-
function
|
|
1900
|
-
var
|
|
1901
|
-
return s === void 0 ||
|
|
1962
|
+
function B(w) {
|
|
1963
|
+
var W = w - s, R = w - v;
|
|
1964
|
+
return s === void 0 || W >= t || W < 0 || d && R >= r;
|
|
1902
1965
|
}
|
|
1903
|
-
function
|
|
1904
|
-
var
|
|
1905
|
-
if (
|
|
1906
|
-
return
|
|
1907
|
-
l = setTimeout(
|
|
1966
|
+
function O() {
|
|
1967
|
+
var w = Rt();
|
|
1968
|
+
if (B(w))
|
|
1969
|
+
return $(w);
|
|
1970
|
+
l = setTimeout(O, C(w));
|
|
1908
1971
|
}
|
|
1909
|
-
function
|
|
1910
|
-
return l = void 0, g && a ? h(
|
|
1972
|
+
function $(w) {
|
|
1973
|
+
return l = void 0, g && a ? h(w) : (a = i = void 0, o);
|
|
1911
1974
|
}
|
|
1912
|
-
function
|
|
1975
|
+
function E() {
|
|
1913
1976
|
l !== void 0 && clearTimeout(l), v = 0, a = s = i = l = void 0;
|
|
1914
1977
|
}
|
|
1915
|
-
function
|
|
1916
|
-
return l === void 0 ? o :
|
|
1978
|
+
function x() {
|
|
1979
|
+
return l === void 0 ? o : $(Rt());
|
|
1917
1980
|
}
|
|
1918
1981
|
function k() {
|
|
1919
|
-
var
|
|
1920
|
-
if (a = arguments, i = this, s =
|
|
1982
|
+
var w = Rt(), W = B(w);
|
|
1983
|
+
if (a = arguments, i = this, s = w, W) {
|
|
1921
1984
|
if (l === void 0)
|
|
1922
1985
|
return y(s);
|
|
1923
1986
|
if (d)
|
|
1924
|
-
return clearTimeout(l), l = setTimeout(
|
|
1987
|
+
return clearTimeout(l), l = setTimeout(O, t), h(s);
|
|
1925
1988
|
}
|
|
1926
|
-
return l === void 0 && (l = setTimeout(
|
|
1989
|
+
return l === void 0 && (l = setTimeout(O, t)), o;
|
|
1927
1990
|
}
|
|
1928
|
-
return k.cancel =
|
|
1991
|
+
return k.cancel = E, k.flush = x, k;
|
|
1929
1992
|
}
|
|
1930
1993
|
var hr = "Expected a function";
|
|
1931
1994
|
function gr(e, t, n) {
|
|
1932
1995
|
var a = !0, i = !0;
|
|
1933
1996
|
if (typeof e != "function")
|
|
1934
1997
|
throw new TypeError(hr);
|
|
1935
|
-
return xt(n) && (a = "leading" in n ? !!n.leading : a, i = "trailing" in n ? !!n.trailing : i),
|
|
1998
|
+
return xt(n) && (a = "leading" in n ? !!n.leading : a, i = "trailing" in n ? !!n.trailing : i), Pt(e, t, {
|
|
1936
1999
|
leading: a,
|
|
1937
2000
|
maxWait: t,
|
|
1938
2001
|
trailing: i
|
|
1939
2002
|
});
|
|
1940
2003
|
}
|
|
1941
|
-
function
|
|
2004
|
+
function Fn(e, t, n = {}) {
|
|
1942
2005
|
const { ignore: a = [], capture: i = !0 } = n;
|
|
1943
2006
|
let r = !1;
|
|
1944
2007
|
function o(d, g) {
|
|
1945
2008
|
return d ? d === g || d.contains(g) : !1;
|
|
1946
2009
|
}
|
|
1947
2010
|
function l(d, g) {
|
|
1948
|
-
return d.some((h) => o(
|
|
2011
|
+
return d.some((h) => o(Y(h), g));
|
|
1949
2012
|
}
|
|
1950
2013
|
function s() {
|
|
1951
2014
|
return Array.isArray(e) ? e : [e];
|
|
@@ -1962,13 +2025,13 @@ function _n(e, t, n = {}) {
|
|
|
1962
2025
|
const g = d.target;
|
|
1963
2026
|
g instanceof Node && !l(s(), g) && !l(a, g) && t(d);
|
|
1964
2027
|
}
|
|
1965
|
-
|
|
2028
|
+
Pe(() => {
|
|
1966
2029
|
document.addEventListener("pointerdown", v, i), document.addEventListener("click", c, i);
|
|
1967
|
-
}),
|
|
2030
|
+
}), ze(() => {
|
|
1968
2031
|
document.removeEventListener("pointerdown", v, i), document.removeEventListener("click", c, i);
|
|
1969
2032
|
});
|
|
1970
2033
|
}
|
|
1971
|
-
const
|
|
2034
|
+
const Hn = 1, ot = typeof window < "u" && typeof document < "u", $e = (e) => {
|
|
1972
2035
|
if (e !== void 0)
|
|
1973
2036
|
return typeof e == "function" ? e() : typeof HTMLElement < "u" && e instanceof HTMLElement ? e : e && typeof e == "object" && "value" in e ? e.value : e;
|
|
1974
2037
|
}, Je = /* @__PURE__ */ new WeakMap();
|
|
@@ -1997,35 +2060,35 @@ const Dt = () => {
|
|
|
1997
2060
|
!nt || kt.size > 0 || !ot || (nt = !1, document.fonts?.removeEventListener("loadingdone", Dt));
|
|
1998
2061
|
}, kr = (e) => (kt.add(e), wr(), () => {
|
|
1999
2062
|
kt.delete(e), xr();
|
|
2000
|
-
}),
|
|
2063
|
+
}), Sr = (e) => e.isConnected ? !(e.offsetWidth === 0 && e.offsetHeight === 0 && e.clientWidth === 0 && e.clientHeight === 0) : !1, $r = (e, t = "horizontal", n = Hn) => {
|
|
2001
2064
|
const a = e.scrollWidth - e.clientWidth > n, i = e.scrollHeight - e.clientHeight > n;
|
|
2002
2065
|
return { overflowX: a, overflowY: i, overflow: t === "vertical" ? i : t === "both" ? a || i : a };
|
|
2003
2066
|
};
|
|
2004
2067
|
function Ul(e, t = {}) {
|
|
2005
|
-
const n =
|
|
2068
|
+
const n = V(!1), a = V(!1), i = V(!1);
|
|
2006
2069
|
let r = 0, o = !1, l, s;
|
|
2007
|
-
const v = (
|
|
2008
|
-
n.value =
|
|
2070
|
+
const v = (R) => {
|
|
2071
|
+
n.value = R.overflowX, a.value = R.overflowY, i.value = R.overflow;
|
|
2009
2072
|
}, c = () => {
|
|
2010
2073
|
v({ overflowX: !1, overflowY: !1, overflow: !1 });
|
|
2011
2074
|
}, d = () => {
|
|
2012
|
-
if (o ||
|
|
2075
|
+
if (o || $e(t.enabled) === !1)
|
|
2013
2076
|
return c(), !1;
|
|
2014
|
-
const
|
|
2015
|
-
if (!
|
|
2077
|
+
const R = $e(e);
|
|
2078
|
+
if (!R)
|
|
2016
2079
|
return c(), !1;
|
|
2017
|
-
if (
|
|
2018
|
-
const
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2080
|
+
if (!Sr(R)) return i.value;
|
|
2081
|
+
const H = $r(
|
|
2082
|
+
R,
|
|
2083
|
+
$e(t.axis) ?? "horizontal",
|
|
2084
|
+
$e(t.threshold) ?? Hn
|
|
2022
2085
|
);
|
|
2023
|
-
return v(
|
|
2086
|
+
return v(H), H.overflow;
|
|
2024
2087
|
}, g = () => {
|
|
2025
2088
|
r && (ot && cancelAnimationFrame(r), r = 0);
|
|
2026
2089
|
}, h = () => (g(), d()), y = () => {
|
|
2027
2090
|
if (!o) {
|
|
2028
|
-
if (!ot ||
|
|
2091
|
+
if (!ot || $e(t.raf) === !1) {
|
|
2029
2092
|
d();
|
|
2030
2093
|
return;
|
|
2031
2094
|
}
|
|
@@ -2033,47 +2096,47 @@ function Ul(e, t = {}) {
|
|
|
2033
2096
|
r = 0, d();
|
|
2034
2097
|
}));
|
|
2035
2098
|
}
|
|
2036
|
-
},
|
|
2099
|
+
}, C = () => {
|
|
2037
2100
|
l?.(), l = void 0;
|
|
2038
|
-
},
|
|
2039
|
-
|
|
2040
|
-
},
|
|
2101
|
+
}, B = (R) => {
|
|
2102
|
+
C(), l = yr(R, y);
|
|
2103
|
+
}, O = () => {
|
|
2041
2104
|
s?.(), s = void 0;
|
|
2042
|
-
},
|
|
2043
|
-
|
|
2044
|
-
},
|
|
2105
|
+
}, $ = () => {
|
|
2106
|
+
O(), s = kr(y);
|
|
2107
|
+
}, E = ie(
|
|
2045
2108
|
() => [
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2109
|
+
$e(e),
|
|
2110
|
+
$e(t.enabled) !== !1,
|
|
2111
|
+
$e(t.observeResize) !== !1
|
|
2049
2112
|
],
|
|
2050
|
-
([
|
|
2051
|
-
if (
|
|
2113
|
+
([R, H, U]) => {
|
|
2114
|
+
if (C(), !H || !R) {
|
|
2052
2115
|
c();
|
|
2053
2116
|
return;
|
|
2054
2117
|
}
|
|
2055
|
-
|
|
2118
|
+
U && B(R), y();
|
|
2056
2119
|
},
|
|
2057
2120
|
{ flush: "post", immediate: !0 }
|
|
2058
|
-
),
|
|
2059
|
-
() => [
|
|
2121
|
+
), x = ie(
|
|
2122
|
+
() => [$e(t.axis), $e(t.threshold)],
|
|
2060
2123
|
() => y(),
|
|
2061
2124
|
{ flush: "post" }
|
|
2062
|
-
), k = t.deps ?
|
|
2063
|
-
() =>
|
|
2064
|
-
(
|
|
2065
|
-
|
|
2125
|
+
), k = t.deps ? ie(t.deps, () => y(), { flush: "post" }) : void 0, w = ie(
|
|
2126
|
+
() => $e(t.observeFonts) !== !1 && $e(t.enabled) !== !1,
|
|
2127
|
+
(R) => {
|
|
2128
|
+
R ? $() : O();
|
|
2066
2129
|
},
|
|
2067
2130
|
{ flush: "post", immediate: !0 }
|
|
2068
|
-
),
|
|
2069
|
-
o || (o = !0, g(),
|
|
2131
|
+
), W = () => {
|
|
2132
|
+
o || (o = !0, g(), C(), O(), E(), x(), k?.(), w());
|
|
2070
2133
|
};
|
|
2071
|
-
return Qn() && Jn(
|
|
2134
|
+
return Qn() && Jn(W), {
|
|
2072
2135
|
isOverflow: Ot(i),
|
|
2073
2136
|
isOverflowX: Ot(n),
|
|
2074
2137
|
isOverflowY: Ot(a),
|
|
2075
2138
|
checkOverflow: h,
|
|
2076
|
-
stop:
|
|
2139
|
+
stop: W
|
|
2077
2140
|
};
|
|
2078
2141
|
}
|
|
2079
2142
|
const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
@@ -2096,46 +2159,46 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2096
2159
|
},
|
|
2097
2160
|
emits: ["visible-change", "click-outside", "scroll"],
|
|
2098
2161
|
setup(e, { expose: t, emit: n }) {
|
|
2099
|
-
const a =
|
|
2162
|
+
const a = V(!1), i = e, r = p(() => i.preserveContentMount || a.value), o = p(() => !i.preserveContentMount || a.value), l = n, s = V(null), v = V(), c = V();
|
|
2100
2163
|
let d = null, g = je({}), h = je({}), y = je({});
|
|
2101
|
-
const
|
|
2102
|
-
const
|
|
2103
|
-
return
|
|
2104
|
-
}),
|
|
2105
|
-
const
|
|
2106
|
-
if (P != null && P !== "" && (
|
|
2164
|
+
const C = (L) => typeof L == "number" ? `${L}px` : L, B = p(() => {
|
|
2165
|
+
const L = i.maxPopperHeight;
|
|
2166
|
+
return L != null && L !== "";
|
|
2167
|
+
}), O = p(() => {
|
|
2168
|
+
const L = {}, P = i.popperWidth;
|
|
2169
|
+
if (P != null && P !== "" && (L.width = C(P)), B.value) {
|
|
2107
2170
|
const fe = i.maxPopperHeight;
|
|
2108
|
-
|
|
2171
|
+
L.maxHeight = C(fe), L.overflowY = "auto", L.scrollbarWidth = "none", L.msOverflowStyle = "none";
|
|
2109
2172
|
}
|
|
2110
|
-
return
|
|
2111
|
-
}),
|
|
2112
|
-
const
|
|
2113
|
-
if (!
|
|
2114
|
-
const P =
|
|
2115
|
-
return P instanceof HTMLElement ? P :
|
|
2116
|
-
},
|
|
2117
|
-
if (!P?.length) return
|
|
2173
|
+
return L.padding = C(i.padding), L;
|
|
2174
|
+
}), $ = () => {
|
|
2175
|
+
const L = v.value;
|
|
2176
|
+
if (!L) return null;
|
|
2177
|
+
const P = L.firstElementChild;
|
|
2178
|
+
return P instanceof HTMLElement ? P : L;
|
|
2179
|
+
}, E = (L, P) => {
|
|
2180
|
+
if (!P?.length) return L;
|
|
2118
2181
|
const fe = /* @__PURE__ */ new Map();
|
|
2119
|
-
for (const ue of
|
|
2182
|
+
for (const ue of L)
|
|
2120
2183
|
ue && "name" in ue && ue.name && fe.set(ue.name, { ...ue });
|
|
2121
2184
|
for (const ue of P) {
|
|
2122
2185
|
if (!ue || !("name" in ue) || !ue.name) continue;
|
|
2123
|
-
const
|
|
2186
|
+
const Ae = fe.get(ue.name);
|
|
2124
2187
|
fe.set(
|
|
2125
2188
|
ue.name,
|
|
2126
|
-
|
|
2127
|
-
...
|
|
2189
|
+
Ae ? {
|
|
2190
|
+
...Ae,
|
|
2128
2191
|
...ue,
|
|
2129
2192
|
options: {
|
|
2130
|
-
...
|
|
2193
|
+
...Ae.options,
|
|
2131
2194
|
...ue.options
|
|
2132
2195
|
}
|
|
2133
2196
|
} : ue
|
|
2134
2197
|
);
|
|
2135
2198
|
}
|
|
2136
2199
|
return Array.from(fe.values());
|
|
2137
|
-
},
|
|
2138
|
-
const
|
|
2200
|
+
}, x = p(() => {
|
|
2201
|
+
const L = {
|
|
2139
2202
|
placement: i.placement,
|
|
2140
2203
|
strategy: "fixed",
|
|
2141
2204
|
modifiers: [
|
|
@@ -2154,10 +2217,10 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2154
2217
|
]
|
|
2155
2218
|
}, P = i.popoverOptions;
|
|
2156
2219
|
return P ? {
|
|
2157
|
-
...
|
|
2220
|
+
...L,
|
|
2158
2221
|
...P,
|
|
2159
|
-
modifiers:
|
|
2160
|
-
} :
|
|
2222
|
+
modifiers: E(L.modifiers ?? [], P.modifiers)
|
|
2223
|
+
} : L;
|
|
2161
2224
|
}), k = [
|
|
2162
2225
|
"position",
|
|
2163
2226
|
"top",
|
|
@@ -2168,184 +2231,184 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2168
2231
|
"transform",
|
|
2169
2232
|
"will-change",
|
|
2170
2233
|
"margin"
|
|
2171
|
-
],
|
|
2234
|
+
], w = (L) => {
|
|
2172
2235
|
const P = {};
|
|
2173
2236
|
for (const fe of k) {
|
|
2174
|
-
const ue =
|
|
2237
|
+
const ue = L.style.getPropertyValue(fe);
|
|
2175
2238
|
ue && (P[fe] = ue);
|
|
2176
2239
|
}
|
|
2177
2240
|
return P;
|
|
2178
|
-
},
|
|
2241
|
+
}, W = (L, P) => {
|
|
2179
2242
|
for (const [fe, ue] of Object.entries(P))
|
|
2180
|
-
|
|
2181
|
-
},
|
|
2182
|
-
if (
|
|
2243
|
+
L.style.setProperty(fe, ue);
|
|
2244
|
+
}, R = (L) => {
|
|
2245
|
+
if (L) {
|
|
2183
2246
|
for (const P of k)
|
|
2184
|
-
|
|
2185
|
-
for (const P of [...
|
|
2186
|
-
P.name.startsWith("data-popper-") &&
|
|
2247
|
+
L.style.removeProperty(P);
|
|
2248
|
+
for (const P of [...L.attributes])
|
|
2249
|
+
P.name.startsWith("data-popper-") && L.removeAttribute(P.name);
|
|
2187
2250
|
}
|
|
2188
|
-
},
|
|
2251
|
+
}, H = () => {
|
|
2189
2252
|
i.disabled || (a.value = !0, l("visible-change", !0));
|
|
2190
|
-
},
|
|
2253
|
+
}, U = () => {
|
|
2191
2254
|
a.value = !1, l("visible-change", !1);
|
|
2192
|
-
},
|
|
2193
|
-
i.disabled || (se.cancel(),
|
|
2255
|
+
}, M = Pt(H, i.openDelay), se = Pt(U, i.closeDelay), Q = () => {
|
|
2256
|
+
i.disabled || (se.cancel(), M());
|
|
2194
2257
|
}, te = () => {
|
|
2195
|
-
|
|
2258
|
+
M.cancel(), se();
|
|
2196
2259
|
};
|
|
2197
|
-
|
|
2198
|
-
const P =
|
|
2260
|
+
Fn(s, (L) => {
|
|
2261
|
+
const P = L.target;
|
|
2199
2262
|
P instanceof Node && c.value?.contains(P) || (i.trigger === "click" && a.value && !i.manual && te(), a.value && l("click-outside", !0));
|
|
2200
2263
|
});
|
|
2201
2264
|
const pe = () => {
|
|
2202
2265
|
i.disabled || (a.value ? te() : Q());
|
|
2203
|
-
},
|
|
2266
|
+
}, Z = () => {
|
|
2204
2267
|
y = {}, i.trigger === "hover" ? (h.mouseenter = Q, g.mouseleave = te, y.mouseenter = Q, y.mouseleave = te) : i.trigger === "click" && (h.click = pe);
|
|
2205
2268
|
};
|
|
2206
|
-
let
|
|
2207
|
-
const
|
|
2208
|
-
let
|
|
2269
|
+
let D = 0;
|
|
2270
|
+
const N = [];
|
|
2271
|
+
let A = null, q = null;
|
|
2209
2272
|
const J = () => {
|
|
2210
|
-
for (
|
|
2211
|
-
const
|
|
2212
|
-
|
|
2273
|
+
for (D++; N.length; ) {
|
|
2274
|
+
const L = N.pop();
|
|
2275
|
+
L !== void 0 && cancelAnimationFrame(L);
|
|
2213
2276
|
}
|
|
2214
2277
|
}, f = () => {
|
|
2215
|
-
|
|
2216
|
-
},
|
|
2278
|
+
A?.disconnect(), q?.disconnect(), A = null, q = null;
|
|
2279
|
+
}, T = () => {
|
|
2217
2280
|
!a.value || !d || d.update();
|
|
2218
|
-
},
|
|
2281
|
+
}, I = () => {
|
|
2219
2282
|
J();
|
|
2220
|
-
const
|
|
2221
|
-
a.value && (
|
|
2222
|
-
if (
|
|
2223
|
-
|
|
2283
|
+
const L = D;
|
|
2284
|
+
a.value && (T(), ge(() => {
|
|
2285
|
+
if (L !== D || !a.value) return;
|
|
2286
|
+
T();
|
|
2224
2287
|
const P = requestAnimationFrame(() => {
|
|
2225
|
-
if (
|
|
2288
|
+
if (L !== D || !a.value) return;
|
|
2226
2289
|
const fe = requestAnimationFrame(() => {
|
|
2227
|
-
|
|
2290
|
+
L !== D || !a.value || T();
|
|
2228
2291
|
});
|
|
2229
|
-
|
|
2292
|
+
N.push(fe);
|
|
2230
2293
|
});
|
|
2231
|
-
|
|
2294
|
+
N.push(P);
|
|
2232
2295
|
}));
|
|
2233
2296
|
}, ee = () => {
|
|
2234
2297
|
if (f(), typeof ResizeObserver > "u") return;
|
|
2235
|
-
const
|
|
2236
|
-
a.value &&
|
|
2298
|
+
const L = () => {
|
|
2299
|
+
a.value && T();
|
|
2237
2300
|
};
|
|
2238
|
-
c.value && (
|
|
2239
|
-
const P =
|
|
2240
|
-
P && (
|
|
2301
|
+
c.value && (A = new ResizeObserver(L), A.observe(c.value));
|
|
2302
|
+
const P = $();
|
|
2303
|
+
P && (q = new ResizeObserver(L), q.observe(P));
|
|
2241
2304
|
}, ce = () => {
|
|
2242
|
-
const
|
|
2243
|
-
return !
|
|
2244
|
-
}, b = (
|
|
2305
|
+
const L = $(), P = c.value;
|
|
2306
|
+
return !L || !P ? !1 : d ? (d.setOptions(x.value), !0) : (R(P), d = Nn(L, P, x.value), !0);
|
|
2307
|
+
}, b = (L = !1) => {
|
|
2245
2308
|
J(), f();
|
|
2246
|
-
const P = c.value, fe =
|
|
2247
|
-
d?.destroy(), d = null, P && fe && Object.keys(fe).length &&
|
|
2248
|
-
},
|
|
2249
|
-
a.value && (d || ce(),
|
|
2309
|
+
const P = c.value, fe = L && P ? w(P) : null;
|
|
2310
|
+
d?.destroy(), d = null, P && fe && Object.keys(fe).length && W(P, fe);
|
|
2311
|
+
}, re = () => {
|
|
2312
|
+
a.value && (d || ce(), I());
|
|
2250
2313
|
};
|
|
2251
|
-
|
|
2314
|
+
ie(
|
|
2252
2315
|
() => a.value,
|
|
2253
|
-
async (
|
|
2254
|
-
if (
|
|
2316
|
+
async (L) => {
|
|
2317
|
+
if (L) {
|
|
2255
2318
|
if (!ce()) {
|
|
2256
2319
|
if (await ge(), !a.value) return;
|
|
2257
2320
|
ce();
|
|
2258
2321
|
}
|
|
2259
|
-
|
|
2322
|
+
I(), ee();
|
|
2260
2323
|
return;
|
|
2261
2324
|
}
|
|
2262
2325
|
b(!0);
|
|
2263
2326
|
},
|
|
2264
2327
|
{ flush: "post" }
|
|
2265
|
-
),
|
|
2328
|
+
), ie(
|
|
2266
2329
|
() => [i.popperWidth, i.maxPopperHeight],
|
|
2267
2330
|
() => {
|
|
2268
|
-
a.value &&
|
|
2331
|
+
a.value && I();
|
|
2269
2332
|
},
|
|
2270
2333
|
{ flush: "post" }
|
|
2271
|
-
),
|
|
2272
|
-
|
|
2334
|
+
), ie(
|
|
2335
|
+
x,
|
|
2273
2336
|
() => {
|
|
2274
|
-
!a.value || !d || (d.setOptions(
|
|
2337
|
+
!a.value || !d || (d.setOptions(x.value), I());
|
|
2275
2338
|
}
|
|
2276
|
-
),
|
|
2339
|
+
), ie(
|
|
2277
2340
|
() => i.manual,
|
|
2278
|
-
(
|
|
2279
|
-
|
|
2341
|
+
(L) => {
|
|
2342
|
+
L ? (h = {}, g = {}, y = {}) : Z();
|
|
2280
2343
|
}
|
|
2281
|
-
),
|
|
2344
|
+
), ie(
|
|
2282
2345
|
() => i.trigger,
|
|
2283
|
-
(
|
|
2284
|
-
|
|
2346
|
+
(L, P) => {
|
|
2347
|
+
L !== P && (h = {}, g = {}, y = {}, Z());
|
|
2285
2348
|
}
|
|
2286
|
-
),
|
|
2349
|
+
), ie(
|
|
2287
2350
|
() => i.teleported,
|
|
2288
2351
|
() => {
|
|
2289
|
-
i.manual ||
|
|
2352
|
+
i.manual || Z();
|
|
2290
2353
|
}
|
|
2291
|
-
),
|
|
2354
|
+
), ie(
|
|
2292
2355
|
() => i.disabled,
|
|
2293
|
-
(
|
|
2294
|
-
|
|
2356
|
+
(L) => {
|
|
2357
|
+
L && te();
|
|
2295
2358
|
}
|
|
2296
|
-
),
|
|
2297
|
-
i.manual ||
|
|
2359
|
+
), Pe(() => {
|
|
2360
|
+
i.manual || Z();
|
|
2298
2361
|
});
|
|
2299
|
-
const
|
|
2300
|
-
const P =
|
|
2362
|
+
const le = gr((L) => {
|
|
2363
|
+
const P = L.target;
|
|
2301
2364
|
l("scroll", { scrollTop: P.scrollTop, scrollLeft: P.scrollLeft });
|
|
2302
2365
|
}, Cr), ke = () => {
|
|
2303
|
-
|
|
2304
|
-
},
|
|
2305
|
-
a.value || (b(!1),
|
|
2366
|
+
T();
|
|
2367
|
+
}, Me = () => {
|
|
2368
|
+
a.value || (b(!1), R(c.value));
|
|
2306
2369
|
};
|
|
2307
|
-
return
|
|
2308
|
-
|
|
2370
|
+
return ze(() => {
|
|
2371
|
+
le.cancel(), b(!1);
|
|
2309
2372
|
}), t({
|
|
2310
2373
|
isOpen: a,
|
|
2311
2374
|
open: Q,
|
|
2312
2375
|
close: te,
|
|
2313
|
-
update:
|
|
2314
|
-
}), (
|
|
2376
|
+
update: re
|
|
2377
|
+
}), (L, P) => (u(), m("div", Be({
|
|
2315
2378
|
class: "cregis-popover",
|
|
2316
2379
|
ref_key: "popoverRef",
|
|
2317
2380
|
ref: s
|
|
2318
|
-
}, Tt(
|
|
2319
|
-
|
|
2381
|
+
}, Tt(Y(g), !0)), [
|
|
2382
|
+
z("div", Be({
|
|
2320
2383
|
class: ["cregis-popover__trigger", { "cregis-popover__trigger--disabled": e.disabled }],
|
|
2321
2384
|
ref_key: "popoverTriggerRef",
|
|
2322
2385
|
ref: v
|
|
2323
|
-
}, Tt(
|
|
2324
|
-
ae(
|
|
2386
|
+
}, Tt(Y(h), !0)), [
|
|
2387
|
+
ae(L.$slots, "reference")
|
|
2325
2388
|
], 16),
|
|
2326
|
-
(u(), de(
|
|
2389
|
+
(u(), de(Ft, {
|
|
2327
2390
|
to: "body",
|
|
2328
2391
|
disabled: !e.teleported
|
|
2329
2392
|
}, [
|
|
2330
2393
|
ne(st, {
|
|
2331
2394
|
name: "fade",
|
|
2332
2395
|
onAfterEnter: ke,
|
|
2333
|
-
onAfterLeave:
|
|
2396
|
+
onAfterLeave: Me
|
|
2334
2397
|
}, {
|
|
2335
2398
|
default: ve(() => [
|
|
2336
|
-
r.value ?
|
|
2399
|
+
r.value ? Fe((u(), m("div", Be({
|
|
2337
2400
|
key: 0,
|
|
2338
|
-
class: ["cregis-popover__content", { "cregis-popover__content--hide-scrollbar":
|
|
2401
|
+
class: ["cregis-popover__content", { "cregis-popover__content--hide-scrollbar": B.value }],
|
|
2339
2402
|
ref_key: "popoverContentRef",
|
|
2340
2403
|
ref: c,
|
|
2341
|
-
style:
|
|
2342
|
-
}, Tt(
|
|
2404
|
+
style: O.value
|
|
2405
|
+
}, Tt(Y(y), !0), {
|
|
2343
2406
|
onScroll: P[0] || (P[0] = //@ts-ignore
|
|
2344
|
-
(...fe) =>
|
|
2407
|
+
(...fe) => Y(le) && Y(le)(...fe))
|
|
2345
2408
|
}), [
|
|
2346
|
-
ae(
|
|
2409
|
+
ae(L.$slots, "default")
|
|
2347
2410
|
], 16)), [
|
|
2348
|
-
[
|
|
2411
|
+
[$t, o.value]
|
|
2349
2412
|
]) : j("", !0)
|
|
2350
2413
|
]),
|
|
2351
2414
|
_: 3
|
|
@@ -2359,13 +2422,13 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2359
2422
|
}, zr = {
|
|
2360
2423
|
key: 1,
|
|
2361
2424
|
class: "cregis-select__placeholder"
|
|
2362
|
-
},
|
|
2425
|
+
}, Lr = {
|
|
2363
2426
|
key: 0,
|
|
2364
2427
|
class: "cregis-select__dropdown-empty"
|
|
2365
|
-
},
|
|
2428
|
+
}, Er = {
|
|
2366
2429
|
key: 2,
|
|
2367
2430
|
class: "cregis-select__dropdown-filter-empty"
|
|
2368
|
-
},
|
|
2431
|
+
}, Rr = { class: "cregis-select__dropdown-content" }, ql = /* @__PURE__ */ oe({
|
|
2369
2432
|
name: "Select",
|
|
2370
2433
|
__name: "Select",
|
|
2371
2434
|
props: {
|
|
@@ -2387,7 +2450,7 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2387
2450
|
},
|
|
2388
2451
|
emits: ["update:modelValue", "change", "visible-change", "filter-input", "filter-clear"],
|
|
2389
2452
|
setup(e, { emit: t }) {
|
|
2390
|
-
const n = e, a = t, i =
|
|
2453
|
+
const n = e, a = t, i = V(null), r = V(null), o = V(!1), l = V();
|
|
2391
2454
|
let s = null, v = null;
|
|
2392
2455
|
const c = () => {
|
|
2393
2456
|
v !== null && (clearTimeout(v), v = null);
|
|
@@ -2396,22 +2459,22 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2396
2459
|
const b = r.value;
|
|
2397
2460
|
b && (l.value = b.offsetWidth + 8);
|
|
2398
2461
|
}, h = async (b) => {
|
|
2399
|
-
o.value = b, a("visible-change", b), b && d(n.triggerWidth) && (await ge(), g(), i.value?.update()), !b && n.filterable && (
|
|
2400
|
-
}, y = (b) => typeof b == "number" ? `n:${b}` : `s:${b}`,
|
|
2462
|
+
o.value = b, a("visible-change", b), b && d(n.triggerWidth) && (await ge(), g(), i.value?.update()), !b && n.filterable && (U.value = "", M.value = "", c());
|
|
2463
|
+
}, y = (b) => typeof b == "number" ? `n:${b}` : `s:${b}`, C = je({}), B = je({}), O = V(0), $ = V(null), E = (b, re, le) => {
|
|
2401
2464
|
const ke = y(b);
|
|
2402
|
-
return
|
|
2403
|
-
|
|
2465
|
+
return O.value++, C[ke] = re, B[ke] = le ?? re, () => {
|
|
2466
|
+
O.value--, delete C[ke], delete B[ke];
|
|
2404
2467
|
};
|
|
2405
|
-
},
|
|
2406
|
-
|
|
2468
|
+
}, x = p(() => O.value === 0);
|
|
2469
|
+
ie(
|
|
2407
2470
|
() => n.modelValue,
|
|
2408
2471
|
(b) => {
|
|
2409
2472
|
if (!n.multiple) {
|
|
2410
2473
|
if (b == null || b === "") {
|
|
2411
|
-
|
|
2474
|
+
$.value = null;
|
|
2412
2475
|
return;
|
|
2413
2476
|
}
|
|
2414
|
-
|
|
2477
|
+
$.value && $.value.value !== b && ($.value = null);
|
|
2415
2478
|
}
|
|
2416
2479
|
}
|
|
2417
2480
|
);
|
|
@@ -2420,93 +2483,93 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2420
2483
|
return Array.isArray(n.modelValue) && n.modelValue.length > 0;
|
|
2421
2484
|
const b = n.modelValue;
|
|
2422
2485
|
return b != null && b !== "";
|
|
2423
|
-
}),
|
|
2486
|
+
}), w = p(() => !n.multiple || !Array.isArray(n.modelValue) ? 0 : n.modelValue.length), W = p(() => {
|
|
2424
2487
|
if (!k.value) return "";
|
|
2425
2488
|
if (n.multiple)
|
|
2426
|
-
return n.modelValue.map((
|
|
2489
|
+
return n.modelValue.map((le) => C[y(le)] ?? String(le)).join("、");
|
|
2427
2490
|
const b = n.modelValue;
|
|
2428
|
-
return
|
|
2429
|
-
}),
|
|
2491
|
+
return $.value?.value === b ? $.value.label : C[y(b)] ?? String(b);
|
|
2492
|
+
}), R = (b) => n.multiple ? Array.isArray(n.modelValue) && n.modelValue.includes(b) : n.modelValue === b, H = (b, re) => {
|
|
2430
2493
|
if (!n.disabled) {
|
|
2431
2494
|
if (n.multiple) {
|
|
2432
|
-
const
|
|
2433
|
-
ke >= 0 ?
|
|
2495
|
+
const le = Array.isArray(n.modelValue) ? [...n.modelValue] : [], ke = le.indexOf(b);
|
|
2496
|
+
ke >= 0 ? le.splice(ke, 1) : le.push(b), a("update:modelValue", le), a("change", le);
|
|
2434
2497
|
return;
|
|
2435
2498
|
}
|
|
2436
|
-
|
|
2499
|
+
$.value = { value: b, label: re }, a("update:modelValue", b), a("change", b), i.value?.close();
|
|
2437
2500
|
}
|
|
2438
|
-
},
|
|
2501
|
+
}, U = V(""), M = V(""), se = p(() => M.value.trim().toLowerCase()), Q = p(() => {
|
|
2439
2502
|
const b = se.value;
|
|
2440
|
-
return !n.filterable || !b ? !0 : Object.keys(
|
|
2503
|
+
return !n.filterable || !b ? !0 : Object.keys(C).some((re) => (B[re] ?? C[re] ?? "").toLowerCase().includes(b));
|
|
2441
2504
|
}), te = p(
|
|
2442
|
-
() => n.filterable && !!se.value && !Q.value && !
|
|
2505
|
+
() => n.filterable && !!se.value && !Q.value && !x.value
|
|
2443
2506
|
), pe = () => {
|
|
2444
2507
|
n.filterable && (c(), v = setTimeout(() => {
|
|
2445
|
-
|
|
2508
|
+
M.value = U.value.trim(), v = null;
|
|
2446
2509
|
}, n.filterDebounceMs));
|
|
2447
2510
|
};
|
|
2448
|
-
|
|
2511
|
+
ie(U, () => {
|
|
2449
2512
|
n.filterable && pe();
|
|
2450
|
-
}),
|
|
2513
|
+
}), ie(
|
|
2451
2514
|
() => n.filterable,
|
|
2452
2515
|
(b) => {
|
|
2453
|
-
b || (
|
|
2516
|
+
b || (U.value = "", M.value = "", c());
|
|
2454
2517
|
}
|
|
2455
2518
|
);
|
|
2456
|
-
const
|
|
2519
|
+
const Z = () => {
|
|
2457
2520
|
s?.disconnect(), s = null, !(!d(n.triggerWidth) || !r.value) && (s = new ResizeObserver(() => {
|
|
2458
2521
|
g();
|
|
2459
2522
|
}), s.observe(r.value));
|
|
2460
2523
|
};
|
|
2461
|
-
|
|
2524
|
+
ie(
|
|
2462
2525
|
() => n.triggerWidth,
|
|
2463
2526
|
() => {
|
|
2464
2527
|
d(n.triggerWidth) ? ge(() => {
|
|
2465
|
-
g(),
|
|
2528
|
+
g(), Z();
|
|
2466
2529
|
}) : (l.value = void 0, s?.disconnect(), s = null);
|
|
2467
2530
|
}
|
|
2468
|
-
),
|
|
2531
|
+
), Pe(() => {
|
|
2469
2532
|
d(n.triggerWidth) && ge(() => {
|
|
2470
|
-
g(),
|
|
2533
|
+
g(), Z();
|
|
2471
2534
|
});
|
|
2472
|
-
}),
|
|
2535
|
+
}), ze(() => {
|
|
2473
2536
|
c(), s?.disconnect();
|
|
2474
2537
|
});
|
|
2475
|
-
const
|
|
2538
|
+
const D = (b) => {
|
|
2476
2539
|
a("filter-input", String(b ?? ""));
|
|
2477
|
-
},
|
|
2478
|
-
|
|
2540
|
+
}, N = () => {
|
|
2541
|
+
M.value = "", c(), a("filter-clear");
|
|
2479
2542
|
};
|
|
2480
2543
|
Nt(Un, {
|
|
2481
2544
|
modelValue: p(() => n.modelValue),
|
|
2482
2545
|
multiple: p(() => !!n.multiple),
|
|
2483
2546
|
disabled: p(() => !!n.disabled),
|
|
2484
|
-
selectOption:
|
|
2485
|
-
isOptionSelected:
|
|
2486
|
-
registerOption:
|
|
2547
|
+
selectOption: H,
|
|
2548
|
+
isOptionSelected: R,
|
|
2549
|
+
registerOption: E,
|
|
2487
2550
|
filterQuery: se
|
|
2488
2551
|
});
|
|
2489
|
-
const
|
|
2490
|
-
if (n.popperWidth) return
|
|
2552
|
+
const A = (b) => typeof b == "number" ? `${b}px` : b, q = p(() => {
|
|
2553
|
+
if (n.popperWidth) return A(n.popperWidth);
|
|
2491
2554
|
const b = n.triggerWidth;
|
|
2492
2555
|
return d(b) ? l.value : typeof b == "number" ? b + 8 : `calc(${b} + 8px)`;
|
|
2493
2556
|
}), J = p(() => {
|
|
2494
|
-
const b =
|
|
2557
|
+
const b = q.value;
|
|
2495
2558
|
if (!(b == null || b === ""))
|
|
2496
2559
|
return typeof b == "number" ? `${b - 12}px` : `calc(${b} - 12px)`;
|
|
2497
|
-
}), f = p(() => n.align === "center" ? "bottom" : n.align === "left" ? "bottom-start" : "bottom-end"),
|
|
2498
|
-
width:
|
|
2499
|
-
})),
|
|
2560
|
+
}), f = p(() => n.align === "center" ? "bottom" : n.align === "left" ? "bottom-start" : "bottom-end"), T = p(() => ({
|
|
2561
|
+
width: A(n.triggerWidth)
|
|
2562
|
+
})), I = p(() => n.size === "large" ? "20px" : n.size === "medium" ? "14px" : "12px"), ee = V(0), ce = (b) => {
|
|
2500
2563
|
ee.value = b.scrollTop;
|
|
2501
2564
|
};
|
|
2502
|
-
return (b,
|
|
2503
|
-
class:
|
|
2565
|
+
return (b, re) => (u(), m("div", {
|
|
2566
|
+
class: X(["cregis-select", { "is-disabled": e.disabled, "is-percent-width": d(e.triggerWidth) }])
|
|
2504
2567
|
}, [
|
|
2505
2568
|
ne(Mt, {
|
|
2506
2569
|
ref_key: "popoverRef",
|
|
2507
2570
|
ref: i,
|
|
2508
2571
|
"preserve-content-mount": "",
|
|
2509
|
-
"popper-width":
|
|
2572
|
+
"popper-width": q.value,
|
|
2510
2573
|
placement: f.value,
|
|
2511
2574
|
disabled: !!e.disabled,
|
|
2512
2575
|
padding: 0,
|
|
@@ -2515,64 +2578,64 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2515
2578
|
onScroll: ce
|
|
2516
2579
|
}, {
|
|
2517
2580
|
reference: ve(() => [
|
|
2518
|
-
|
|
2581
|
+
z("div", {
|
|
2519
2582
|
ref_key: "triggerRef",
|
|
2520
2583
|
ref: r,
|
|
2521
|
-
class:
|
|
2522
|
-
style:
|
|
2584
|
+
class: X(["cregis-select__trigger", { [`cregis-select__trigger--${e.size}`]: e.size, [`cregis-select__trigger--${e.type}`]: e.type }]),
|
|
2585
|
+
style: G(T.value)
|
|
2523
2586
|
}, [
|
|
2524
|
-
|
|
2525
|
-
class:
|
|
2587
|
+
z("div", {
|
|
2588
|
+
class: X(["cregis-select__trigger-label", { "is-multiple": e.multiple }])
|
|
2526
2589
|
}, [
|
|
2527
2590
|
k.value ? ae(b.$slots, "label", {
|
|
2528
2591
|
key: 0,
|
|
2529
2592
|
modelValue: e.modelValue,
|
|
2530
|
-
displayText:
|
|
2531
|
-
selectedCount:
|
|
2593
|
+
displayText: W.value,
|
|
2594
|
+
selectedCount: w.value,
|
|
2532
2595
|
placeholder: e.placeholder,
|
|
2533
2596
|
hasSelection: k.value
|
|
2534
2597
|
}, () => [
|
|
2535
|
-
|
|
2536
|
-
e.multiple ? (u(), m("span", Tr,
|
|
2537
|
-
]) : (u(), m("p", zr,
|
|
2598
|
+
z("p", Or, F(W.value), 1),
|
|
2599
|
+
e.multiple ? (u(), m("span", Tr, F(w.value), 1)) : j("", !0)
|
|
2600
|
+
]) : (u(), m("p", zr, F(e.placeholder), 1))
|
|
2538
2601
|
], 2),
|
|
2539
|
-
|
|
2540
|
-
class:
|
|
2602
|
+
z("span", {
|
|
2603
|
+
class: X(["cregis-select__icon", { "is-open": o.value }])
|
|
2541
2604
|
}, [
|
|
2542
|
-
ne(
|
|
2543
|
-
size:
|
|
2605
|
+
ne(Y(Ht), {
|
|
2606
|
+
size: I.value,
|
|
2544
2607
|
color: e.disabled ? "var(--text-base-quaternary)" : "var(--material-base-secondary)"
|
|
2545
2608
|
}, null, 8, ["size", "color"])
|
|
2546
2609
|
], 2)
|
|
2547
2610
|
], 6)
|
|
2548
2611
|
]),
|
|
2549
2612
|
default: ve(() => [
|
|
2550
|
-
|
|
2551
|
-
class:
|
|
2613
|
+
z("div", {
|
|
2614
|
+
class: X(["cregis-select__dropdown", { "is-empty": x.value }])
|
|
2552
2615
|
}, [
|
|
2553
|
-
|
|
2554
|
-
e.filterable && !
|
|
2616
|
+
x.value ? (u(), m("p", Lr, F(e.noDataText || Y(he)("common.noData")), 1)) : j("", !0),
|
|
2617
|
+
e.filterable && !x.value ? (u(), m("div", {
|
|
2555
2618
|
key: 1,
|
|
2556
|
-
class:
|
|
2619
|
+
class: X(["cregis-select__dropdown-filter", { "backdrop-fixed-header": ee.value > 10 }])
|
|
2557
2620
|
}, [
|
|
2558
2621
|
ne(zn, {
|
|
2559
|
-
modelValue:
|
|
2560
|
-
"onUpdate:modelValue":
|
|
2561
|
-
placeholder: e.searchText ||
|
|
2622
|
+
modelValue: U.value,
|
|
2623
|
+
"onUpdate:modelValue": re[0] || (re[0] = (le) => U.value = le),
|
|
2624
|
+
placeholder: e.searchText || Y(he)("select.search"),
|
|
2562
2625
|
width: J.value,
|
|
2563
2626
|
size: "small",
|
|
2564
2627
|
clearable: "",
|
|
2565
|
-
onInput:
|
|
2566
|
-
onClear:
|
|
2628
|
+
onInput: D,
|
|
2629
|
+
onClear: N
|
|
2567
2630
|
}, {
|
|
2568
2631
|
prefix: ve(() => [
|
|
2569
|
-
ne(
|
|
2632
|
+
ne(Y(On), { size: "14px" })
|
|
2570
2633
|
]),
|
|
2571
2634
|
_: 1
|
|
2572
2635
|
}, 8, ["modelValue", "placeholder", "width"])
|
|
2573
2636
|
], 2)) : j("", !0),
|
|
2574
|
-
te.value ? (u(), m("p",
|
|
2575
|
-
|
|
2637
|
+
te.value ? (u(), m("p", Er, F(e.noMatchText || Y(he)("select.noMatch")), 1)) : j("", !0),
|
|
2638
|
+
z("div", Rr, [
|
|
2576
2639
|
ae(b.$slots, "default")
|
|
2577
2640
|
])
|
|
2578
2641
|
], 2)
|
|
@@ -2581,7 +2644,7 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2581
2644
|
}, 8, ["popper-width", "placement", "disabled", "max-popper-height"])
|
|
2582
2645
|
], 2));
|
|
2583
2646
|
}
|
|
2584
|
-
}), Br = ["aria-selected"],
|
|
2647
|
+
}), Br = ["aria-selected"], Wr = {
|
|
2585
2648
|
key: 1,
|
|
2586
2649
|
class: "cregis-select__option-content"
|
|
2587
2650
|
}, Yl = /* @__PURE__ */ oe({
|
|
@@ -2599,7 +2662,7 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2599
2662
|
const i = () => t.filterText ?? t.label, r = () => {
|
|
2600
2663
|
a?.(), n && (a = n.registerOption(t.value, t.label, i()));
|
|
2601
2664
|
};
|
|
2602
|
-
|
|
2665
|
+
Pe(r), ze(() => a?.()), ie(() => [t.value, t.label, t.filterText], r);
|
|
2603
2666
|
const o = p(() => n?.multiple.value ?? !1), l = p(() => n?.isOptionSelected(t.value) ?? !1), s = () => {
|
|
2604
2667
|
t.disabled || n?.disabled.value || n?.selectOption(t.value, t.label);
|
|
2605
2668
|
}, v = () => {
|
|
@@ -2608,8 +2671,8 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2608
2671
|
const g = c.value;
|
|
2609
2672
|
return g ? i().toLowerCase().includes(g) : !0;
|
|
2610
2673
|
});
|
|
2611
|
-
return (g, h) =>
|
|
2612
|
-
class:
|
|
2674
|
+
return (g, h) => Fe((u(), m("div", {
|
|
2675
|
+
class: X(["cregis-select__option", {
|
|
2613
2676
|
"is-selected": l.value && !o.value,
|
|
2614
2677
|
"is-disabled": e.disabled,
|
|
2615
2678
|
"cregis-select__option--multiple": o.value
|
|
@@ -2621,19 +2684,19 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2621
2684
|
o.value ? (u(), de(qt, {
|
|
2622
2685
|
key: 0,
|
|
2623
2686
|
"model-value": l.value,
|
|
2624
|
-
disabled: e.disabled || !!
|
|
2625
|
-
onClick: h[0] || (h[0] =
|
|
2687
|
+
disabled: e.disabled || !!Y(n)?.disabled.value,
|
|
2688
|
+
onClick: h[0] || (h[0] = He(() => {
|
|
2626
2689
|
}, ["stop"])),
|
|
2627
2690
|
"onUpdate:modelValue": v
|
|
2628
2691
|
}, null, 8, ["model-value", "disabled"])) : j("", !0),
|
|
2629
|
-
o.value ? (u(), m("div",
|
|
2692
|
+
o.value ? (u(), m("div", Wr, [
|
|
2630
2693
|
ae(g.$slots, "default", {
|
|
2631
2694
|
label: e.label,
|
|
2632
2695
|
value: e.value,
|
|
2633
2696
|
disabled: !!e.disabled,
|
|
2634
2697
|
selected: l.value
|
|
2635
2698
|
}, () => [
|
|
2636
|
-
ye(
|
|
2699
|
+
ye(F(e.label), 1)
|
|
2637
2700
|
])
|
|
2638
2701
|
])) : ae(g.$slots, "default", {
|
|
2639
2702
|
key: 2,
|
|
@@ -2642,13 +2705,13 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2642
2705
|
disabled: !!e.disabled,
|
|
2643
2706
|
selected: l.value
|
|
2644
2707
|
}, () => [
|
|
2645
|
-
ye(
|
|
2708
|
+
ye(F(e.label), 1)
|
|
2646
2709
|
])
|
|
2647
2710
|
], 10, Br)), [
|
|
2648
|
-
[
|
|
2711
|
+
[$t, d.value]
|
|
2649
2712
|
]);
|
|
2650
2713
|
}
|
|
2651
|
-
}),
|
|
2714
|
+
}), Ar = { class: "cregis-cascader__trigger-label" }, Vr = { class: "cregis-cascader__selected" }, Pr = {
|
|
2652
2715
|
key: 1,
|
|
2653
2716
|
class: "cregis-cascader__placeholder"
|
|
2654
2717
|
}, Dr = {
|
|
@@ -2660,10 +2723,10 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2660
2723
|
}, Ir = { class: "cregis-cascader__dropdown-content" }, Nr = {
|
|
2661
2724
|
key: 0,
|
|
2662
2725
|
class: "cregis-cascader__dropdown-item-popover"
|
|
2663
|
-
}, jr = { class: "cregis-cascader__suboption-amount-container" },
|
|
2726
|
+
}, jr = { class: "cregis-cascader__suboption-amount-container" }, _r = {
|
|
2664
2727
|
key: 0,
|
|
2665
2728
|
class: "cregis-cascader__suboption-amount"
|
|
2666
|
-
},
|
|
2729
|
+
}, Fr = { class: "cregis-cascader__suboption-panel" }, Hr = ["onClick"], Ur = ["onClick"], Xl = /* @__PURE__ */ oe({
|
|
2667
2730
|
name: "Cascader",
|
|
2668
2731
|
__name: "Cascader",
|
|
2669
2732
|
props: {
|
|
@@ -2688,49 +2751,49 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2688
2751
|
},
|
|
2689
2752
|
emits: ["update:modelValue", "change", "visible-change", "filter-input", "filter-clear"],
|
|
2690
2753
|
setup(e, { emit: t }) {
|
|
2691
|
-
const n = e, a = t, i =
|
|
2692
|
-
K && typeof K == "object" && "close" in K && typeof K.close == "function" ? l.set(
|
|
2754
|
+
const n = e, a = t, i = V(null), r = V(!1), o = V(null), l = /* @__PURE__ */ new Map(), s = (S, K) => {
|
|
2755
|
+
K && typeof K == "object" && "close" in K && typeof K.close == "function" ? l.set(S, K) : l.delete(S);
|
|
2693
2756
|
}, v = () => {
|
|
2694
|
-
l.forEach((
|
|
2695
|
-
}, c = (
|
|
2757
|
+
l.forEach((S) => S.close()), o.value = null;
|
|
2758
|
+
}, c = (S, K) => {
|
|
2696
2759
|
if (K) {
|
|
2697
|
-
o.value =
|
|
2760
|
+
o.value = S;
|
|
2698
2761
|
return;
|
|
2699
2762
|
}
|
|
2700
|
-
o.value ===
|
|
2763
|
+
o.value === S && (o.value = null);
|
|
2701
2764
|
};
|
|
2702
2765
|
let d = null;
|
|
2703
2766
|
const g = () => {
|
|
2704
2767
|
d !== null && (clearTimeout(d), d = null);
|
|
2705
|
-
}, h =
|
|
2768
|
+
}, h = V(""), y = V(""), C = p(() => y.value.trim().toLowerCase()), B = () => {
|
|
2706
2769
|
n.filterable && (g(), d = setTimeout(() => {
|
|
2707
2770
|
y.value = h.value.trim(), d = null;
|
|
2708
2771
|
}, n.filterDebounceMs));
|
|
2709
2772
|
};
|
|
2710
|
-
|
|
2711
|
-
n.filterable &&
|
|
2712
|
-
}),
|
|
2773
|
+
ie(h, () => {
|
|
2774
|
+
n.filterable && B();
|
|
2775
|
+
}), ie(
|
|
2713
2776
|
() => n.filterable,
|
|
2714
|
-
(
|
|
2715
|
-
|
|
2777
|
+
(S) => {
|
|
2778
|
+
S || (h.value = "", y.value = "", g());
|
|
2716
2779
|
}
|
|
2717
|
-
),
|
|
2718
|
-
const
|
|
2719
|
-
a("filter-input", String(
|
|
2720
|
-
},
|
|
2780
|
+
), ze(() => g());
|
|
2781
|
+
const O = (S) => {
|
|
2782
|
+
a("filter-input", String(S ?? ""));
|
|
2783
|
+
}, $ = () => {
|
|
2721
2784
|
y.value = "", g(), a("filter-clear");
|
|
2722
|
-
},
|
|
2723
|
-
const K =
|
|
2724
|
-
return !K ||
|
|
2725
|
-
}, k = (
|
|
2726
|
-
const
|
|
2727
|
-
return !
|
|
2728
|
-
},
|
|
2729
|
-
() => n.filterable && !!y.value.trim() && !
|
|
2730
|
-
),
|
|
2731
|
-
r.value =
|
|
2732
|
-
},
|
|
2733
|
-
const K = n.options.find((
|
|
2785
|
+
}, E = (S) => (S.filterText ?? S.label).toLowerCase(), x = (S) => {
|
|
2786
|
+
const K = C.value;
|
|
2787
|
+
return !K || E(S).includes(K) ? !0 : (S.children ?? []).some((be) => E(be).includes(K));
|
|
2788
|
+
}, k = (S, K) => {
|
|
2789
|
+
const _ = C.value;
|
|
2790
|
+
return !_ || E(S).includes(_) ? !0 : E(K).includes(_);
|
|
2791
|
+
}, w = p(() => n.options.filter((S) => x(S))), W = p(() => n.options.length === 0), R = p(() => (C.value, n.options.some((S) => x(S)))), H = p(
|
|
2792
|
+
() => n.filterable && !!y.value.trim() && !R.value && !W.value
|
|
2793
|
+
), U = (S) => {
|
|
2794
|
+
r.value = S, a("visible-change", S), S || v(), !S && n.filterable && (h.value = "", y.value = "", g());
|
|
2795
|
+
}, M = V(null), se = (S) => {
|
|
2796
|
+
const K = n.options.find((_) => _.value === S);
|
|
2734
2797
|
if (K)
|
|
2735
2798
|
return {
|
|
2736
2799
|
level: 1,
|
|
@@ -2738,116 +2801,116 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2738
2801
|
primary: K,
|
|
2739
2802
|
sub: void 0
|
|
2740
2803
|
};
|
|
2741
|
-
for (const
|
|
2742
|
-
const be =
|
|
2804
|
+
for (const _ of n.options) {
|
|
2805
|
+
const be = _.children?.find((me) => me.value === S);
|
|
2743
2806
|
if (be)
|
|
2744
2807
|
return {
|
|
2745
2808
|
level: 2,
|
|
2746
2809
|
label: be.label,
|
|
2747
|
-
primary:
|
|
2810
|
+
primary: _,
|
|
2748
2811
|
sub: be
|
|
2749
2812
|
};
|
|
2750
2813
|
}
|
|
2751
2814
|
return {
|
|
2752
2815
|
level: 0,
|
|
2753
|
-
label: String(
|
|
2816
|
+
label: String(S),
|
|
2754
2817
|
primary: void 0,
|
|
2755
2818
|
sub: void 0
|
|
2756
2819
|
};
|
|
2757
2820
|
}, Q = p(() => {
|
|
2758
|
-
const
|
|
2759
|
-
return
|
|
2821
|
+
const S = n.modelValue;
|
|
2822
|
+
return S == null || S === "" ? {
|
|
2760
2823
|
level: 0,
|
|
2761
2824
|
label: "",
|
|
2762
2825
|
primary: void 0,
|
|
2763
2826
|
sub: void 0
|
|
2764
|
-
} :
|
|
2765
|
-
level:
|
|
2766
|
-
label:
|
|
2767
|
-
primary:
|
|
2768
|
-
sub:
|
|
2769
|
-
} : se(
|
|
2827
|
+
} : M.value !== null && M.value.value === S ? {
|
|
2828
|
+
level: M.value.level,
|
|
2829
|
+
label: M.value.label,
|
|
2830
|
+
primary: M.value.primary,
|
|
2831
|
+
sub: M.value.sub
|
|
2832
|
+
} : se(S);
|
|
2770
2833
|
});
|
|
2771
|
-
|
|
2834
|
+
ie(
|
|
2772
2835
|
() => n.modelValue,
|
|
2773
|
-
(
|
|
2774
|
-
if (
|
|
2775
|
-
|
|
2836
|
+
(S) => {
|
|
2837
|
+
if (S == null || S === "") {
|
|
2838
|
+
M.value = null;
|
|
2776
2839
|
return;
|
|
2777
2840
|
}
|
|
2778
|
-
|
|
2841
|
+
M.value !== null && M.value.value !== S && (M.value = null);
|
|
2779
2842
|
}
|
|
2780
2843
|
);
|
|
2781
|
-
const te = p(() => Q.value.level > 0), pe = p(() => Q.value.label),
|
|
2844
|
+
const te = p(() => Q.value.level > 0), pe = p(() => Q.value.label), Z = p(() => n.modelValue), D = p(() => pe.value), N = p(() => Q.value.level), A = p(() => Q.value.primary), q = p(() => Q.value.sub), J = (S) => (S.children?.length ?? 0) > 0, f = (S) => n.modelValue === S, T = (S) => {
|
|
2782
2845
|
const K = n.modelValue;
|
|
2783
|
-
return K == null || K === "" ? !1 : (
|
|
2784
|
-
},
|
|
2785
|
-
n.disabled ||
|
|
2786
|
-
}, ee = (
|
|
2787
|
-
n.disabled ||
|
|
2788
|
-
}, ce = (
|
|
2846
|
+
return K == null || K === "" ? !1 : (S.children ?? []).some((_) => _.value === K);
|
|
2847
|
+
}, I = (S, K) => {
|
|
2848
|
+
n.disabled || S.disabled || K.disabled || (M.value = { value: K.value, label: K.label, level: 2, primary: S, sub: K }, a("update:modelValue", K.value), a("change", K.value), v(), i.value?.close());
|
|
2849
|
+
}, ee = (S) => {
|
|
2850
|
+
n.disabled || S.disabled || J(S) || (M.value = { value: S.value, label: S.label, level: 1, primary: S }, a("update:modelValue", S.value), a("change", S.value), v(), i.value?.close());
|
|
2851
|
+
}, ce = (S) => typeof S == "number" ? `${S}px` : S, b = p(() => {
|
|
2789
2852
|
if (n.popperWidth !== void 0 && n.popperWidth !== null && n.popperWidth !== "")
|
|
2790
2853
|
return ce(n.popperWidth);
|
|
2791
|
-
const
|
|
2792
|
-
return typeof
|
|
2793
|
-
}),
|
|
2854
|
+
const S = n.triggerWidth;
|
|
2855
|
+
return typeof S == "number" ? `${S + 8}px` : `calc(${S} + 8px)`;
|
|
2856
|
+
}), re = p(() => ce(n.subPopperWidth)), le = p(() => typeof b.value == "number" ? `${b.value - 12}px` : `calc(${b.value} - 12px)`), ke = p(() => ({
|
|
2794
2857
|
maxHeight: ce(n.maxPopperHeight),
|
|
2795
2858
|
overflowY: "auto"
|
|
2796
|
-
})),
|
|
2859
|
+
})), Me = { strategy: "fixed" }, L = p(() => n.align === "center" ? "bottom" : n.align === "left" ? "bottom-start" : "bottom-end"), P = p(() => ({
|
|
2797
2860
|
width: ce(n.triggerWidth)
|
|
2798
|
-
})), fe = p(() => n.size === "large" ? "20px" : n.size === "medium" ? "14px" : "12px"), ue =
|
|
2799
|
-
const K =
|
|
2861
|
+
})), fe = p(() => n.size === "large" ? "20px" : n.size === "medium" ? "14px" : "12px"), ue = V(0), Ae = (S) => {
|
|
2862
|
+
const K = S.target;
|
|
2800
2863
|
ue.value = K.scrollTop;
|
|
2801
2864
|
}, dt = [-16, -8];
|
|
2802
|
-
return (
|
|
2803
|
-
class:
|
|
2865
|
+
return (S, K) => (u(), m("div", {
|
|
2866
|
+
class: X(["cregis-cascader", { "is-disabled": e.disabled }])
|
|
2804
2867
|
}, [
|
|
2805
2868
|
ne(Mt, {
|
|
2806
2869
|
ref_key: "popoverRef",
|
|
2807
2870
|
ref: i,
|
|
2808
2871
|
"preserve-content-mount": "",
|
|
2809
2872
|
"popper-width": b.value,
|
|
2810
|
-
placement:
|
|
2873
|
+
placement: L.value,
|
|
2811
2874
|
offset: e.offset,
|
|
2812
2875
|
disabled: !!e.disabled,
|
|
2813
2876
|
padding: 0,
|
|
2814
|
-
onVisibleChange:
|
|
2877
|
+
onVisibleChange: U
|
|
2815
2878
|
}, {
|
|
2816
2879
|
reference: ve(() => [
|
|
2817
|
-
|
|
2880
|
+
S.$slots.trigger ? ae(S.$slots, "trigger", {
|
|
2818
2881
|
key: 0,
|
|
2819
|
-
modelValue:
|
|
2820
|
-
selectedLabel:
|
|
2821
|
-
level:
|
|
2822
|
-
primaryOption:
|
|
2823
|
-
subOption:
|
|
2882
|
+
modelValue: Z.value,
|
|
2883
|
+
selectedLabel: D.value,
|
|
2884
|
+
level: N.value,
|
|
2885
|
+
primaryOption: A.value,
|
|
2886
|
+
subOption: q.value,
|
|
2824
2887
|
placeholder: e.placeholder,
|
|
2825
2888
|
hasSelection: te.value,
|
|
2826
2889
|
open: r.value,
|
|
2827
2890
|
disabled: !!e.disabled
|
|
2828
2891
|
}) : (u(), m("div", {
|
|
2829
2892
|
key: 1,
|
|
2830
|
-
class:
|
|
2831
|
-
style:
|
|
2893
|
+
class: X(["cregis-cascader__trigger", { [`cregis-cascader__trigger--${e.size}`]: e.size, [`cregis-cascader__trigger--${e.type}`]: e.type }]),
|
|
2894
|
+
style: G(P.value)
|
|
2832
2895
|
}, [
|
|
2833
|
-
|
|
2834
|
-
te.value ? ae(
|
|
2896
|
+
z("div", Ar, [
|
|
2897
|
+
te.value ? ae(S.$slots, "label", {
|
|
2835
2898
|
key: 0,
|
|
2836
|
-
modelValue:
|
|
2837
|
-
selectedLabel:
|
|
2838
|
-
level:
|
|
2839
|
-
primaryOption:
|
|
2840
|
-
subOption:
|
|
2899
|
+
modelValue: Z.value,
|
|
2900
|
+
selectedLabel: D.value,
|
|
2901
|
+
level: N.value,
|
|
2902
|
+
primaryOption: A.value,
|
|
2903
|
+
subOption: q.value,
|
|
2841
2904
|
placeholder: e.placeholder,
|
|
2842
2905
|
hasSelection: te.value
|
|
2843
2906
|
}, () => [
|
|
2844
|
-
|
|
2845
|
-
]) : (u(), m("p",
|
|
2907
|
+
z("p", Vr, F(pe.value), 1)
|
|
2908
|
+
]) : (u(), m("p", Pr, F(e.placeholder), 1))
|
|
2846
2909
|
]),
|
|
2847
|
-
|
|
2848
|
-
class:
|
|
2910
|
+
z("span", {
|
|
2911
|
+
class: X(["cregis-cascader__icon", { "is-open": r.value }])
|
|
2849
2912
|
}, [
|
|
2850
|
-
ne(
|
|
2913
|
+
ne(Y(Ht), {
|
|
2851
2914
|
size: fe.value,
|
|
2852
2915
|
color: e.disabled ? "var(--text-base-quaternary)" : "var(--material-base-secondary)"
|
|
2853
2916
|
}, null, 8, ["size", "color"])
|
|
@@ -2855,75 +2918,75 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2855
2918
|
], 6))
|
|
2856
2919
|
]),
|
|
2857
2920
|
default: ve(() => [
|
|
2858
|
-
|
|
2859
|
-
class:
|
|
2860
|
-
style:
|
|
2861
|
-
onScroll:
|
|
2921
|
+
z("div", {
|
|
2922
|
+
class: X(["cregis-cascader__dropdown", { "is-empty": W.value }]),
|
|
2923
|
+
style: G(ke.value),
|
|
2924
|
+
onScroll: Ae
|
|
2862
2925
|
}, [
|
|
2863
|
-
|
|
2864
|
-
e.filterable && !
|
|
2926
|
+
W.value ? (u(), m("p", Dr, F(e.noDataText || Y(he)("common.noData")), 1)) : j("", !0),
|
|
2927
|
+
e.filterable && !W.value ? (u(), m("div", {
|
|
2865
2928
|
key: 1,
|
|
2866
|
-
class:
|
|
2929
|
+
class: X(["cregis-cascader__dropdown-filter", { "backdrop-fixed-header": ue.value > 10 }])
|
|
2867
2930
|
}, [
|
|
2868
2931
|
ne(zn, {
|
|
2869
2932
|
modelValue: h.value,
|
|
2870
|
-
"onUpdate:modelValue": K[0] || (K[0] = (
|
|
2871
|
-
placeholder: e.searchText ||
|
|
2872
|
-
width:
|
|
2933
|
+
"onUpdate:modelValue": K[0] || (K[0] = (_) => h.value = _),
|
|
2934
|
+
placeholder: e.searchText || Y(he)("select.search"),
|
|
2935
|
+
width: le.value,
|
|
2873
2936
|
size: "small",
|
|
2874
2937
|
clearable: "",
|
|
2875
|
-
onInput:
|
|
2876
|
-
onClear:
|
|
2938
|
+
onInput: O,
|
|
2939
|
+
onClear: $
|
|
2877
2940
|
}, {
|
|
2878
2941
|
prefix: ve(() => [
|
|
2879
|
-
ne(
|
|
2942
|
+
ne(Y(On), { size: "14px" })
|
|
2880
2943
|
]),
|
|
2881
2944
|
_: 1
|
|
2882
2945
|
}, 8, ["modelValue", "placeholder", "width"])
|
|
2883
2946
|
], 2)) : j("", !0),
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
(u(!0), m(
|
|
2887
|
-
key:
|
|
2888
|
-
class:
|
|
2947
|
+
H.value ? (u(), m("p", Mr, F(e.noMatchText || Y(he)("cascader.noMatch")), 1)) : j("", !0),
|
|
2948
|
+
z("ul", Ir, [
|
|
2949
|
+
(u(!0), m(Le, null, Ve(w.value, (_, be) => (u(), m("li", {
|
|
2950
|
+
key: _.value,
|
|
2951
|
+
class: X(["cregis-cascader__dropdown-item", { "is-disabled": _.disabled, "is-sub-open": o.value === _.value }])
|
|
2889
2952
|
}, [
|
|
2890
|
-
J(
|
|
2953
|
+
J(_) ? (u(), m("div", Nr, [
|
|
2891
2954
|
ne(Mt, {
|
|
2892
2955
|
ref_for: !0,
|
|
2893
|
-
ref: (me) => s(
|
|
2956
|
+
ref: (me) => s(_.value, me),
|
|
2894
2957
|
trigger: "hover",
|
|
2895
2958
|
placement: "right-start",
|
|
2896
2959
|
offset: dt,
|
|
2897
|
-
"popover-options":
|
|
2898
|
-
"popper-width":
|
|
2960
|
+
"popover-options": Me,
|
|
2961
|
+
"popper-width": re.value,
|
|
2899
2962
|
padding: 4,
|
|
2900
|
-
disabled: !!
|
|
2901
|
-
onVisibleChange: (me) => c(
|
|
2963
|
+
disabled: !!_.disabled || !!e.disabled,
|
|
2964
|
+
onVisibleChange: (me) => c(_.value, me)
|
|
2902
2965
|
}, {
|
|
2903
2966
|
reference: ve(() => [
|
|
2904
|
-
|
|
2905
|
-
class:
|
|
2906
|
-
"is-disabled":
|
|
2907
|
-
"is-parent-active":
|
|
2967
|
+
z("div", {
|
|
2968
|
+
class: X(["cregis-cascader__suboption-trigger", {
|
|
2969
|
+
"is-disabled": _.disabled,
|
|
2970
|
+
"is-parent-active": T(_)
|
|
2908
2971
|
}])
|
|
2909
2972
|
}, [
|
|
2910
|
-
ae(
|
|
2911
|
-
modelValue:
|
|
2912
|
-
selectedLabel:
|
|
2913
|
-
level:
|
|
2914
|
-
primaryOption:
|
|
2915
|
-
subOption:
|
|
2916
|
-
option:
|
|
2973
|
+
ae(S.$slots, "option", {
|
|
2974
|
+
modelValue: Z.value,
|
|
2975
|
+
selectedLabel: D.value,
|
|
2976
|
+
level: N.value,
|
|
2977
|
+
primaryOption: A.value,
|
|
2978
|
+
subOption: q.value,
|
|
2979
|
+
option: _,
|
|
2917
2980
|
index: be,
|
|
2918
|
-
disabled: !!
|
|
2919
|
-
selected: f(
|
|
2920
|
-
isParentOfSelected:
|
|
2981
|
+
disabled: !!_.disabled,
|
|
2982
|
+
selected: f(_.value),
|
|
2983
|
+
isParentOfSelected: T(_)
|
|
2921
2984
|
}, () => [
|
|
2922
|
-
|
|
2985
|
+
z("p", null, F(_.label), 1)
|
|
2923
2986
|
]),
|
|
2924
|
-
|
|
2925
|
-
e.showSubOptionAmount ? (u(), m("div",
|
|
2926
|
-
ne(
|
|
2987
|
+
z("div", jr, [
|
|
2988
|
+
e.showSubOptionAmount ? (u(), m("div", _r, F(_.children?.length ?? 0), 1)) : j("", !0),
|
|
2989
|
+
ne(Y(na), {
|
|
2927
2990
|
size: "14px",
|
|
2928
2991
|
color: "currentColor"
|
|
2929
2992
|
})
|
|
@@ -2931,33 +2994,33 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2931
2994
|
], 2)
|
|
2932
2995
|
]),
|
|
2933
2996
|
default: ve(() => [
|
|
2934
|
-
|
|
2935
|
-
(u(!0), m(
|
|
2997
|
+
z("div", Fr, [
|
|
2998
|
+
(u(!0), m(Le, null, Ve(_.children, (me, ft) => Fe((u(), m("div", {
|
|
2936
2999
|
key: me.value,
|
|
2937
|
-
class:
|
|
3000
|
+
class: X(["cregis-cascader__suboption-row", {
|
|
2938
3001
|
"is-active": f(me.value),
|
|
2939
3002
|
"is-disabled": me.disabled
|
|
2940
3003
|
}]),
|
|
2941
3004
|
role: "menuitem",
|
|
2942
|
-
onClick: (vt) =>
|
|
3005
|
+
onClick: (vt) => I(_, me)
|
|
2943
3006
|
}, [
|
|
2944
|
-
ae(
|
|
2945
|
-
modelValue:
|
|
2946
|
-
selectedLabel:
|
|
2947
|
-
level:
|
|
2948
|
-
primaryOption:
|
|
2949
|
-
subOption:
|
|
3007
|
+
ae(S.$slots, "subOption", {
|
|
3008
|
+
modelValue: Z.value,
|
|
3009
|
+
selectedLabel: D.value,
|
|
3010
|
+
level: N.value,
|
|
3011
|
+
primaryOption: A.value,
|
|
3012
|
+
subOption: q.value,
|
|
2950
3013
|
option: me,
|
|
2951
3014
|
index: ft,
|
|
2952
|
-
parent:
|
|
3015
|
+
parent: _,
|
|
2953
3016
|
parentIndex: be,
|
|
2954
3017
|
selected: f(me.value),
|
|
2955
3018
|
disabled: !!me.disabled
|
|
2956
3019
|
}, () => [
|
|
2957
|
-
ye(
|
|
3020
|
+
ye(F(me.label), 1)
|
|
2958
3021
|
])
|
|
2959
|
-
], 10,
|
|
2960
|
-
[
|
|
3022
|
+
], 10, Hr)), [
|
|
3023
|
+
[$t, k(_, me)]
|
|
2961
3024
|
])), 128))
|
|
2962
3025
|
])
|
|
2963
3026
|
]),
|
|
@@ -2966,21 +3029,21 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
2966
3029
|
])) : (u(), m("div", {
|
|
2967
3030
|
key: 1,
|
|
2968
3031
|
class: "cregis-cascader__leaf-only",
|
|
2969
|
-
onClick: (me) => ee(
|
|
3032
|
+
onClick: (me) => ee(_)
|
|
2970
3033
|
}, [
|
|
2971
|
-
ae(
|
|
2972
|
-
modelValue:
|
|
2973
|
-
selectedLabel:
|
|
2974
|
-
level:
|
|
2975
|
-
primaryOption:
|
|
2976
|
-
subOption:
|
|
2977
|
-
option:
|
|
3034
|
+
ae(S.$slots, "option", {
|
|
3035
|
+
modelValue: Z.value,
|
|
3036
|
+
selectedLabel: D.value,
|
|
3037
|
+
level: N.value,
|
|
3038
|
+
primaryOption: A.value,
|
|
3039
|
+
subOption: q.value,
|
|
3040
|
+
option: _,
|
|
2978
3041
|
index: be,
|
|
2979
|
-
disabled: !!
|
|
2980
|
-
selected: f(
|
|
3042
|
+
disabled: !!_.disabled,
|
|
3043
|
+
selected: f(_.value),
|
|
2981
3044
|
isParentOfSelected: !1
|
|
2982
3045
|
}, () => [
|
|
2983
|
-
|
|
3046
|
+
z("p", null, F(_.label), 1)
|
|
2984
3047
|
])
|
|
2985
3048
|
], 8, Ur))
|
|
2986
3049
|
], 2))), 128))
|
|
@@ -3016,27 +3079,27 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
3016
3079
|
});
|
|
3017
3080
|
return (a, i) => e.palette ? (u(), m("div", {
|
|
3018
3081
|
key: 0,
|
|
3019
|
-
class:
|
|
3020
|
-
style:
|
|
3082
|
+
class: X(["cregis-tag cregis-tag--palette", [`cregis-tag--${e.type}`, `cregis-tag--${e.size}`, { "cregis-tag--ellipsis": e.maxWidth != null }]]),
|
|
3083
|
+
style: G(n.value)
|
|
3021
3084
|
}, [
|
|
3022
3085
|
e.maxWidth != null ? (u(), m("span", qr, [
|
|
3023
3086
|
ae(a.$slots, "default", {}, () => [
|
|
3024
|
-
ye(
|
|
3087
|
+
ye(F(e.text), 1)
|
|
3025
3088
|
])
|
|
3026
3089
|
])) : ae(a.$slots, "default", { key: 1 }, () => [
|
|
3027
|
-
ye(
|
|
3090
|
+
ye(F(e.text), 1)
|
|
3028
3091
|
])
|
|
3029
3092
|
], 6)) : (u(), m("div", {
|
|
3030
3093
|
key: 1,
|
|
3031
|
-
class:
|
|
3032
|
-
style:
|
|
3094
|
+
class: X(["cregis-tag", [`cregis-tag--${e.type}`, `cregis-tag--${e.size}`, { "cregis-tag--ellipsis": e.maxWidth != null }]]),
|
|
3095
|
+
style: G(n.value)
|
|
3033
3096
|
}, [
|
|
3034
3097
|
e.maxWidth != null ? (u(), m("span", Yr, [
|
|
3035
3098
|
ae(a.$slots, "default", {}, () => [
|
|
3036
|
-
ye(
|
|
3099
|
+
ye(F(e.text), 1)
|
|
3037
3100
|
])
|
|
3038
3101
|
])) : ae(a.$slots, "default", { key: 1 }, () => [
|
|
3039
|
-
ye(
|
|
3102
|
+
ye(F(e.text), 1)
|
|
3040
3103
|
])
|
|
3041
3104
|
], 6));
|
|
3042
3105
|
}
|
|
@@ -3053,7 +3116,7 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
3053
3116
|
},
|
|
3054
3117
|
emits: ["update:modelValue", "change"],
|
|
3055
3118
|
setup(e, { emit: t }) {
|
|
3056
|
-
const n = e, a = t, i =
|
|
3119
|
+
const n = e, a = t, i = V(!1), r = p(() => n.modelValue === n.activeValue), o = async () => {
|
|
3057
3120
|
if (n.disabled || i.value) return;
|
|
3058
3121
|
const l = r.value ? n.inactiveValue : n.activeValue;
|
|
3059
3122
|
if (n.beforeChange) {
|
|
@@ -3068,19 +3131,19 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
3068
3131
|
}
|
|
3069
3132
|
a("update:modelValue", l);
|
|
3070
3133
|
};
|
|
3071
|
-
return
|
|
3134
|
+
return ie(
|
|
3072
3135
|
() => n.modelValue,
|
|
3073
3136
|
(l) => {
|
|
3074
3137
|
a("change", l);
|
|
3075
3138
|
}
|
|
3076
3139
|
), (l, s) => (u(), m("div", {
|
|
3077
|
-
class:
|
|
3140
|
+
class: X(["cregis-switch", [
|
|
3078
3141
|
`cregis-switch--${e.size}`,
|
|
3079
3142
|
{ "is-checked": r.value, "is-disabled": e.disabled || i.value }
|
|
3080
3143
|
]]),
|
|
3081
3144
|
onClick: o
|
|
3082
3145
|
}, [...s[0] || (s[0] = [
|
|
3083
|
-
|
|
3146
|
+
z("div", { class: "cregis-switch__circle" }, null, -1)
|
|
3084
3147
|
])], 2));
|
|
3085
3148
|
}
|
|
3086
3149
|
}), Xr = { class: "cregis-badge__wrapper" }, Zl = /* @__PURE__ */ oe({
|
|
@@ -3105,9 +3168,9 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
3105
3168
|
return (r, o) => (u(), m("div", Xr, [
|
|
3106
3169
|
e.hidden ? j("", !0) : (u(), m("div", {
|
|
3107
3170
|
key: 0,
|
|
3108
|
-
class:
|
|
3109
|
-
style:
|
|
3110
|
-
},
|
|
3171
|
+
class: X(["cregis-badge", [`cregis-badge--${e.type}`, { "cregis-badge--dot": e.isDot }]]),
|
|
3172
|
+
style: G(i.value)
|
|
3173
|
+
}, F(e.isDot ? "" : Number(e.value) > e.max ? `${e.max}+` : e.value), 7)),
|
|
3111
3174
|
ae(r.$slots, "default")
|
|
3112
3175
|
]));
|
|
3113
3176
|
}
|
|
@@ -3129,12 +3192,12 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
3129
3192
|
},
|
|
3130
3193
|
emits: ["update:modelValue"],
|
|
3131
3194
|
setup(e, { expose: t, emit: n }) {
|
|
3132
|
-
const a = e, i = n, r =
|
|
3195
|
+
const a = e, i = n, r = V(0), o = V(""), l = V(null), s = ["http:", "https:", "blob:"], v = (k) => {
|
|
3133
3196
|
if (!k) return !1;
|
|
3134
3197
|
if (k.toLowerCase().startsWith("data:image/")) return !0;
|
|
3135
3198
|
try {
|
|
3136
|
-
const { protocol:
|
|
3137
|
-
return s.includes(
|
|
3199
|
+
const { protocol: w } = new URL(k, window.location.origin);
|
|
3200
|
+
return s.includes(w);
|
|
3138
3201
|
} catch {
|
|
3139
3202
|
return k.startsWith("/") && !k.startsWith("//");
|
|
3140
3203
|
}
|
|
@@ -3142,42 +3205,42 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
3142
3205
|
width: typeof a.width == "number" ? `${a.width}px` : a.width,
|
|
3143
3206
|
height: typeof a.width == "number" ? `${a.width}px` : a.width
|
|
3144
3207
|
})), g = (k) => {
|
|
3145
|
-
const
|
|
3146
|
-
return
|
|
3147
|
-
}, h = (k,
|
|
3148
|
-
const
|
|
3149
|
-
if (!
|
|
3150
|
-
const
|
|
3151
|
-
return
|
|
3152
|
-
const
|
|
3153
|
-
return
|
|
3208
|
+
const w = k.lastIndexOf(".");
|
|
3209
|
+
return w === -1 ? "" : k.slice(w + 1).toLowerCase();
|
|
3210
|
+
}, h = (k, w) => {
|
|
3211
|
+
const W = w.split(",").map((U) => U.trim()).filter(Boolean);
|
|
3212
|
+
if (!W.length) return !0;
|
|
3213
|
+
const R = g(k.name), H = k.type.toLowerCase();
|
|
3214
|
+
return W.some((U) => {
|
|
3215
|
+
const M = U.toLowerCase();
|
|
3216
|
+
return M.startsWith(".") ? R === M.slice(1) : M.includes("/") ? M.endsWith("/*") ? H.startsWith(M.slice(0, -1)) : H === M : R === M;
|
|
3154
3217
|
});
|
|
3155
3218
|
};
|
|
3156
3219
|
let y;
|
|
3157
|
-
const
|
|
3220
|
+
const C = (k) => {
|
|
3158
3221
|
k.value = "";
|
|
3159
|
-
},
|
|
3222
|
+
}, B = () => {
|
|
3160
3223
|
y && (clearInterval(y), y = void 0);
|
|
3161
|
-
},
|
|
3162
|
-
|
|
3163
|
-
},
|
|
3164
|
-
const
|
|
3165
|
-
if (!
|
|
3166
|
-
if (a.accept && !h(
|
|
3167
|
-
cn(a.exceedAcceptTip ?? he("upload.formatError")),
|
|
3224
|
+
}, O = () => {
|
|
3225
|
+
B(), r.value = 0, o.value = "", l.value && C(l.value), a.modelValue && i("update:modelValue", "");
|
|
3226
|
+
}, $ = (k) => {
|
|
3227
|
+
const w = k.target, W = w.files?.[0];
|
|
3228
|
+
if (!W) return;
|
|
3229
|
+
if (a.accept && !h(W, a.accept)) {
|
|
3230
|
+
cn(a.exceedAcceptTip ?? he("upload.formatError")), C(w);
|
|
3168
3231
|
return;
|
|
3169
3232
|
}
|
|
3170
|
-
if (a.size !== void 0 &&
|
|
3171
|
-
cn(a.exceedSizeTip ?? he("upload.sizeError", { size: a.size })),
|
|
3233
|
+
if (a.size !== void 0 && W.size > a.size * 1024 * 1024) {
|
|
3234
|
+
cn(a.exceedSizeTip ?? he("upload.sizeError", { size: a.size })), C(w);
|
|
3172
3235
|
return;
|
|
3173
3236
|
}
|
|
3174
3237
|
i("update:modelValue", "");
|
|
3175
|
-
const
|
|
3176
|
-
|
|
3177
|
-
r.value += 30, r.value >= 90 &&
|
|
3238
|
+
const R = new FormData();
|
|
3239
|
+
R.append("file", W, W.name), a.onChange?.(R), C(w), B(), r.value = 0, y = setInterval(() => {
|
|
3240
|
+
r.value += 30, r.value >= 90 && B();
|
|
3178
3241
|
}, 200);
|
|
3179
3242
|
};
|
|
3180
|
-
|
|
3243
|
+
ie(
|
|
3181
3244
|
() => a.modelValue,
|
|
3182
3245
|
(k) => {
|
|
3183
3246
|
k ? (r.value = 100, o.value = k) : (r.value = 0, o.value = "");
|
|
@@ -3186,36 +3249,36 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
3186
3249
|
immediate: !0
|
|
3187
3250
|
}
|
|
3188
3251
|
);
|
|
3189
|
-
const
|
|
3252
|
+
const E = p(() => ({
|
|
3190
3253
|
width: `${r.value}%`,
|
|
3191
3254
|
borderRadius: r.value === 100 ? "0 0 6px 6px" : "0 0 0 6px"
|
|
3192
|
-
})),
|
|
3193
|
-
return
|
|
3194
|
-
|
|
3255
|
+
})), x = p(() => a.disabled || r.value > 0 && r.value < 100);
|
|
3256
|
+
return ze(() => {
|
|
3257
|
+
B();
|
|
3195
3258
|
}), t({
|
|
3196
|
-
reset:
|
|
3197
|
-
}), (k,
|
|
3198
|
-
class:
|
|
3199
|
-
style:
|
|
3259
|
+
reset: O
|
|
3260
|
+
}), (k, w) => (u(), m("div", {
|
|
3261
|
+
class: X(["cregis-upload", { "cregis-upload--disabled": x.value }]),
|
|
3262
|
+
style: G(d.value)
|
|
3200
3263
|
}, [
|
|
3201
|
-
c.value ? j("", !0) : (u(), de(
|
|
3264
|
+
c.value ? j("", !0) : (u(), de(Y(sn), {
|
|
3202
3265
|
key: 0,
|
|
3203
3266
|
size: "16px",
|
|
3204
3267
|
color: "var(--stroke-base-secondary)"
|
|
3205
3268
|
})),
|
|
3206
|
-
|
|
3269
|
+
z("input", {
|
|
3207
3270
|
ref_key: "inputRef",
|
|
3208
3271
|
ref: l,
|
|
3209
3272
|
type: "file",
|
|
3210
3273
|
title: "",
|
|
3211
3274
|
accept: e.accept,
|
|
3212
|
-
disabled:
|
|
3213
|
-
onChange:
|
|
3275
|
+
disabled: x.value,
|
|
3276
|
+
onChange: $
|
|
3214
3277
|
}, null, 40, Kr),
|
|
3215
3278
|
r.value > 0 && r.value < 100 ? (u(), m("div", {
|
|
3216
3279
|
key: 1,
|
|
3217
3280
|
class: "cregis-upload__progress",
|
|
3218
|
-
style:
|
|
3281
|
+
style: G(E.value)
|
|
3219
3282
|
}, null, 4)) : j("", !0),
|
|
3220
3283
|
c.value ? (u(), m("img", {
|
|
3221
3284
|
key: 2,
|
|
@@ -3223,7 +3286,7 @@ const Cr = 80, Mt = /* @__PURE__ */ oe({
|
|
|
3223
3286
|
alt: ""
|
|
3224
3287
|
}, null, 8, Gr)) : j("", !0),
|
|
3225
3288
|
c.value ? (u(), m("div", Zr, [
|
|
3226
|
-
ne(
|
|
3289
|
+
ne(Y(sn), {
|
|
3227
3290
|
size: "16px",
|
|
3228
3291
|
color: "var(--text-same-white-primary)"
|
|
3229
3292
|
})
|
|
@@ -3236,7 +3299,7 @@ const Qr = () => {
|
|
|
3236
3299
|
at === 0 && (qn = document.body.style.overflow, document.body.style.overflow = "hidden"), at++;
|
|
3237
3300
|
}, kn = () => {
|
|
3238
3301
|
at <= 0 || (at--, at === 0 && (document.body.style.overflow = qn));
|
|
3239
|
-
},
|
|
3302
|
+
}, St = /* @__PURE__ */ oe({
|
|
3240
3303
|
name: "Dialog",
|
|
3241
3304
|
__name: "Dialog",
|
|
3242
3305
|
props: {
|
|
@@ -3253,10 +3316,10 @@ const Qr = () => {
|
|
|
3253
3316
|
setup(e, { emit: t }) {
|
|
3254
3317
|
const n = e, a = t;
|
|
3255
3318
|
let i = !1;
|
|
3256
|
-
|
|
3319
|
+
ie(() => [n.modelValue, n.lockScroll], () => {
|
|
3257
3320
|
const d = n.modelValue && n.lockScroll;
|
|
3258
3321
|
d && !i ? (Qr(), i = !0) : !d && i && (kn(), i = !1);
|
|
3259
|
-
}, { immediate: !0 }),
|
|
3322
|
+
}, { immediate: !0 }), ze(() => {
|
|
3260
3323
|
i && (kn(), i = !1);
|
|
3261
3324
|
});
|
|
3262
3325
|
const o = p(() => ({
|
|
@@ -3271,7 +3334,7 @@ const Qr = () => {
|
|
|
3271
3334
|
}, c = () => {
|
|
3272
3335
|
a("after-leave");
|
|
3273
3336
|
};
|
|
3274
|
-
return (d, g) => (u(), de(
|
|
3337
|
+
return (d, g) => (u(), de(Ft, { to: "body" }, [
|
|
3275
3338
|
ne(st, {
|
|
3276
3339
|
name: "cregis-dialog-fade",
|
|
3277
3340
|
onAfterLeave: c
|
|
@@ -3289,10 +3352,10 @@ const Qr = () => {
|
|
|
3289
3352
|
class: "cregis-dialog__mask",
|
|
3290
3353
|
onClick: v
|
|
3291
3354
|
})) : j("", !0),
|
|
3292
|
-
|
|
3355
|
+
z("div", {
|
|
3293
3356
|
class: "cregis-dialog",
|
|
3294
|
-
style:
|
|
3295
|
-
onClick: g[0] || (g[0] =
|
|
3357
|
+
style: G(o.value),
|
|
3358
|
+
onClick: g[0] || (g[0] = He(() => {
|
|
3296
3359
|
}, ["stop"]))
|
|
3297
3360
|
}, [
|
|
3298
3361
|
e.showClose ? (u(), m("div", {
|
|
@@ -3300,7 +3363,7 @@ const Qr = () => {
|
|
|
3300
3363
|
class: "cregis-dialog__close",
|
|
3301
3364
|
onClick: s
|
|
3302
3365
|
}, [
|
|
3303
|
-
ne(
|
|
3366
|
+
ne(Y(Ut), {
|
|
3304
3367
|
size: "10px",
|
|
3305
3368
|
color: "var(--material-same-white-primary)"
|
|
3306
3369
|
})
|
|
@@ -3338,7 +3401,7 @@ const Qr = () => {
|
|
|
3338
3401
|
},
|
|
3339
3402
|
emits: ["after-leave"],
|
|
3340
3403
|
setup(e, { emit: t }) {
|
|
3341
|
-
const n = e, a = t, i =
|
|
3404
|
+
const n = e, a = t, i = V(!1), r = V(null), o = V(null), l = p(() => n.type === "success" ? {
|
|
3342
3405
|
component: Cn,
|
|
3343
3406
|
color: "var(--text-same-white-primary)"
|
|
3344
3407
|
} : {
|
|
@@ -3358,7 +3421,7 @@ const Qr = () => {
|
|
|
3358
3421
|
};
|
|
3359
3422
|
return ge(() => {
|
|
3360
3423
|
i.value = !0;
|
|
3361
|
-
}), (g, h) => (u(), de(
|
|
3424
|
+
}), (g, h) => (u(), de(St, {
|
|
3362
3425
|
modelValue: i.value,
|
|
3363
3426
|
"onUpdate:modelValue": h[0] || (h[0] = (y) => i.value = y),
|
|
3364
3427
|
width: e.width,
|
|
@@ -3368,10 +3431,10 @@ const Qr = () => {
|
|
|
3368
3431
|
onAfterLeave: d
|
|
3369
3432
|
}, {
|
|
3370
3433
|
default: ve(() => [
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
class:
|
|
3434
|
+
z("div", Jr, [
|
|
3435
|
+
z("div", el, [
|
|
3436
|
+
z("div", {
|
|
3437
|
+
class: X(`cregis-dialog-confirm__icon cregis-dialog-confirm__icon--${e.type}`)
|
|
3375
3438
|
}, [
|
|
3376
3439
|
(u(), de(it(l.value.component), {
|
|
3377
3440
|
"stroke-width": 3.4,
|
|
@@ -3380,10 +3443,10 @@ const Qr = () => {
|
|
|
3380
3443
|
}, null, 8, ["color"]))
|
|
3381
3444
|
], 2)
|
|
3382
3445
|
]),
|
|
3383
|
-
e.title ? (u(), m("div", tl,
|
|
3384
|
-
e.message ? (u(), m("div", nl,
|
|
3385
|
-
|
|
3386
|
-
e.showConfirmButton ? (u(), de(
|
|
3446
|
+
e.title ? (u(), m("div", tl, F(e.title), 1)) : j("", !0),
|
|
3447
|
+
e.message ? (u(), m("div", nl, F(e.message), 1)) : j("", !0),
|
|
3448
|
+
z("div", al, [
|
|
3449
|
+
e.showConfirmButton ? (u(), de(_e, {
|
|
3387
3450
|
key: 0,
|
|
3388
3451
|
type: "foreground",
|
|
3389
3452
|
block: "",
|
|
@@ -3391,11 +3454,11 @@ const Qr = () => {
|
|
|
3391
3454
|
onClick: v
|
|
3392
3455
|
}, {
|
|
3393
3456
|
default: ve(() => [
|
|
3394
|
-
ye(
|
|
3457
|
+
ye(F(e.confirmButtonText || Y(he)("dialog.confirm")), 1)
|
|
3395
3458
|
]),
|
|
3396
3459
|
_: 1
|
|
3397
3460
|
}, 8, ["loading"])) : j("", !0),
|
|
3398
|
-
e.showCancelButton ? (u(), de(
|
|
3461
|
+
e.showCancelButton ? (u(), de(_e, {
|
|
3399
3462
|
key: 1,
|
|
3400
3463
|
type: "secondary",
|
|
3401
3464
|
text: "",
|
|
@@ -3404,7 +3467,7 @@ const Qr = () => {
|
|
|
3404
3467
|
onClick: c
|
|
3405
3468
|
}, {
|
|
3406
3469
|
default: ve(() => [
|
|
3407
|
-
ye(
|
|
3470
|
+
ye(F(e.cancelButtonText || Y(he)("dialog.cancel")), 1)
|
|
3408
3471
|
]),
|
|
3409
3472
|
_: 1
|
|
3410
3473
|
}, 8, ["loading"])) : j("", !0)
|
|
@@ -3432,7 +3495,7 @@ function ll(e) {
|
|
|
3432
3495
|
o || (o = !0, n(v));
|
|
3433
3496
|
};
|
|
3434
3497
|
Ue(
|
|
3435
|
-
|
|
3498
|
+
_t(il, {
|
|
3436
3499
|
...a,
|
|
3437
3500
|
onConfirm: async () => {
|
|
3438
3501
|
await a.onConfirm?.(), l();
|
|
@@ -3448,9 +3511,9 @@ function ll(e) {
|
|
|
3448
3511
|
);
|
|
3449
3512
|
});
|
|
3450
3513
|
}
|
|
3451
|
-
const Yn =
|
|
3514
|
+
const Yn = St;
|
|
3452
3515
|
Yn.install = (e) => {
|
|
3453
|
-
e.component(
|
|
3516
|
+
e.component(St.name, St);
|
|
3454
3517
|
};
|
|
3455
3518
|
Yn.confirm = ll;
|
|
3456
3519
|
const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)", cl = "var(--material-warning-primary)", ul = "var(--stroke-outline-deep)", dl = "var(--material-danger-primary)", Xn = Symbol("TIMELINE_KEY"), fl = { class: "cregis-timeline" }, Jl = /* @__PURE__ */ oe({
|
|
@@ -3510,29 +3573,29 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3510
3573
|
}));
|
|
3511
3574
|
return (d, g) => (u(), m("div", {
|
|
3512
3575
|
class: "cregis-timeline-item",
|
|
3513
|
-
style:
|
|
3576
|
+
style: G(s.value)
|
|
3514
3577
|
}, [
|
|
3515
|
-
|
|
3578
|
+
z("div", {
|
|
3516
3579
|
class: "cregis-timeline-item__node",
|
|
3517
|
-
style:
|
|
3580
|
+
style: G(v.value)
|
|
3518
3581
|
}, [
|
|
3519
|
-
|
|
3582
|
+
z("span", {
|
|
3520
3583
|
class: "cregis-timeline-item__dot",
|
|
3521
|
-
style:
|
|
3584
|
+
style: G(l.value)
|
|
3522
3585
|
}, [
|
|
3523
|
-
e.status === "finished" ? (u(), de(
|
|
3586
|
+
e.status === "finished" ? (u(), de(Ln, {
|
|
3524
3587
|
key: 0,
|
|
3525
3588
|
size: o.value,
|
|
3526
3589
|
class: "cregis-timeline-item__dot-icon"
|
|
3527
|
-
}, null, 8, ["size"])) : e.status === "pending" ? (u(), de(
|
|
3590
|
+
}, null, 8, ["size"])) : e.status === "pending" ? (u(), de(Y(ia), {
|
|
3528
3591
|
key: 1,
|
|
3529
3592
|
size: o.value,
|
|
3530
3593
|
color: "var(--text-same-white-primary)"
|
|
3531
|
-
}, null, 8, ["size"])) : e.status === "rejected" ? (u(), de(
|
|
3594
|
+
}, null, 8, ["size"])) : e.status === "rejected" ? (u(), de(Y(Ut), {
|
|
3532
3595
|
key: 2,
|
|
3533
3596
|
size: o.value,
|
|
3534
3597
|
color: "var(--text-same-white-primary)"
|
|
3535
|
-
}, null, 8, ["size"])) : e.status === "withdrawn" ? (u(), de(
|
|
3598
|
+
}, null, 8, ["size"])) : e.status === "withdrawn" ? (u(), de(Y(ra), {
|
|
3536
3599
|
key: 3,
|
|
3537
3600
|
size: o.value,
|
|
3538
3601
|
color: "var(--text-same-white-primary)"
|
|
@@ -3542,13 +3605,13 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3542
3605
|
d.$slots.title ? (u(), m("div", vl, [
|
|
3543
3606
|
ae(d.$slots, "title")
|
|
3544
3607
|
])) : j("", !0),
|
|
3545
|
-
|
|
3608
|
+
z("span", {
|
|
3546
3609
|
class: "cregis-timeline-item__tail",
|
|
3547
|
-
style:
|
|
3610
|
+
style: G(c.value)
|
|
3548
3611
|
}, null, 4),
|
|
3549
3612
|
d.$slots.default ? (u(), m("div", {
|
|
3550
3613
|
key: 1,
|
|
3551
|
-
class:
|
|
3614
|
+
class: X(["cregis-timeline-item__content", { "is-hoverable": e.contentHoverable }])
|
|
3552
3615
|
}, [
|
|
3553
3616
|
ae(d.$slots, "default")
|
|
3554
3617
|
], 2)) : j("", !0)
|
|
@@ -3573,7 +3636,7 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3573
3636
|
},
|
|
3574
3637
|
emits: ["select-all-mode", "sort-change"],
|
|
3575
3638
|
setup(e, { expose: t, emit: n }) {
|
|
3576
|
-
const a = n, i = e, r =
|
|
3639
|
+
const a = n, i = e, r = V(!1), o = V(!1), l = V(""), s = V(), v = V();
|
|
3577
3640
|
let c = null;
|
|
3578
3641
|
const d = p(() => ({
|
|
3579
3642
|
maxHeight: "180px",
|
|
@@ -3581,16 +3644,16 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3581
3644
|
})), g = p(() => i.selectMode ? "disabled" : ""), h = p(() => o.value ? "focus" : ""), y = p(() => ({
|
|
3582
3645
|
height: i.height,
|
|
3583
3646
|
...i.width ? { width: "1%" } : {}
|
|
3584
|
-
})),
|
|
3647
|
+
})), C = p(() => ({
|
|
3585
3648
|
justifyContent: i.align === "left" ? "flex-start" : i.align === "center" ? "center" : "flex-end",
|
|
3586
3649
|
...i.width ? { width: i.width } : {}
|
|
3587
3650
|
}));
|
|
3588
|
-
|
|
3651
|
+
Fn(s, () => {
|
|
3589
3652
|
r.value && setTimeout(() => {
|
|
3590
3653
|
r.value = !1, o.value = !1;
|
|
3591
3654
|
}, 0);
|
|
3592
3655
|
});
|
|
3593
|
-
const
|
|
3656
|
+
const B = () => {
|
|
3594
3657
|
i.selectMode || r.value || (r.value = !0, o.value = !0, ge(() => {
|
|
3595
3658
|
s.value && v.value && (c?.destroy(), c = Nn(v.value, s.value, {
|
|
3596
3659
|
placement: "bottom-start",
|
|
@@ -3604,71 +3667,71 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3604
3667
|
]
|
|
3605
3668
|
}));
|
|
3606
3669
|
}));
|
|
3607
|
-
},
|
|
3608
|
-
|
|
3670
|
+
}, O = (E) => {
|
|
3671
|
+
E !== l.value && a("sort-change", E), l.value = E, r.value = !1, o.value = !1;
|
|
3609
3672
|
};
|
|
3610
3673
|
return t({
|
|
3611
3674
|
resetSort: () => {
|
|
3612
3675
|
l.value = "";
|
|
3613
3676
|
}
|
|
3614
|
-
}),
|
|
3677
|
+
}), ze(() => {
|
|
3615
3678
|
c?.destroy();
|
|
3616
|
-
}), (
|
|
3617
|
-
class:
|
|
3679
|
+
}), (E, x) => (u(), m("th", {
|
|
3680
|
+
class: X(["header-cell-wrapper", {
|
|
3618
3681
|
"select-cell": e.type === "select",
|
|
3619
3682
|
"select-cell--visible": e.type === "select" && e.selectVisible
|
|
3620
3683
|
}]),
|
|
3621
|
-
style:
|
|
3684
|
+
style: G(y.value)
|
|
3622
3685
|
}, [
|
|
3623
3686
|
e.type === "select" ? (u(), m("div", pl, [
|
|
3624
3687
|
ne(qt, {
|
|
3625
3688
|
"model-value": e.selectAllMode === "all",
|
|
3626
3689
|
indeterminate: e.selectAllMode === "some",
|
|
3627
|
-
onClick:
|
|
3690
|
+
onClick: x[0] || (x[0] = He((k) => E.$emit("select-all-mode", e.selectAllMode), ["stop"]))
|
|
3628
3691
|
}, null, 8, ["model-value", "indeterminate"])
|
|
3629
3692
|
])) : j("", !0),
|
|
3630
3693
|
e.type === "default" ? (u(), m("div", {
|
|
3631
3694
|
key: 1,
|
|
3632
3695
|
class: "cell-content",
|
|
3633
|
-
style:
|
|
3696
|
+
style: G(C.value)
|
|
3634
3697
|
}, [
|
|
3635
|
-
ae(
|
|
3636
|
-
|
|
3698
|
+
ae(E.$slots, "default", {}, () => [
|
|
3699
|
+
z("div", null, F(e.label), 1)
|
|
3637
3700
|
], !0),
|
|
3638
3701
|
e.sortable ? (u(), m("div", {
|
|
3639
3702
|
key: 0,
|
|
3640
3703
|
ref_key: "containerRef",
|
|
3641
3704
|
ref: v,
|
|
3642
|
-
class:
|
|
3643
|
-
onClick:
|
|
3705
|
+
class: X(["sort-container", [h.value, g.value]]),
|
|
3706
|
+
onClick: He(B, ["stop"])
|
|
3644
3707
|
}, [
|
|
3645
|
-
|
|
3646
|
-
class:
|
|
3708
|
+
z("span", {
|
|
3709
|
+
class: X(["sort-icon", { "is-open": r.value }])
|
|
3647
3710
|
}, [
|
|
3648
|
-
ne(
|
|
3711
|
+
ne(Y(Ht), {
|
|
3649
3712
|
size: "12px",
|
|
3650
3713
|
color: "currentColor"
|
|
3651
3714
|
})
|
|
3652
3715
|
], 2)
|
|
3653
3716
|
], 2)) : j("", !0)
|
|
3654
3717
|
], 4)) : j("", !0),
|
|
3655
|
-
(u(), de(
|
|
3656
|
-
|
|
3718
|
+
(u(), de(Ft, { to: "body" }, [
|
|
3719
|
+
Fe(z("div", {
|
|
3657
3720
|
ref_key: "popRef",
|
|
3658
3721
|
ref: s,
|
|
3659
3722
|
class: "sort-popover no-scroll-bar popover-shadow",
|
|
3660
|
-
style:
|
|
3723
|
+
style: G(d.value)
|
|
3661
3724
|
}, [
|
|
3662
|
-
|
|
3663
|
-
class:
|
|
3664
|
-
onClick:
|
|
3665
|
-
},
|
|
3666
|
-
|
|
3667
|
-
class:
|
|
3668
|
-
onClick:
|
|
3669
|
-
},
|
|
3725
|
+
z("div", {
|
|
3726
|
+
class: X(["sort-item font-15", { active: l.value === 1 }]),
|
|
3727
|
+
onClick: x[1] || (x[1] = (k) => O(1))
|
|
3728
|
+
}, F(Y(he)("tableList.asc")), 3),
|
|
3729
|
+
z("div", {
|
|
3730
|
+
class: X(["sort-item font-15", { active: l.value === 2 }]),
|
|
3731
|
+
onClick: x[2] || (x[2] = (k) => O(2))
|
|
3732
|
+
}, F(Y(he)("tableList.desc")), 3)
|
|
3670
3733
|
], 4), [
|
|
3671
|
-
[
|
|
3734
|
+
[$t, r.value]
|
|
3672
3735
|
])
|
|
3673
3736
|
]))
|
|
3674
3737
|
], 6));
|
|
@@ -3678,7 +3741,7 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3678
3741
|
for (const [a, i] of t)
|
|
3679
3742
|
n[a] = i;
|
|
3680
3743
|
return n;
|
|
3681
|
-
},
|
|
3744
|
+
}, Sn = /* @__PURE__ */ tn(ml, [["__scopeId", "data-v-fadfd4e7"]]), hl = {
|
|
3682
3745
|
key: 1,
|
|
3683
3746
|
class: "cell-text"
|
|
3684
3747
|
}, gl = /* @__PURE__ */ oe({
|
|
@@ -3715,36 +3778,36 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3715
3778
|
...t.width ? { width: t.width } : {}
|
|
3716
3779
|
}));
|
|
3717
3780
|
return (l, s) => (u(), m("td", {
|
|
3718
|
-
class:
|
|
3781
|
+
class: X(["column-wrapper", {
|
|
3719
3782
|
"is-striped": r.value,
|
|
3720
3783
|
"select-cell": e.type === "select",
|
|
3721
3784
|
"select-cell--visible": e.type === "select" && e.selectVisible
|
|
3722
3785
|
}]),
|
|
3723
|
-
style:
|
|
3786
|
+
style: G(a.value)
|
|
3724
3787
|
}, [
|
|
3725
3788
|
e.blank ? (u(), m("div", {
|
|
3726
3789
|
key: 0,
|
|
3727
|
-
style:
|
|
3728
|
-
}, null, 4)) : (u(), m(
|
|
3790
|
+
style: G(o.value)
|
|
3791
|
+
}, null, 4)) : (u(), m(Le, { key: 1 }, [
|
|
3729
3792
|
e.type === "select" ? (u(), m("div", {
|
|
3730
3793
|
key: 0,
|
|
3731
3794
|
class: "select-content",
|
|
3732
|
-
style:
|
|
3795
|
+
style: G(i.value)
|
|
3733
3796
|
}, [
|
|
3734
3797
|
ne(qt, {
|
|
3735
3798
|
"model-value": e.selected,
|
|
3736
|
-
onClick: s[0] || (s[0] =
|
|
3799
|
+
onClick: s[0] || (s[0] = He((v) => l.$emit("selectChange", e.index), ["stop"]))
|
|
3737
3800
|
}, null, 8, ["model-value"])
|
|
3738
3801
|
], 4)) : j("", !0),
|
|
3739
3802
|
e.type === "default" ? (u(), m("div", {
|
|
3740
3803
|
key: 1,
|
|
3741
3804
|
class: "cell-content",
|
|
3742
|
-
style:
|
|
3805
|
+
style: G(o.value)
|
|
3743
3806
|
}, [
|
|
3744
3807
|
l.$slots.default ? ae(l.$slots, "default", {
|
|
3745
3808
|
key: 0,
|
|
3746
3809
|
data: n.value
|
|
3747
|
-
}, void 0, !0) : (u(), m("div", hl,
|
|
3810
|
+
}, void 0, !0) : (u(), m("div", hl, F(t.data?.[t.prop || ""]), 1))
|
|
3748
3811
|
], 4)) : j("", !0)
|
|
3749
3812
|
], 64))
|
|
3750
3813
|
], 6));
|
|
@@ -3755,16 +3818,16 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3755
3818
|
return e[t];
|
|
3756
3819
|
const a = t.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
3757
3820
|
return Object.prototype.hasOwnProperty.call(e, a) ? e[a] : n;
|
|
3758
|
-
}, bl = { class: "initing-content" }, yl = { class: "initing-text" }, wl = { class: "selected-count-wrapper" }, xl = { class: "font-medium text-[var(--text-base-primary)]" }, kl = { class: "ml-[2px] text-[var(--text-base-secondary)]" },
|
|
3821
|
+
}, bl = { class: "initing-content" }, yl = { class: "initing-text" }, wl = { class: "selected-count-wrapper" }, xl = { class: "font-medium text-[var(--text-base-primary)]" }, kl = { class: "ml-[2px] text-[var(--text-base-secondary)]" }, Sl = {
|
|
3759
3822
|
key: 0,
|
|
3760
3823
|
class: "operation-divider"
|
|
3761
|
-
},
|
|
3824
|
+
}, $l = { key: 0 }, Cl = ["colspan"], Ol = { class: "loading-inner" }, Tl = { class: "loading-success-text" }, zl = ["onClick"], Ll = {
|
|
3762
3825
|
key: 0,
|
|
3763
3826
|
class: "flex-1 flex items-center justify-center"
|
|
3764
|
-
},
|
|
3827
|
+
}, El = { class: "flex flex-col gap-[8px] items-center -translate-x-[30px]" }, Rl = { class: "no-data-text font-13" }, Bl = {
|
|
3765
3828
|
key: 1,
|
|
3766
3829
|
class: "flex-1"
|
|
3767
|
-
},
|
|
3830
|
+
}, Wl = /* @__PURE__ */ oe({
|
|
3768
3831
|
__name: "index",
|
|
3769
3832
|
props: {
|
|
3770
3833
|
maxHeight: {},
|
|
@@ -3777,8 +3840,8 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3777
3840
|
},
|
|
3778
3841
|
emits: ["row-click", "update:selected-list", "selected-change", "select-close"],
|
|
3779
3842
|
setup(e, { expose: t, emit: n }) {
|
|
3780
|
-
const a = n, i = e, r =
|
|
3781
|
-
|
|
3843
|
+
const a = n, i = e, r = $n(), o = V(null), l = V(null), s = V([]), v = V({ width: 0, height: 0 }), c = V(0), d = p(() => `${i.headerHeight}px`), g = V(!1), h = V([]);
|
|
3844
|
+
ie(
|
|
3782
3845
|
() => i.dataList,
|
|
3783
3846
|
() => {
|
|
3784
3847
|
h.value = [];
|
|
@@ -3787,79 +3850,79 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3787
3850
|
immediate: !0
|
|
3788
3851
|
}
|
|
3789
3852
|
);
|
|
3790
|
-
const y =
|
|
3791
|
-
|
|
3853
|
+
const y = V(!1), C = V();
|
|
3854
|
+
ie(
|
|
3792
3855
|
() => i.initing,
|
|
3793
|
-
(
|
|
3794
|
-
|
|
3856
|
+
(D) => {
|
|
3857
|
+
D ? C.value = window.setTimeout(() => {
|
|
3795
3858
|
y.value = !0;
|
|
3796
|
-
}, 500) : (clearTimeout(
|
|
3859
|
+
}, 500) : (clearTimeout(C.value), y.value = !1);
|
|
3797
3860
|
},
|
|
3798
3861
|
{
|
|
3799
3862
|
immediate: !0
|
|
3800
3863
|
}
|
|
3801
3864
|
);
|
|
3802
|
-
const
|
|
3803
|
-
|
|
3865
|
+
const B = V(!1), O = V(!1), $ = V();
|
|
3866
|
+
ie(
|
|
3804
3867
|
() => i.loading,
|
|
3805
|
-
(
|
|
3806
|
-
|
|
3807
|
-
|
|
3868
|
+
(D) => {
|
|
3869
|
+
D ? (clearTimeout($.value), l.value?.scrollTo({ top: 0, behavior: "instant" }), O.value = !1, B.value = !0) : (l.value?.scrollTo({ top: 0, behavior: "instant" }), O.value = !0, $.value = window.setTimeout(() => {
|
|
3870
|
+
B.value = !1;
|
|
3808
3871
|
}, 500));
|
|
3809
3872
|
},
|
|
3810
3873
|
{
|
|
3811
3874
|
immediate: !0
|
|
3812
3875
|
}
|
|
3813
3876
|
);
|
|
3814
|
-
const
|
|
3815
|
-
const
|
|
3816
|
-
return Array.from({ length:
|
|
3817
|
-
}),
|
|
3877
|
+
const E = p(() => {
|
|
3878
|
+
const D = v.value.height - i.headerHeight - 8, N = Math.floor(D / i.columnHeight), A = N - i.dataList.length > 0 ? N - i.dataList.length : 0;
|
|
3879
|
+
return Array.from({ length: A }).fill({});
|
|
3880
|
+
}), x = p(() => ({
|
|
3818
3881
|
width: `${v.value.width}px`,
|
|
3819
|
-
height:
|
|
3820
|
-
opacity:
|
|
3821
|
-
})), k = () => (r.default?.()?.filter((
|
|
3822
|
-
const
|
|
3823
|
-
return !
|
|
3824
|
-
}),
|
|
3825
|
-
const { align:
|
|
3882
|
+
height: B.value ? "28px" : "0px",
|
|
3883
|
+
opacity: B.value ? 1 : 0
|
|
3884
|
+
})), k = () => (r.default?.()?.filter((A) => A.type?.name === "TableListColumn") || []).filter((A) => A.props?.hidden !== !0), w = () => k().filter((N) => {
|
|
3885
|
+
const A = Qe(N.props, "minTableWidth");
|
|
3886
|
+
return !A || v.value.width >= A;
|
|
3887
|
+
}), W = p(() => w().map((N) => {
|
|
3888
|
+
const { align: A = "left", label: q, width: J, sortable: f } = N.props || {}, T = Qe(N.props, "minTableWidth");
|
|
3826
3889
|
return {
|
|
3827
|
-
label:
|
|
3828
|
-
align:
|
|
3890
|
+
label: q || "",
|
|
3891
|
+
align: A,
|
|
3829
3892
|
sortable: f,
|
|
3830
3893
|
width: J,
|
|
3831
|
-
minTableWidth:
|
|
3832
|
-
headerSlot:
|
|
3833
|
-
originalSortChangeHandler:
|
|
3894
|
+
minTableWidth: T,
|
|
3895
|
+
headerSlot: N.children?.header,
|
|
3896
|
+
originalSortChangeHandler: N.props?.onSortChange
|
|
3834
3897
|
};
|
|
3835
|
-
})),
|
|
3836
|
-
const { align:
|
|
3898
|
+
})), R = p(() => W.value.length + 1), H = p(() => w().map((N) => {
|
|
3899
|
+
const { align: A = "left", width: q } = N.props || {}, J = Qe(N.props, "widthPercent"), f = Qe(N.props, "minWidth"), T = Qe(N.props, "minTableWidth");
|
|
3837
3900
|
return {
|
|
3838
|
-
prop:
|
|
3839
|
-
align:
|
|
3840
|
-
width:
|
|
3901
|
+
prop: N.props?.prop || "",
|
|
3902
|
+
align: A,
|
|
3903
|
+
width: q,
|
|
3841
3904
|
widthPercent: J,
|
|
3842
3905
|
minWidth: f,
|
|
3843
|
-
minTableWidth:
|
|
3844
|
-
children:
|
|
3845
|
-
slotDefault:
|
|
3906
|
+
minTableWidth: T,
|
|
3907
|
+
children: N.children || {},
|
|
3908
|
+
slotDefault: N.children?.default
|
|
3846
3909
|
};
|
|
3847
|
-
})),
|
|
3848
|
-
s.value?.forEach((
|
|
3849
|
-
J !==
|
|
3910
|
+
})), U = (D, N) => {
|
|
3911
|
+
s.value?.forEach((q, J) => {
|
|
3912
|
+
J !== D && q.resetSort();
|
|
3850
3913
|
});
|
|
3851
|
-
const
|
|
3852
|
-
|
|
3853
|
-
},
|
|
3854
|
-
h.value.find((
|
|
3855
|
-
}, se = (
|
|
3856
|
-
|
|
3857
|
-
}, Q = (
|
|
3914
|
+
const A = W.value[D];
|
|
3915
|
+
A.originalSortChangeHandler && A.originalSortChangeHandler(N);
|
|
3916
|
+
}, M = (D) => {
|
|
3917
|
+
h.value.find((A) => A._index === D) ? (h.value = h.value.filter((A) => A._index !== D), a("update:selected-list", h.value), a("selected-change", h.value)) : (h.value.push({ ...i.dataList[D], _index: D }), a("update:selected-list", h.value), a("selected-change", h.value));
|
|
3918
|
+
}, se = (D) => {
|
|
3919
|
+
D === "all" ? (h.value = [], a("update:selected-list", []), a("selected-change", [])) : (h.value = i.dataList.map((N, A) => ({ ...N, _index: A })), a("update:selected-list", h.value), a("selected-change", h.value));
|
|
3920
|
+
}, Q = (D, N) => {
|
|
3858
3921
|
if (g.value) {
|
|
3859
|
-
|
|
3922
|
+
M(N);
|
|
3860
3923
|
return;
|
|
3861
3924
|
}
|
|
3862
|
-
a("row-click",
|
|
3925
|
+
a("row-click", D);
|
|
3863
3926
|
}, te = () => {
|
|
3864
3927
|
g.value = !0;
|
|
3865
3928
|
}, pe = () => {
|
|
@@ -3870,35 +3933,35 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3870
3933
|
openSelect: te,
|
|
3871
3934
|
closeSelect: pe
|
|
3872
3935
|
});
|
|
3873
|
-
let
|
|
3874
|
-
return
|
|
3875
|
-
o.value && (
|
|
3876
|
-
const
|
|
3877
|
-
v.value = { width:
|
|
3878
|
-
}),
|
|
3879
|
-
}),
|
|
3880
|
-
|
|
3881
|
-
}), (
|
|
3936
|
+
let Z = null;
|
|
3937
|
+
return Pe(() => {
|
|
3938
|
+
o.value && (Z = new ResizeObserver((D) => {
|
|
3939
|
+
const N = D[0], A = N.contentRect.width, q = N.contentRect.height;
|
|
3940
|
+
v.value = { width: A, height: q };
|
|
3941
|
+
}), Z.observe(o.value));
|
|
3942
|
+
}), ze(() => {
|
|
3943
|
+
Z && Z.disconnect();
|
|
3944
|
+
}), (D, N) => (u(), m("div", {
|
|
3882
3945
|
ref_key: "tableWrapperRef",
|
|
3883
3946
|
ref: o,
|
|
3884
3947
|
class: "table-wrapper"
|
|
3885
3948
|
}, [
|
|
3886
|
-
|
|
3949
|
+
z("div", {
|
|
3887
3950
|
class: "header-bg",
|
|
3888
|
-
style:
|
|
3951
|
+
style: G({ height: d.value })
|
|
3889
3952
|
}, null, 4),
|
|
3890
3953
|
y.value ? (u(), m("div", {
|
|
3891
3954
|
key: 0,
|
|
3892
3955
|
class: "initing-wrapper",
|
|
3893
|
-
style:
|
|
3956
|
+
style: G({ top: d.value, height: `calc(100% - ${d.value})` })
|
|
3894
3957
|
}, [
|
|
3895
|
-
|
|
3896
|
-
ne(
|
|
3958
|
+
z("div", bl, [
|
|
3959
|
+
ne(Y(Wt), {
|
|
3897
3960
|
class: "loading-icon",
|
|
3898
3961
|
size: "20px",
|
|
3899
3962
|
color: "var(--stroke-base-secondary)"
|
|
3900
3963
|
}),
|
|
3901
|
-
|
|
3964
|
+
z("div", yl, F(Y(he)("tableList.loading")), 1)
|
|
3902
3965
|
])
|
|
3903
3966
|
], 4)) : j("", !0),
|
|
3904
3967
|
ne(st, { name: "table-list-operation" }, {
|
|
@@ -3906,27 +3969,27 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3906
3969
|
g.value ? (u(), m("div", {
|
|
3907
3970
|
key: 0,
|
|
3908
3971
|
class: "opration-wrapper",
|
|
3909
|
-
style:
|
|
3972
|
+
style: G({ bottom: `calc(var(--spacing-8) + ${e.bottomPadding}px)` })
|
|
3910
3973
|
}, [
|
|
3911
|
-
|
|
3974
|
+
z("div", {
|
|
3912
3975
|
class: "operation-item",
|
|
3913
3976
|
hover: "bg-[--event-focus-secondary]",
|
|
3914
3977
|
onClick: pe
|
|
3915
3978
|
}, [
|
|
3916
|
-
ne(
|
|
3979
|
+
ne(Y(Ut), { size: "16px" })
|
|
3917
3980
|
]),
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3981
|
+
N[0] || (N[0] = z("div", { class: "operation-divider" }, null, -1)),
|
|
3982
|
+
z("div", wl, [
|
|
3983
|
+
z("div", xl, F(h.value.length), 1),
|
|
3984
|
+
z("div", kl, F(Y(he)("tableList.selected")), 1)
|
|
3922
3985
|
]),
|
|
3923
|
-
r.operation ? (u(), m("div",
|
|
3924
|
-
ae(
|
|
3986
|
+
r.operation ? (u(), m("div", Sl)) : j("", !0),
|
|
3987
|
+
ae(D.$slots, "operation", {}, void 0, !0)
|
|
3925
3988
|
], 4)) : j("", !0)
|
|
3926
3989
|
]),
|
|
3927
3990
|
_: 3
|
|
3928
3991
|
}),
|
|
3929
|
-
|
|
3992
|
+
z("div", {
|
|
3930
3993
|
ref_key: "tableContentRef",
|
|
3931
3994
|
ref: l,
|
|
3932
3995
|
class: "table-content-wrapper no-scroll-bar"
|
|
@@ -3935,54 +3998,54 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3935
3998
|
key: c.value,
|
|
3936
3999
|
class: "cg-table w-full border-separate"
|
|
3937
4000
|
}, [
|
|
3938
|
-
|
|
3939
|
-
style:
|
|
4001
|
+
z("thead", {
|
|
4002
|
+
style: G({ height: d.value })
|
|
3940
4003
|
}, [
|
|
3941
|
-
|
|
3942
|
-
ne(
|
|
4004
|
+
z("tr", null, [
|
|
4005
|
+
ne(Sn, {
|
|
3943
4006
|
type: "select",
|
|
3944
4007
|
height: d.value,
|
|
3945
4008
|
"select-visible": g.value,
|
|
3946
4009
|
"select-all-mode": h.value.length === 0 ? "none" : h.value.length === e.dataList.length ? "all" : "some",
|
|
3947
4010
|
onSelectAllMode: se
|
|
3948
4011
|
}, null, 8, ["height", "select-visible", "select-all-mode"]),
|
|
3949
|
-
(u(!0), m(
|
|
4012
|
+
(u(!0), m(Le, null, Ve(W.value, (A, q) => (u(), de(Sn, {
|
|
3950
4013
|
ref_for: !0,
|
|
3951
4014
|
ref_key: "headerCellRefs",
|
|
3952
4015
|
ref: s,
|
|
3953
|
-
key:
|
|
3954
|
-
label:
|
|
3955
|
-
align:
|
|
4016
|
+
key: q,
|
|
4017
|
+
label: A.label,
|
|
4018
|
+
align: A.align,
|
|
3956
4019
|
height: d.value,
|
|
3957
|
-
width:
|
|
3958
|
-
sortable:
|
|
4020
|
+
width: A.width,
|
|
4021
|
+
sortable: A.sortable,
|
|
3959
4022
|
"select-mode": g.value,
|
|
3960
|
-
onSortChange: (J) =>
|
|
4023
|
+
onSortChange: (J) => U(Number(q), J)
|
|
3961
4024
|
}, on({ _: 2 }, [
|
|
3962
|
-
|
|
4025
|
+
A.headerSlot ? {
|
|
3963
4026
|
name: "default",
|
|
3964
4027
|
fn: ve(() => [
|
|
3965
|
-
(u(), de(it(() =>
|
|
4028
|
+
(u(), de(it(() => A.headerSlot({}))))
|
|
3966
4029
|
]),
|
|
3967
4030
|
key: "0"
|
|
3968
4031
|
} : void 0
|
|
3969
4032
|
]), 1032, ["label", "align", "height", "width", "sortable", "select-mode", "onSortChange"]))), 128))
|
|
3970
4033
|
])
|
|
3971
4034
|
], 4),
|
|
3972
|
-
e.dataList.length > 0 ? (u(), m("tbody",
|
|
3973
|
-
|
|
4035
|
+
e.dataList.length > 0 ? (u(), m("tbody", $l, [
|
|
4036
|
+
z("tr", {
|
|
3974
4037
|
class: "loading-wrapper",
|
|
3975
|
-
style:
|
|
4038
|
+
style: G(x.value)
|
|
3976
4039
|
}, [
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
ne(
|
|
4040
|
+
z("td", { colspan: R.value }, [
|
|
4041
|
+
z("div", Ol, [
|
|
4042
|
+
O.value ? (u(), m(Le, { key: 0 }, [
|
|
4043
|
+
ne(Y(la), {
|
|
3981
4044
|
size: "16px",
|
|
3982
4045
|
color: "var(--stroke-color-success)"
|
|
3983
4046
|
}),
|
|
3984
|
-
|
|
3985
|
-
], 64)) : (u(), de(
|
|
4047
|
+
z("span", Tl, F(Y(he)("tableList.refreshed")), 1)
|
|
4048
|
+
], 64)) : (u(), de(Y(Wt), {
|
|
3986
4049
|
key: 1,
|
|
3987
4050
|
class: "loading-icon",
|
|
3988
4051
|
size: "16px",
|
|
@@ -3991,94 +4054,94 @@ const ol = "var(--stroke-outline-subtle)", sl = "var(--material-brand-primary)",
|
|
|
3991
4054
|
])
|
|
3992
4055
|
], 8, Cl)
|
|
3993
4056
|
], 4),
|
|
3994
|
-
(u(!0), m(
|
|
3995
|
-
key:
|
|
4057
|
+
(u(!0), m(Le, null, Ve(e.dataList, (A, q) => (u(), m("tr", {
|
|
4058
|
+
key: q,
|
|
3996
4059
|
class: "table-row",
|
|
3997
|
-
onClick: (J) => Q(
|
|
4060
|
+
onClick: (J) => Q(A, q)
|
|
3998
4061
|
}, [
|
|
3999
4062
|
ne(mt, {
|
|
4000
4063
|
type: "select",
|
|
4001
4064
|
"select-visible": g.value,
|
|
4002
|
-
index:
|
|
4065
|
+
index: q,
|
|
4003
4066
|
"column-height": e.columnHeight,
|
|
4004
|
-
data:
|
|
4005
|
-
selected: h.value.findIndex((J) => J._index ===
|
|
4006
|
-
onSelectChange:
|
|
4067
|
+
data: A,
|
|
4068
|
+
selected: h.value.findIndex((J) => J._index === q) !== -1,
|
|
4069
|
+
onSelectChange: M
|
|
4007
4070
|
}, null, 8, ["select-visible", "index", "column-height", "data", "selected"]),
|
|
4008
|
-
(u(!0), m(
|
|
4009
|
-
key: `${
|
|
4010
|
-
index:
|
|
4071
|
+
(u(!0), m(Le, null, Ve(H.value, (J, f) => (u(), de(mt, {
|
|
4072
|
+
key: `${q}-${f}`,
|
|
4073
|
+
index: q,
|
|
4011
4074
|
"column-height": e.columnHeight,
|
|
4012
4075
|
prop: J.prop,
|
|
4013
4076
|
align: J.align,
|
|
4014
4077
|
width: J.width,
|
|
4015
4078
|
"width-percent": J.widthPercent,
|
|
4016
4079
|
"min-width": J.minWidth,
|
|
4017
|
-
data:
|
|
4080
|
+
data: A
|
|
4018
4081
|
}, on({ _: 2 }, [
|
|
4019
4082
|
J.slotDefault ? {
|
|
4020
4083
|
name: "default",
|
|
4021
|
-
fn: ve((
|
|
4022
|
-
(u(), de(it(() => J.slotDefault(
|
|
4084
|
+
fn: ve((T) => [
|
|
4085
|
+
(u(), de(it(() => J.slotDefault(T))))
|
|
4023
4086
|
]),
|
|
4024
4087
|
key: "0"
|
|
4025
4088
|
} : void 0
|
|
4026
4089
|
]), 1032, ["index", "column-height", "prop", "align", "width", "width-percent", "min-width", "data"]))), 128))
|
|
4027
4090
|
], 8, zl))), 128)),
|
|
4028
|
-
(u(!0), m(
|
|
4029
|
-
key:
|
|
4091
|
+
(u(!0), m(Le, null, Ve(E.value, (A, q) => (u(), m("tr", {
|
|
4092
|
+
key: q + e.dataList.length
|
|
4030
4093
|
}, [
|
|
4031
4094
|
ne(mt, {
|
|
4032
4095
|
type: "select",
|
|
4033
4096
|
"select-visible": g.value,
|
|
4034
|
-
index:
|
|
4097
|
+
index: q + e.dataList.length,
|
|
4035
4098
|
"column-height": e.columnHeight,
|
|
4036
4099
|
blank: ""
|
|
4037
4100
|
}, null, 8, ["select-visible", "index", "column-height"]),
|
|
4038
|
-
(u(!0), m(
|
|
4039
|
-
key: `${
|
|
4040
|
-
index:
|
|
4101
|
+
(u(!0), m(Le, null, Ve(H.value, (J, f) => (u(), de(mt, {
|
|
4102
|
+
key: `${q + e.dataList.length}-${f}`,
|
|
4103
|
+
index: q + e.dataList.length,
|
|
4041
4104
|
"column-height": e.columnHeight,
|
|
4042
4105
|
blank: ""
|
|
4043
4106
|
}, null, 8, ["index", "column-height"]))), 128))
|
|
4044
4107
|
]))), 128)),
|
|
4045
|
-
|
|
4108
|
+
E.value.length ? j("", !0) : (u(), m("div", {
|
|
4046
4109
|
key: 0,
|
|
4047
4110
|
class: "shrink-0",
|
|
4048
|
-
style:
|
|
4111
|
+
style: G({ height: `${e.bottomPadding}px` })
|
|
4049
4112
|
}, null, 4))
|
|
4050
4113
|
])) : j("", !0)
|
|
4051
4114
|
])),
|
|
4052
|
-
!e.loading && e.dataList.length === 0 ? (u(), m("div",
|
|
4053
|
-
|
|
4054
|
-
ne(
|
|
4115
|
+
!e.loading && e.dataList.length === 0 ? (u(), m("div", Ll, [
|
|
4116
|
+
z("div", El, [
|
|
4117
|
+
ne(Y(oa), {
|
|
4055
4118
|
size: "40px",
|
|
4056
4119
|
color: "var(--text-base-quaternary)"
|
|
4057
4120
|
}),
|
|
4058
|
-
|
|
4121
|
+
z("div", Rl, F(Y(he)("common.noData")), 1)
|
|
4059
4122
|
])
|
|
4060
4123
|
])) : (u(), m("div", Bl))
|
|
4061
4124
|
], 512)
|
|
4062
4125
|
], 512));
|
|
4063
4126
|
}
|
|
4064
|
-
}), to = /* @__PURE__ */ tn(
|
|
4127
|
+
}), to = /* @__PURE__ */ tn(Wl, [["__scopeId", "data-v-605185e2"]]);
|
|
4065
4128
|
export {
|
|
4066
4129
|
Zl as Badge,
|
|
4067
|
-
|
|
4130
|
+
_e as Button,
|
|
4068
4131
|
Xl as Cascader,
|
|
4069
4132
|
qt as Checkbox,
|
|
4070
4133
|
Yn as Dialog,
|
|
4071
4134
|
Il as Divider,
|
|
4072
4135
|
zn as Input,
|
|
4073
4136
|
cn as Message,
|
|
4074
|
-
|
|
4137
|
+
Fl as Notification,
|
|
4075
4138
|
Yl as Option,
|
|
4076
4139
|
Mt as Popover,
|
|
4077
|
-
|
|
4140
|
+
Hl as Progress,
|
|
4078
4141
|
Ml as Radio,
|
|
4079
4142
|
ql as Select,
|
|
4080
4143
|
Gl as Switch,
|
|
4081
|
-
|
|
4144
|
+
En as TABS_KEY,
|
|
4082
4145
|
Xn as TIMELINE_KEY,
|
|
4083
4146
|
ol as TIMELINE_LINE_COLOR,
|
|
4084
4147
|
dl as TIMELINE_STATUS_DANGER_COLOR,
|
|
@@ -4095,11 +4158,11 @@ export {
|
|
|
4095
4158
|
Ql as Upload,
|
|
4096
4159
|
ll as confirm,
|
|
4097
4160
|
Yt as getDialogZIndex,
|
|
4098
|
-
|
|
4099
|
-
|
|
4161
|
+
Sr as isElementMeasurable,
|
|
4162
|
+
$r as resolveTextOverflow,
|
|
4100
4163
|
Un as selectInjectKey,
|
|
4101
4164
|
Dl as setCregisUILocale,
|
|
4102
|
-
|
|
4103
|
-
|
|
4165
|
+
_l as setDialogZIndex,
|
|
4166
|
+
Fn as useClickOutside,
|
|
4104
4167
|
Ul as useTextOverflow
|
|
4105
4168
|
};
|