@varlet/ui
Version:
A Vue3 component library based on Material Design 2 and 3, supporting mobile and desktop.
2,222 lines • 774 kB
JavaScript
import { onMounted as yo, nextTick as Ye, onActivated as Lo, computed as B, ref as w, watch as fe, isRef as Jg, onBeforeUnmount as ua, onDeactivated as wr, onUnmounted as Qr, getCurrentInstance as xo, inject as Ys, unref as wf, reactive as en, provide as Ws, isVNode as Qg, defineComponent as ee, h as xr, Comment as xg, Fragment as Ae, createApp as _g, onBeforeMount as eb, createVNode as X, Teleport as lo, Transition as _e, withDirectives as Ne, vShow as eo, mergeProps as je, createElementBlock as P, openBlock as g, normalizeClass as p, createBlock as we, resolveDynamicComponent as kr, normalizeStyle as Z, resolveComponent as x, resolveDirective as We, createCommentVNode as G, createElementVNode as R, toDisplayString as le, withCtx as ue, renderSlot as H, renderList as qe, createTextVNode as De, onUpdated as _r, normalizeProps as Ko, guardReactiveProps as ca, createSlots as Xo, withModifiers as Ln, vModelText as nb, withKeys as Lu, TransitionGroup as ob } from "vue";
function Ks(e) {
return { all: e = e || /* @__PURE__ */ new Map(), on: function(n, o) {
var r = e.get(n);
r ? r.push(o) : e.set(n, [o]);
}, off: function(n, o) {
var r = e.get(n);
r && (o ? r.splice(r.indexOf(o) >>> 0, 1) : e.set(n, []));
}, emit: function(n, o) {
var r = e.get(n);
r && r.slice().map(function(t) {
t(o);
}), (r = e.get("*")) && r.slice().map(function(t) {
t(n, o);
});
} };
}
const rb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
default: Ks
}, Symbol.toStringTag, { value: "Module" }));
var qs = Object.defineProperty, tb = Object.defineProperties, ab = Object.getOwnPropertyDescriptor, ib = Object.getOwnPropertyDescriptors, lb = Object.getOwnPropertyNames, Fu = Object.getOwnPropertySymbols, kf = Object.prototype.hasOwnProperty, sb = Object.prototype.propertyIsEnumerable, Uu = (e, n, o) => n in e ? qs(e, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[n] = o, $f = (e, n) => {
for (var o in n || (n = {}))
kf.call(n, o) && Uu(e, o, n[o]);
if (Fu)
for (var o of Fu(n))
sb.call(n, o) && Uu(e, o, n[o]);
return e;
}, Cf = (e, n) => tb(e, ib(n)), Sf = (e, n) => {
for (var o in n)
qs(e, o, { get: n[o], enumerable: !0 });
}, ub = (e, n, o, r) => {
if (n && typeof n == "object" || typeof n == "function")
for (let t of lb(n))
!kf.call(e, t) && t !== o && qs(e, t, { get: () => n[t], enumerable: !(r = ab(n, t)) || r.enumerable });
return e;
}, Pf = (e, n, o) => (ub(e, n, "default"), o), Of = {};
Sf(Of, {
NOOP: () => Jb,
assert: () => Mf,
at: () => et,
baseRound: () => ma,
call: () => $,
camelize: () => fa,
cancelAnimationFrame: () => cr,
ceil: () => s0,
chunk: () => Pb,
clamp: () => $n,
clampArrayRange: () => zf,
classes: () => Js,
cloneDeep: () => Qb,
cloneDeepWith: () => Xf,
copyText: () => Ff,
createNamespaceFn: () => xs,
createStorage: () => pa,
debounce: () => Zb,
delay: () => cb,
difference: () => Tb,
differenceWith: () => Kt,
doubleRaf: () => bn,
download: () => qf,
ensurePrefix: () => Fb,
ensureSuffix: () => Ub,
find: () => Nf,
floor: () => dl,
genNumberKey: () => Sb,
genStringKey: () => jb,
getAllParentScroller: () => Hf,
getGlobalThis: () => nt,
getParentScroller: () => _s,
getRect: () => nn,
getScrollLeft: () => rt,
getScrollTop: () => go,
getStyle: () => Zn,
groupBy: () => Db,
hasOwn: () => Go,
inBrowser: () => oo,
inMobile: () => Vr,
inViewport: () => eu,
intersection: () => Bb,
intersectionWith: () => Rf,
isArray: () => Fe,
isArrayBuffer: () => Nt,
isBlob: () => wb,
isBoolean: () => ot,
isDOMException: () => Lt,
isDataView: () => Vt,
isDate: () => Rt,
isEmpty: () => qn,
isEmptyPlainObject: () => $b,
isEqual: () => pb,
isEqualWith: () => Bf,
isError: () => jt,
isFile: () => yb,
isFunction: () => mn,
isMap: () => Ft,
isNonEmptyArray: () => vb,
isNullish: () => mb,
isNumber: () => Tn,
isNumeric: () => Gs,
isObject: () => ho,
isPlainObject: () => Fn,
isPrimitive: () => kb,
isPromise: () => hb,
isRegExp: () => Ht,
isSet: () => Ut,
isString: () => sn,
isSymbol: () => gb,
isTruthy: () => bb,
isTypedArray: () => Yt,
isWeakMap: () => Df,
isWeakSet: () => If,
isWindow: () => da,
kebabCase: () => Qs,
localStorage: () => Wf,
lowerFirst: () => Yb,
mapObject: () => Rb,
maxBy: () => n0,
mean: () => t0,
meanBy: () => a0,
merge: () => xb,
mergeWith: () => Gf,
minBy: () => o0,
mitt: () => Ks,
motion: () => nu,
normalizeToArray: () => po,
objectToString: () => Tf,
omit: () => Nb,
omitBy: () => Vb,
once: () => Gb,
pascalCase: () => Uf,
pick: () => Ab,
pickBy: () => Mb,
prettyJSONObject: () => jf,
preventDefault: () => Me,
promiseWithResolvers: () => Lb,
raf: () => vo,
randomColor: () => Kb,
randomNumber: () => Ef,
randomString: () => qb,
removeArrayBlank: () => Vf,
removeArrayEmpty: () => Eb,
removeItem: () => Io,
requestAnimationFrame: () => Ao,
round: () => l0,
sample: () => i0,
sessionStorage: () => Yf,
shuffle: () => zb,
slash: () => Xb,
sum: () => Jf,
sumBy: () => Qf,
sumHash: () => r0,
supportTouch: () => Af,
throttle: () => va,
times: () => db,
toArrayBuffer: () => _b,
toDataURL: () => Zf,
toNumber: () => W,
toRawType: () => Xe,
toText: () => e0,
toTypeString: () => Xs,
toggleItem: () => Ob,
tryParseJSON: () => Kf,
uniq: () => cl,
uniqBy: () => Wt,
upperFirst: () => Wb,
xor: () => Ib,
xorWith: () => Lf
});
function et(e, n) {
if (e.length)
return n < 0 && (n += e.length), e[n];
}
function $n(e, n, o) {
return Math.min(o, Math.max(n, e));
}
function zf(e, n) {
return $n(e, 0, n.length - 1);
}
function cb(e) {
return new Promise((n) => {
setTimeout(n, e);
});
}
function Ef(e = 0, n = 100) {
return Math.floor(Math.random() * (n - e + 1)) + e;
}
function db(e, n) {
return Array.from({ length: e }, (o, r) => n(r));
}
function oo() {
return typeof window < "u";
}
function nt() {
return typeof globalThis < "u" ? globalThis : oo() ? window : typeof global < "u" ? global : self;
}
var { hasOwnProperty: fb } = Object.prototype;
function Go(e, n) {
return fb.call(e, n);
}
function Vr() {
return oo() && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
}
function Fe(e) {
return Array.isArray(e);
}
var Tf = Object.prototype.toString;
function Xs(e) {
return Tf.call(e);
}
function Xe(e) {
return Xs(e).slice(8, -1);
}
function Nt(e) {
return Xe(e) === "ArrayBuffer";
}
function ot(e) {
return typeof e == "boolean";
}
function Vt(e) {
return Xe(e) === "DataView";
}
function Rt(e) {
return Xe(e) === "Date";
}
function Lt(e) {
return Xe(e) === "DOMException";
}
function qn(e) {
return e == null || e === "" || Fe(e) && !e.length;
}
function Ft(e) {
return Xe(e) === "Map";
}
function Fn(e) {
return Xe(e) === "Object";
}
function Ut(e) {
return Xe(e) === "Set";
}
function ho(e) {
return typeof e == "object" && e !== null;
}
function Ht(e) {
return Xe(e) === "RegExp";
}
function jt(e) {
return Xe(e) === "Error";
}
function Yt(e) {
return [
"Int8Array",
"Uint8Array",
"Uint8ClampedArray",
"Int16Array",
"Uint16Array",
"Int32Array",
"Uint32Array",
"Float32Array",
"Float64Array",
"BigInt64Array",
"BigUint64Array"
].includes(Xe(e));
}
function Bf(e, n, o) {
const r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap();
function a(i, l, s, u) {
if (o(i, l) === !0 || i === l || i !== i && l !== l)
return !0;
if (!ho(i) || !ho(l))
return i === l;
if (i.constructor !== l.constructor)
return !1;
if (Xe(i) === "String" && Xe(l) === "String" || Xe(i) === "Number" && Xe(l) === "Number" || Xe(i) === "Boolean" && Xe(l) === "Boolean" || Xe(i) === "BigInt" && Xe(l) === "BigInt" || Xe(i) === "Symbol" && Xe(l) === "Symbol")
return i.valueOf() === l.valueOf();
if (Rt(i) && Rt(l))
return i.getTime() === l.getTime();
if (Ht(i) && Ht(l))
return i.source === l.source && i.flags === l.flags;
if (jt(i) && jt(l))
return i.name === l.name && i.message === l.message && i.cause === l.cause;
if (Lt(i) && Lt(l))
return i.name === l.name && i.message === l.message;
if (Yt(i) && Yt(l) || Vt(i) && Vt(l)) {
if (i.byteLength !== l.byteLength)
return !1;
const d = new Uint8Array(i.buffer), f = new Uint8Array(l.buffer);
return d.every((v, h) => v === f[h]);
}
if (Nt(i) && Nt(l)) {
if (i.byteLength !== l.byteLength)
return !1;
const d = new Uint8Array(i), f = new Uint8Array(l);
return d.every((v, h) => v === f[h]);
}
if (s.get(i) === l && u.get(l) === i)
return !0;
if (s.set(i, l), u.set(l, i), Ft(i) && Ft(l) || Ut(i) && Ut(l)) {
if (i.size !== l.size)
return !1;
const d = [...i], f = [...l], v = d.every((h, m) => a(h, f[m], s, u));
return s.delete(i), u.delete(l), v;
}
if (Fe(i) && Fe(l)) {
if (i.length !== l.length)
return !1;
const d = i.every((f, v) => a(f, l[v], s, u));
return s.delete(i), u.delete(l), d;
}
if (Fn(i) && Fn(l)) {
const d = [...Object.keys(i), ...Object.getOwnPropertySymbols(i)], f = [...Object.keys(l), ...Object.getOwnPropertySymbols(l)];
if (d.length !== f.length)
return !1;
const v = d.every(
(h) => a(i[h], l[h], s, u)
);
return s.delete(i), u.delete(l), v;
}
return !1;
}
return a(e, n, r, t);
}
function pb(e, n) {
return Bf(e, n, () => {
});
}
function mn(e) {
return typeof e == "function";
}
function vb(e) {
return Fe(e) && !!e.length;
}
function mb(e) {
return e == null;
}
function Tn(e) {
return typeof e == "number";
}
function sn(e) {
return typeof e == "string";
}
function Gs(e) {
return Tn(e) || sn(e) && /^[-+]?\d+$/.test(e);
}
function hb(e) {
return ho(e) && mn(e.then) && mn(e.catch);
}
function gb(e) {
return typeof e == "symbol";
}
function bb(e) {
return !!e;
}
function Df(e) {
return Xe(e) === "WeakMap";
}
function If(e) {
return Xe(e) === "WeakSet";
}
function da(e) {
return e === window;
}
function Af() {
return oo() && "ontouchstart" in window;
}
function yb(e) {
return Xe(e) === "File";
}
function wb(e) {
return Xe(e) === "Blob";
}
function kb(e) {
return e == null || typeof e != "object" && typeof e != "function";
}
function $b(e) {
return Fn(e) && Object.keys(e).length === 0 && Object.getOwnPropertySymbols(e).length === 0;
}
function Mf(e, n) {
if (!e)
throw new Error(n);
}
function W(e) {
return e == null ? 0 : sn(e) ? (e = parseFloat(e), e = Number.isNaN(e) ? 0 : e, e) : ot(e) ? Number(e) : e;
}
var Cb = 0;
function Sb() {
return Cb++;
}
function Pb(e, n = 1) {
n = $n(n, 1, e.length);
const o = [];
let r = 0;
for (; r < e.length; )
o.push(e.slice(r, r + n)), r += n;
return o;
}
function Io(e, n) {
if (e.length) {
const o = e.indexOf(n);
if (o > -1)
return e.splice(o, 1);
}
}
function Ob(e, n) {
return e.includes(n) ? Io(e, n) : e.push(n), e;
}
function cl(e) {
return [...new Set(e)];
}
function Wt(e, n) {
return e.reduce((o, r) => (o.findIndex((a) => n(r, a)) === -1 && o.push(r), o), []);
}
function Nf(e, n, o = "start") {
let r = o === "start" ? 0 : e.length - 1;
for (; e.length > 0 && r >= 0 && r <= e.length - 1; ) {
if (n(e[r], r, e))
return [e[r], r];
o === "start" ? r++ : r--;
}
return [null, -1];
}
function zb(e) {
for (let n = e.length - 1; n > 0; n--) {
const o = Math.floor(Math.random() * (n + 1));
[e[n], e[o]] = [e[o], e[n]];
}
return e;
}
function Vf(e) {
return e.filter((n) => n != null);
}
function Eb(e) {
return e.filter((n) => n != null && n !== "");
}
function po(e) {
return Fe(e) ? e : [e];
}
function Kt(e, ...n) {
const o = et(n, -1), r = n.slice(0, -1).reduce((t, a) => [...t, ...a], []);
return e.filter((t) => !r.some((a) => o(t, a)));
}
function Tb(e, ...n) {
return Kt(e, ...n, (o, r) => o === r);
}
function Rf(...e) {
const n = et(e, -1), o = e.slice(0, -1);
if (o.length === 0)
return [];
if (o.length === 1)
return Wt(o[0], n);
function r(t, a) {
return t.filter((i) => a.some((l) => n(i, l)));
}
return Wt(
o.reduce((t, a) => r(t, a)),
n
);
}
function Bb(...e) {
return Rf(...e, (n, o) => n === o);
}
function Db(e, n) {
return e.reduce(
(o, r) => {
var t;
const a = n(r);
return ((t = o[a]) != null ? t : o[a] = []).push(r), o;
},
{}
);
}
function Lf(...e) {
const n = et(e, -1), o = e.slice(0, -1);
return Wt(
o.reduce((r, t) => [...Kt(r, t, n), ...Kt(t, r, n)]),
n
);
}
function Ib(...e) {
return Lf(...e, (n, o) => n === o);
}
function Ab(e, n) {
return n.reduce(
(o, r) => (o[r] = e[r], o),
{}
);
}
function Mb(e, n) {
return [...Object.keys(e), ...Object.getOwnPropertySymbols(e)].reduce((r, t) => {
const a = e[t];
return n(a, t) && (r[t] = a), r;
}, {});
}
function Nb(e, n) {
return [...Object.keys(e), ...Object.getOwnPropertySymbols(e)].reduce(
(r, t) => (n.includes(t) || (r[t] = e[t]), r),
{}
);
}
function Vb(e, n) {
return [...Object.keys(e), ...Object.getOwnPropertySymbols(e)].reduce((r, t) => {
const a = e[t];
return n(a, t) || (r[t] = a), r;
}, {});
}
function Rb(e, n) {
return Object.entries(e).reduce(
(o, [r, t]) => {
const a = n(r, t);
if (Fe(a)) {
const [i, l] = a;
o[i] = l;
}
return o;
},
{}
);
}
function Lb() {
let e, n;
return { promise: new Promise((r, t) => {
e = r, n = t;
}), resolve: e, reject: n };
}
var Zs = {};
Sf(Zs, {
cancelAnimationFrame: () => cr,
classes: () => Js,
copyText: () => Ff,
createNamespaceFn: () => xs,
createStorage: () => pa,
doubleRaf: () => bn,
download: () => qf,
getAllParentScroller: () => Hf,
getParentScroller: () => _s,
getRect: () => nn,
getScrollLeft: () => rt,
getScrollTop: () => go,
getStyle: () => Zn,
inViewport: () => eu,
localStorage: () => Wf,
mitt: () => Ks,
motion: () => nu,
prettyJSONObject: () => jf,
preventDefault: () => Me,
raf: () => vo,
requestAnimationFrame: () => Ao,
sessionStorage: () => Yf,
tryParseJSON: () => Kf
});
function cr(e) {
const n = nt();
n.cancelAnimationFrame ? n.cancelAnimationFrame(e) : n.clearTimeout(e);
}
function Js(...e) {
return e.map((n) => {
if (Fe(n)) {
const [o, r, t = null] = n;
return o ? r : t;
}
return n;
});
}
function Ff(e) {
if (!e)
return;
const n = document.createElement("textarea");
n.value = e, n.style.position = "fixed", n.style.opacity = "0", document.body.appendChild(n), n.select(), document.execCommand("copy"), document.body.removeChild(n);
}
function fa(e) {
return e = e.replace(/-(\w)/g, (n, o) => o.toUpperCase()), e.replace(e.charAt(0), e.charAt(0).toLowerCase());
}
function Fb(e, n) {
return e.startsWith(n) ? e : n + e;
}
function Ub(e, n) {
return e.endsWith(n) ? e : e + n;
}
var Hb = 0;
function jb() {
return `generated-key-${Hb++}`;
}
function Qs(e) {
return e.replace(/([A-Z])/g, " $1").trim().split(" ").join("-").toLowerCase();
}
function Uf(e) {
return fa(e).replace(e.charAt(0), e.charAt(0).toUpperCase());
}
function Yb(e) {
return e.charAt(0).toLowerCase() + e.slice(1);
}
function Wb(e) {
return e.charAt(0).toUpperCase() + e.slice(1);
}
function Kb() {
const e = "0123456789abcdef";
let n = "#";
for (let o = 0; o < 6; o++)
n += e[Math.floor(Math.random() * 16)];
return n;
}
function qb(e = 10) {
let n = o();
for (; n.length < e; )
n += o();
function o() {
return Math.random().toString(36).slice(2);
}
return n.slice(0, e);
}
function Xb(e) {
return e.startsWith("\\\\?\\") ? e : e.replace(/\\/g, "/");
}
function xs(e) {
return (n) => {
const o = `${e}-${n}`, r = (t) => t ? t[0] === "$" ? t.replace("$", e) : t.startsWith("--") ? `${o}${t}` : `${o}__${t}` : o;
return {
name: Uf(o),
n: r,
classes: Js
};
};
}
function Ao(e) {
const n = nt();
return n.requestAnimationFrame ? n.requestAnimationFrame(e) : n.setTimeout(e);
}
function bn() {
return new Promise((e) => {
Ao(() => {
Ao(e);
});
});
}
function Zn(e) {
return window.getComputedStyle(e);
}
function _s(e) {
let n = e;
for (; n && !(!n.parentNode || (n = n.parentNode, n === document.body || n === document.documentElement)); ) {
const o = /(scroll|auto)/, { overflowY: r, overflow: t } = Zn(n);
if (o.test(r) || o.test(t))
return n;
}
return window;
}
function Hf(e) {
const n = [];
let o = e;
for (; !da(o); )
o = _s(o), n.push(o);
return n;
}
function nn(e) {
if (da(e)) {
const n = e.innerWidth, o = e.innerHeight, r = {
x: 0,
y: 0,
top: 0,
left: 0,
right: n,
bottom: o,
width: n,
height: o
};
return Cf($f({}, r), {
toJSON: () => r
});
}
return e.getBoundingClientRect();
}
function rt(e) {
const n = "scrollLeft" in e ? e.scrollLeft : e.scrollX;
return Math.max(n, 0);
}
function go(e) {
const n = "scrollTop" in e ? e.scrollTop : e.scrollY;
return Math.max(n, 0);
}
function eu(e) {
const { top: n, bottom: o, left: r, right: t } = nn(e), { width: a, height: i } = nn(window), l = r <= a && t >= 0, s = n <= i && o >= 0;
return l && s;
}
function jf(e) {
return JSON.stringify(e, null, 2);
}
function Me(e) {
e.cancelable !== !1 && e.preventDefault();
}
function vo() {
return new Promise((e) => {
Ao(e);
});
}
function pa(e) {
return Cf($f({}, e), {
set(n, o) {
o != null && (sn(o) || (o = JSON.stringify(o)), e.setItem(n, o));
},
get(n) {
const o = e.getItem(n);
try {
return JSON.parse(o);
} catch {
return o;
}
},
remove(n) {
e.removeItem(n);
}
});
}
var Yf = pa(nt().sessionStorage), Wf = pa(nt().localStorage);
function Kf(e) {
try {
return JSON.parse(e);
} catch {
return;
}
}
function qf(e, n = "file") {
const o = document.createElement("a");
o.style.display = "none", o.href = sn(e) ? e : URL.createObjectURL(e), o.download = n, document.body.appendChild(o), o.click(), URL.revokeObjectURL(o.href), document.body.removeChild(o);
}
function nu(e) {
const {
from: n,
to: o,
duration: r = 300,
frame: t = () => {
},
timingFunction: a = (b) => b,
onStateChange: i = () => {
}
} = e;
let l = "pending", s = n;
const u = o - n;
let c, d, f, v = 0;
function h() {
if (l === "running" || l === "finished")
return;
k("running");
const b = performance.now();
d = d ?? b, v += f != null ? b - f : 0, f = void 0, S();
function S() {
c = Ao(() => {
const O = performance.now() - d - v, D = $n(O / r, 0, 1);
if (s = u * a(D) + n, D >= 1) {
k("finished"), t({ value: o, done: !0 });
return;
}
t({ value: s, done: !1 }), S();
});
}
}
function m() {
l === "running" && (cr(c), k("paused"), f = performance.now());
}
function y() {
cr(c), k("pending"), s = n, c = void 0, d = void 0, f = void 0, v = 0;
}
function C() {
return l;
}
function k(b) {
l = b, i(b);
}
return {
start: h,
pause: m,
reset: y,
getState: C
};
}
Pf(Zs, rb);
Pf(Of, Zs);
function $(e, ...n) {
if (Fe(e))
return e.map((o) => o(...n));
if (e)
return e(...n);
}
function Gb(e) {
let n = !1, o;
return function(...r) {
return n || (n = !0, o = e.apply(this, r)), o;
};
}
function Zb(e, n = 0) {
let o;
return function(...r) {
o && clearTimeout(o), o = setTimeout(() => {
e.apply(this, r);
}, n);
};
}
function va(e, n = 200) {
let o, r = 0;
return function t(...a) {
const i = performance.now(), l = i - r;
r || (r = i), o && clearTimeout(o), l >= n ? (e.apply(this, a), r = i) : o = setTimeout(() => {
t.apply(this, a);
}, n - l);
};
}
function Jb() {
}
function Xf(e, n) {
const o = /* @__PURE__ */ new WeakMap();
function r(i, l) {
const s = n(i);
if (s !== void 0)
return s;
if (!ho(i))
return i;
if (l.has(i))
return l.get(i);
if (Rt(i))
return new Date(i);
if (Ht(i))
return new RegExp(i);
if (Ft(i)) {
const u = /* @__PURE__ */ new Map();
return l.set(i, u), i.forEach((c, d) => {
u.set(r(d, l), r(c, l));
}), u;
}
if (Ut(i)) {
const u = /* @__PURE__ */ new Set();
return l.set(i, u), i.forEach((c) => {
u.add(r(c, l));
}), u;
}
if (Xe(i) === "String" || Xe(i) === "Number" || Xe(i) === "Boolean")
return a(i, i.valueOf());
if (Df(i) || If(i) || jt(i) || Lt(i))
return {};
if (Yt(i))
return a(i, t(i.buffer), i.byteOffset, i.length);
if (Vt(i))
return a(i, t(i.buffer), i.byteOffset, i.byteLength);
if (Nt(i))
return t(i);
if (Fe(i)) {
const u = [];
return l.set(i, u), i.forEach((c, d) => {
u[d] = r(c, l);
}), u;
}
if (Fn(i)) {
const u = Object.create(Reflect.getPrototypeOf(i));
return l.set(i, u), [...Object.keys(i), ...Object.getOwnPropertySymbols(i)].forEach((d) => {
u[d] = r(i[d], l);
}), u;
}
return i;
}
function t(i) {
const l = new ArrayBuffer(i.byteLength);
return new Uint8Array(l).set(new Uint8Array(i)), l;
}
function a(i, ...l) {
return new i.constructor(...l);
}
return r(e, o);
}
function Qb(e) {
return Xf(e, () => {
});
}
function Gf(e, ...n) {
const o = et(n, -1), r = [e, ...n.slice(0, -1)];
let t = r.length - 1, a = r[t];
for (; t; )
a = i(r[t - 1], a, o), t--;
function i(l, s, u) {
function c(d, f) {
for (const v in f)
if (Go(f, v)) {
const h = f[v], m = d[v], y = u(m, h, v, l, s);
y !== void 0 ? d[v] = y : ho(h) ? ho(m) ? d[v] = c(m, h) : d[v] = c(Fe(h) ? [] : {}, h) : d[v] = h;
}
return d;
}
return c(l, s);
}
return a;
}
function xb(e, ...n) {
return Gf(e, ...n, () => {
});
}
function _b(e) {
return new Promise((n) => {
const o = new FileReader();
o.onload = () => {
n(o.result);
}, o.readAsArrayBuffer(e);
});
}
function Zf(e) {
return new Promise((n) => {
const o = new FileReader();
o.onload = () => {
n(o.result);
}, o.readAsDataURL(e);
});
}
function e0(e) {
return new Promise((n) => {
const o = new FileReader();
o.onload = () => {
n(o.result);
}, o.readAsText(e);
});
}
function n0(e, n) {
if (e.length)
return e.reduce((o, r) => n(o) > n(r) ? o : r, e[0]);
}
function o0(e, n) {
if (e.length)
return e.reduce((o, r) => n(o) < n(r) ? o : r, e[0]);
}
function Jf(e) {
return e.reduce((n, o) => n + o, 0);
}
function Qf(e, n) {
return e.reduce((o, r) => o + n(r), 0);
}
function r0(e) {
function n(r, t) {
for (let a = 0; a < t.length; a++) {
const i = t.charCodeAt(a);
r = (r << 5) - r + i, r |= 0;
}
return r < 0 ? r * -2 : r;
}
function o(r, t, a, i) {
return r = n(r, a), r = n(r, Xs(t)), r = n(r, typeof t), t === null ? n(r, "null") : t === void 0 ? n(r, "undefined") : ho(t) || mn(t) ? i.includes(t) ? n(r, `[Circular]${a}`) : (i.push(t), r = Object.keys(t).sort().reduce((l, s) => o(l, t[s], s, i), r), mn(t.valueOf) ? n(r, String(t.valueOf())) : r) : n(r, t.toString());
}
return o(0, e, "", []).toString(16).padStart(8, "0");
}
function t0(e) {
return Jf(e) / e.length;
}
function a0(e, n) {
return Qf(e, n) / e.length;
}
function i0(e) {
if (e.length)
return e[Ef(0, e.length - 1)];
}
function l0(e, n = 0) {
return ma(e, n, Math.round);
}
function ma(e, n = 0, o) {
return n = $n(n, -292, 292), n ? +`${o(`${e}e${n}`)}e${-n}` : o(e);
}
function dl(e, n = 0) {
return ma(e, n, Math.floor);
}
function s0(e, n = 0) {
return ma(e, n, Math.ceil);
}
function Un(e, n, o) {
return Mf(e, `Varlet [${n}]: ${o}`);
}
function u0(e, n) {
console.warn(`Varlet [${e}]: ${n}`);
}
function sr(e, n) {
console.error(`Varlet [${e}]: ${n}`);
}
var c0 = (e) => e ? /^(http)|(\.*\/)/.test(e) : !1, d0 = Object.defineProperty, qt = Object.getOwnPropertySymbols, xf = Object.prototype.hasOwnProperty, _f = Object.prototype.propertyIsEnumerable, Hu = (e, n, o) => n in e ? d0(e, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[n] = o, f0 = (e, n) => {
for (var o in n || (n = {}))
xf.call(n, o) && Hu(e, o, n[o]);
if (qt)
for (var o of qt(n))
_f.call(n, o) && Hu(e, o, n[o]);
return e;
}, p0 = (e, n) => {
var o = {};
for (var r in e)
xf.call(e, r) && n.indexOf(r) < 0 && (o[r] = e[r]);
if (e != null && qt)
for (var r of qt(e))
n.indexOf(r) < 0 && _f.call(e, r) && (o[r] = e[r]);
return o;
};
function yn(e) {
let n = !1;
yo(() => {
e(), Ye(() => {
n = !0;
});
}), Lo(() => {
n && e();
});
}
function He(e, n, o, r = {}) {
if (!oo())
return;
const { passive: t = !1, capture: a = !1 } = r;
let i = !1, l = !1;
const s = (v) => mn(v) ? v() : wf(v), u = (v) => {
if (i || l)
return;
const h = s(v);
h && (h.addEventListener(n, o, {
passive: t,
capture: a
}), i = !0);
}, c = (v) => {
if (!i || l)
return;
const h = s(v);
h && (h.removeEventListener(n, o, {
capture: a
}), i = !1);
};
let d;
Jg(e) && (d = fe(
() => e.value,
(v, h) => {
c(h), u(v);
}
));
const f = () => {
d?.(), c(e), l = !0;
};
return yn(() => {
u(e);
}), ua(() => {
c(e);
}), wr(() => {
c(e);
}), f;
}
function ep(e, n, o) {
if (!oo())
return;
He(document, n, (t) => {
const a = mn(e) ? e() : wf(e);
a && !a.contains(t.target) && o(t);
});
}
function tt(e) {
let n = !1;
wr(() => {
n = !0, e();
}), Qr(() => {
n || e();
});
}
function ou(e) {
const n = xo();
return e in n.provides;
}
function wn(e) {
if (!ou(e))
return {
index: null,
parentProvider: null,
bindParent: null
};
const o = Ys(e), { childInstances: r, collect: t, clear: a } = o, i = p0(o, ["childInstances", "collect", "clear"]), l = xo();
return {
index: B(() => r.indexOf(l)),
parentProvider: i,
bindParent: (c) => {
yo(() => {
Ye().then(() => {
t(l, c);
});
}), ua(() => {
Ye().then(() => {
a(l, c);
});
});
}
};
}
function v0(e) {
const n = [], o = (r) => {
if (r?.component) {
o(r?.component.subTree);
return;
}
Fe(r?.children) && r.children.forEach((t) => {
Qg(t) && (n.push(t), o(t));
});
};
return o(e), n;
}
function kn(e) {
const n = xo(), o = en([]), r = [], t = B(() => o.length), a = () => {
const u = v0(n.subTree);
o.sort((c, d) => u.indexOf(c.vnode) - u.indexOf(d.vnode));
}, i = (u, c) => {
o.push(u), r.push(c), a();
}, l = (u, c) => {
Io(o, u), Io(r, c);
};
return {
length: t,
childProviders: r,
bindChildren: (u) => {
Ws(e, f0({
childInstances: o,
collect: i,
clear: l
}, u));
}
};
}
function ro(e) {
He(() => window, "resize", e, { passive: !0 }), He(() => window, "orientationchange", e, { passive: !0 });
}
function m0(e, n) {
const o = w(!1);
return fe(
e,
(r) => {
n === r && (o.value = !0);
},
{ immediate: !0 }
), o;
}
function h0(e, n) {
if (e > n)
return "horizontal";
if (n > e)
return "vertical";
}
function $r() {
const e = w(0), n = w(0), o = w(0), r = w(0), t = w(0), a = w(0), i = w(0), l = w(0), s = w(0), u = w(0), c = w(), d = w(!1), f = w(!1), v = w(0), h = w(0);
let m = null;
const y = () => {
e.value = 0, n.value = 0, o.value = 0, r.value = 0, t.value = 0, a.value = 0, i.value = 0, l.value = 0, s.value = 0, u.value = 0, c.value = void 0, d.value = !1, f.value = !1, v.value = 0, h.value = 0;
};
return {
startX: e,
startY: n,
deltaX: o,
deltaY: r,
offsetX: t,
offsetY: a,
prevX: i,
prevY: l,
moveX: s,
moveY: u,
direction: c,
touching: d,
dragging: f,
startTime: v,
distance: h,
resetTouch: y,
startTouch: (O) => {
y();
const { clientX: D, clientY: M } = O.touches[0];
e.value = D, n.value = M, i.value = D, l.value = M, d.value = !0, v.value = performance.now(), f.value = !1, m && window.cancelAnimationFrame(m);
},
moveTouch: (O) => {
const { clientX: D, clientY: M } = O.touches[0];
f.value = !0, o.value = D - e.value, r.value = M - n.value, t.value = Math.abs(o.value), a.value = Math.abs(r.value), h.value = Math.sqrt(t.value ** 2 + a.value ** 2), s.value = D - i.value, u.value = M - l.value, c.value || (c.value = h0(t.value, a.value)), i.value = D, l.value = M;
},
endTouch: () => {
d.value = !1, m = window.requestAnimationFrame(() => {
f.value = !1;
});
},
isReachTop: (O) => go(O) === 0 && r.value > 0,
isReachBottom: (O, D = 1) => {
const { scrollHeight: M, clientHeight: V, scrollTop: L } = O, Y = Math.abs(M - L - V);
return r.value < 0 && Y <= D;
}
};
}
function np() {
const e = xo(), n = Qs(e.type.name), o = w(void 0);
return yo(() => {
o.value = `${n}-${e.uid}`;
}), o;
}
function g0(e = {}) {
const { initialWidth: n = 0, initialHeight: o = 0 } = e, r = w(n), t = w(o), a = () => {
oo() && (r.value = window.innerWidth, t.value = window.innerHeight);
};
return yn(a), ro(a), {
width: r,
height: t
};
}
function Pn(e, n, o = {}) {
const { passive: r = !0, eventName: t, defaultValue: a, emit: i } = o, l = t ?? `onUpdate:${n.toString()}`, s = () => {
var d;
return (d = e[n]) != null ? d : a;
};
if (!r)
return B({
get() {
return s();
},
set(d) {
i ? i(l, d) : $(e[l], d);
}
});
const u = w(s());
let c = !0;
return fe(
() => e[n],
() => {
c = !1, u.value = s(), Ye(() => {
c = !0;
});
}
), fe(
() => u.value,
(d) => {
c && (i ? i(l, d) : $(e[l], d));
}
), u;
}
function b0(e) {
const n = w(t(e.from)), o = w("pending");
let r = s();
function t(u) {
return mn(u) ? u() : u;
}
function a() {
r.reset(), n.value = t(e.from), o.value = "pending", r = s();
}
function i() {
r.start();
}
function l() {
r.pause();
}
function s() {
return nu({
from: t(e.from),
to: t(e.to),
duration: e.duration ? t(e.duration) : 300,
timingFunction: e.timingFunction,
onStateChange(u) {
o.value = u;
},
frame({ value: u, done: c }) {
var d;
n.value = u, c && ((d = e.onFinished) == null || d.call(e, n.value));
}
});
}
return {
value: n,
state: o,
start: i,
pause: l,
reset: a
};
}
var y0 = Object.defineProperty, w0 = Object.defineProperties, k0 = Object.getOwnPropertyDescriptors, ju = Object.getOwnPropertySymbols, $0 = Object.prototype.hasOwnProperty, C0 = Object.prototype.propertyIsEnumerable, Yu = (e, n, o) => n in e ? y0(e, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[n] = o, fl = (e, n) => {
for (var o in n || (n = {}))
$0.call(n, o) && Yu(e, o, n[o]);
if (ju)
for (var o of ju(n))
C0.call(n, o) && Yu(e, o, n[o]);
return e;
}, S0 = (e, n) => w0(e, k0(n)), Wu = (e, n, o) => new Promise((r, t) => {
var a = (s) => {
try {
l(o.next(s));
} catch (u) {
t(u);
}
}, i = (s) => {
try {
l(o.throw(s));
} catch (u) {
t(u);
}
}, l = (s) => s.done ? r(s.value) : Promise.resolve(s.value).then(a, i);
l((o = o.apply(e, n)).next());
});
function Ie(e, n) {
return Fe(n) ? n.reduce((o, r) => (o[r] = e[r], o), {}) : e[n];
}
function te(e, n) {
const o = n ?? e;
return o.install = function(r) {
const { name: t } = e;
t && r.component(t, e);
}, o;
}
function ie(e, n) {
e.setPropsDefaults = function(o) {
Object.entries(o).forEach(([r, t]) => {
const a = n[r];
if (a != null) {
if (Fn(a)) {
n[r] = S0(fl({}, a), {
default: t
});
return;
}
n[r] = {
type: a,
default: t
};
}
});
};
}
function P0(e) {
const n = _g(e), o = document.createElement("div");
return document.body.appendChild(o), {
instance: n.mount(o),
unmount() {
n.unmount(), o.parentNode && document.body.removeChild(o);
}
};
}
function Cr(e, n = {}, o = {}) {
const r = {
setup() {
return () => xr(e, fl(fl({}, n), o));
}
}, { unmount: t } = P0(r);
return { unmountInstance: t };
}
function ru(e) {
const n = [];
return e.forEach((o) => {
if (o.type !== xg) {
if (o.type === Ae && Fe(o.children)) {
n.push(...ru(o.children));
return;
}
n.push(o);
}
}), n;
}
function Ku(e) {
return Fn(e) && mn(e.safeParseAsync);
}
function O0(e) {
return Fn(e) && Go(e, "success");
}
function jn() {
const e = w(""), n = (t, a, i) => Wu(this, null, function* () {
const l = po(t).filter((u) => Ku(u) || mn(u)), s = yield Promise.all(
l.map((u) => Ku(u) ? u.safeParseAsync(a) : u(a, i))
);
return o(), !s.some((u) => {
if (O0(u)) {
if (u.success === !1)
return e.value = u.error.issues[0].message, !0;
} else if (u !== !0)
return e.value = String(u), !0;
return !1;
});
}), o = () => {
e.value = "";
};
return {
errorMessage: e,
validate: n,
resetValidation: o,
validateWithTrigger: (t, a, i, l, s) => Wu(this, null, function* () {
t.includes(a) && (yield n(i, l, s)) && (e.value = "");
})
};
}
function z0(e) {
He(() => window, "hashchange", e), He(() => window, "popstate", e);
}
function _o() {
const e = w(!1);
return Lo(() => {
e.value = !1;
}), wr(() => {
e.value = !0;
}), {
disabled: e
};
}
const ne = xs("var");
function F(e) {
return {
type: [Function, Array],
default: e
};
}
function dn(e, n) {
return e === !1 ? null : (e === !0 && n && (e = n), `var-elevation--${e}`);
}
const at = ee({
props: {
is: {
type: [String, Object]
},
tag: {
type: String,
default: "span"
}
},
setup(e) {
return () => sn(e.is) ? xr(e.tag, e.is) : e.is;
}
});
var op = {
// Dialog
dialogTitle: "Hint",
dialogConfirmButtonText: "Confirm",
dialogCancelButtonText: "Cancel",
// ActionSheet
actionSheetTitle: "Select One",
// List
listLoadingText: "Loading",
listFinishedText: "No more",
listErrorText: "Load fail",
// Picker
pickerTitle: "Pick it",
pickerConfirmButtonText: "Confirm",
pickerCancelButtonText: "Cancel",
// date-picker
datePickerMonthDict: {
"01": {
name: "January",
abbr: "JAN"
},
"02": {
name: "February",
abbr: "FEB"
},
"03": {
name: "March",
abbr: "MAR"
},
"04": {
name: "April",
abbr: "APR"
},
"05": {
name: "May",
abbr: "MAY"
},
"06": {
name: "June",
abbr: "JUN"
},
"07": {
name: "July",
abbr: "JUL"
},
"08": {
name: "August",
abbr: "AUG"
},
"09": {
name: "September",
abbr: "SEP"
},
10: {
name: "October",
abbr: "OCT"
},
11: {
name: "November",
abbr: "NOV"
},
12: {
name: "December",
abbr: "DEC"
}
},
datePickerWeekDict: {
0: {
name: "Sunday",
abbr: "S"
},
1: {
name: "Monday",
abbr: "M"
},
2: {
name: "Tuesday",
abbr: "T"
},
3: {
name: "Wednesday",
abbr: "W"
},
4: {
name: "Thursday",
abbr: "T"
},
5: {
name: "Friday",
abbr: "F"
},
6: {
name: "Saturday",
abbr: "S"
}
},
datePickerSelected: " selected",
datePickerHint: "SELECT DATE",
// pagination
paginationItem: "",
paginationPage: "page",
paginationJump: "Go to",
// time-picker
timePickerHint: "SELECT TIME"
}, rp = {
// Dialog
dialogTitle: "اشاره",
dialogConfirmButtonText: "تایید",
dialogCancelButtonText: "لغو",
// ActionSheet
actionSheetTitle: "انتخاب یک مورد",
// List
listLoadingText: "در حال بارگزاری",
listFinishedText: "مورد دیگری وجود ندارد",
listErrorText: "بارگزاری ناموفق",
// Picker
pickerTitle: "انتخاب کنید",
pickerConfirmButtonText: "تایید",
pickerCancelButtonText: "لغو",
// date-picker
datePickerMonthDict: {
"01": {
name: "ژانویه",
abbr: "JAN"
},
"02": {
name: "فوریه",
abbr: "FEB"
},
"03": {
name: "مارس",
abbr: "MAR"
},
"04": {
name: "آوریل",
abbr: "APR"
},
"05": {
name: "مه",
abbr: "MAY"
},
"06": {
name: "ژوئن",
abbr: "JUN"
},
"07": {
name: "جولای",
abbr: "JUL"
},
"08": {
name: "آگوست",
abbr: "AUG"
},
"09": {
name: "سپتامبر",
abbr: "SEP"
},
10: {
name: "اوکتبر",
abbr: "OCT"
},
11: {
name: "نوامبر",
abbr: "NOV"
},
12: {
name: "دسامبر",
abbr: "DEC"
}
},
datePickerWeekDict: {
0: {
name: "یکشنبه",
abbr: "S"
},
1: {
name: "دوشنبه",
abbr: "M"
},
2: {
name: "سهشنبه",
abbr: "T"
},
3: {
name: "چهارشنبه",
abbr: "W"
},
4: {
name: "پنجشنبه",
abbr: "T"
},
5: {
name: "جمعه",
abbr: "F"
},
6: {
name: "شنبه",
abbr: "S"
}
},
datePickerSelected: " انتخاب شده",
datePickerHint: "انتخاب تاریخ",
// pagination
paginationItem: "",
paginationPage: "صفحه",
paginationJump: "برو به",
// time-picker
timePickerHint: "انتخاب زمان"
}, tp = {
// Dialog
dialogTitle: "確認",
dialogConfirmButtonText: "確認",
dialogCancelButtonText: "キャンセル",
// ActionSheet
actionSheetTitle: "いずれかを選択",
// List
listLoadingText: "読み込み中",
listFinishedText: "以上です",
listErrorText: "読み込み失敗",
// Picker
pickerTitle: "選択してください",
pickerConfirmButtonText: "確認",
pickerCancelButtonText: "キャンセル",
// date-picker
datePickerMonthDict: {
"01": {
name: "1月",
abbr: "1月"
},
"02": {
name: "2月",
abbr: "2月"
},
"03": {
name: "3月",
abbr: "3月"
},
"04": {
name: "4月",
abbr: "4月"
},
"05": {
name: "5月",
abbr: "5月"
},
"06": {
name: "6月",
abbr: "6月"
},
"07": {
name: "7月",
abbr: "7月"
},
"08": {
name: "8月",
abbr: "8月"
},
"09": {
name: "9月",
abbr: "9月"
},
10: {
name: "10月",
abbr: "10月"
},
11: {
name: "11月",
abbr: "11月"
},
12: {
name: "12月",
abbr: "12月"
}
},
datePickerWeekDict: {
0: {
name: "日曜日",
abbr: "日"
},
1: {
name: "月曜日",
abbr: "月"
},
2: {
name: "火曜日",
abbr: "火"
},
3: {
name: "水曜日",
abbr: "水"
},
4: {
name: "木曜日",
abbr: "木"
},
5: {
name: "金曜日",
abbr: "金"
},
6: {
name: "土曜日",
abbr: "土"
}
},
datePickerSelected: "件選択済み",
datePickerHint: "日付を選択",
// pagination
paginationItem: "件",
paginationPage: "ページ",
paginationJump: "ジャンプ",
// time-picker
timePickerHint: "時間を選択"
}, tu = {
// Dialog
dialogTitle: "提示",
dialogConfirmButtonText: "确认",
dialogCancelButtonText: "取消",
// ActionSheet
actionSheetTitle: "请选择",
// List
listLoadingText: "加载中",
listFinishedText: "没有更多了",
listErrorText: "加载失败",
// Picker
pickerTitle: "请选择",
pickerConfirmButtonText: "确认",
pickerCancelButtonText: "取消",
// date-picker
datePickerMonthDict: {
"01": {
name: "一月",
abbr: "一月"
},
"02": {
name: "二月",
abbr: "二月"
},
"03": {
name: "三月",
abbr: "三月"
},
"04": {
name: "四月",
abbr: "四月"
},
"05": {
name: "五月",
abbr: "五月"
},
"06": {
name: "六月",
abbr: "六月"
},
"07": {
name: "七月",
abbr: "七月"
},
"08": {
name: "八月",
abbr: "八月"
},
"09": {
name: "九月",
abbr: "九月"
},
10: {
name: "十月",
abbr: "十月"
},
11: {
name: "十一月",
abbr: "十一月"
},
12: {
name: "十二月",
abbr: "十二月"
}
},
datePickerWeekDict: {
0: {
name: "星期日",
abbr: "日"
},
1: {
name: "星期一",
abbr: "一"
},
2: {
name: "星期二",
abbr: "二"
},
3: {
name: "星期三",
abbr: "三"
},
4: {
name: "星期四",
abbr: "四"
},
5: {
name: "星期五",
abbr: "五"
},
6: {
name: "星期六",
abbr: "六"
}
},
datePickerSelected: "个被选择",
datePickerHint: "选择日期",
// pagination
paginationItem: "条",
paginationPage: "页",
paginationJump: "前往",
// time-picker
timePickerHint: "选择时间"
}, au = {
// Dialog
dialogTitle: "提示",
dialogConfirmButtonText: "確認",
dialogCancelButtonText: "取消",
// ActionSheet
actionSheetTitle: "請選擇",
// List
listLoadingText: "載入中",
listFinishedText: "沒有更多了",
listErrorText: "載入失敗",
// Picker
pickerTitle: "請選擇",
pickerConfirmButtonText: "確認",
pickerCancelButtonText: "取消",
// date-picker
datePickerMonthDict: {
"01": {
name: "一月",
abbr: "一月"
},
"02": {
name: "二月",
abbr: "二月"
},
"03": {
name: "三月",
abbr: "三月"
},
"04": {
name: "四月",
abbr: "四月"
},
"05": {
name: "五月",
abbr: "五月"
},
"06": {
name: "六月",
abbr: "六月"
},
"07": {
name: "七月",
abbr: "七月"
},
"08": {
name: "八月",
abbr: "八月"
},
"09": {
name: "九月",
abbr: "九月"
},
10: {
name: "十月",
abbr: "十月"
},
11: {
name: "十一月",
abbr: "十一月"
},
12: {
name: "十二月",
abbr: "十二月"
}
},
datePickerWeekDict: {
0: {
name: "星期日",
abbr: "日"
},
1: {
name: "星期一",
abbr: "一"
},
2: {
name: "星期二",
abbr: "二"
},
3: {
name: "星期三",
abbr: "三"
},
4: {
name: "星期四",
abbr: "四"
},
5: {
name: "星期五",
abbr: "五"
},
6: {
name: "星期六",
abbr: "六"
}
},
datePickerSelected: "個被選擇",
datePickerHint: "選擇日期",
// pagination
paginationItem: "條",
paginationPage: "頁",
paginationJump: "前往",
// time-picker
timePickerHint: "選擇時間"
}, ap = au, E0 = Object.defineProperty, qu = Object.getOwnPropertySymbols, T0 = Object.prototype.hasOwnProperty, B0 = Object.prototype.propertyIsEnumerable, Xu = (e, n, o) => n in e ? E0(e, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[n] = o, Gu = (e, n) => {
for (var o in n || (n = {}))
T0.call(n, o) && Xu(e, o, n[o]);
if (qu)
for (var o of qu(n))
B0.call(n, o) && Xu(e, o, n[o]);
return e;
};
function iu() {
const e = w({}), n = w({}), o = (i, l) => {
l.lang = i, e.value[i] = l;
}, r = (i) => {
if (!e.value[i])
return console.warn(`The ${i} does not exist. You can mount a language message using the add method`), {};
n.value = e.value[i];
};
return {
messages: e,
currentMessage: n,
add: o,
use: r,
merge: (i, l) => {
if (!e.value[i]) {
console.warn(`The ${i} does not exist. You can mount a language message using the add method`);
return;
}
e.value[i] = Gu(Gu({}, e.value[i]), l), r(i);
},
t: (i) => {
if (Go(n.value, i))
return n.value[i];
}
};
}
const { messages: ip, currentMessage: lp, add: lu, use: su, merge: sp, t: an } = iu();
lu("zh-CN", tu);
su("zh-CN");
const $B = {
zhCN: tu,
enUS: op,
zhTW: au,
zhHK: ap,
faIR: rp,
jaJP: tp,
messages: ip,
currentMessage: lp,
add: lu,
use: su,
merge: sp,
t: an,
useLocale: iu
};
var pl = {
zhCN: tu,
enUS: op,
zhTW: au,
zhHK: ap,
faIR: rp,
jaJP: tp,
messages: ip,
currentMessage: lp,
add: lu,
use: su,
merge: sp,
t: an,
useLocale: iu
};
const vl = Symbol("LOCALE_PROVIDER_KEY");
function D0(e) {
Ws(vl, e);
}
function so() {
return ou(vl) ? Ys(vl) : { t: null };
}
const up = {
locks: {},
zIndex: 2e3,
enableRipple: !0
}, CB = en(up);
var Rn = en(up);
const { n: Zu } = ne("");
function cp() {
Object.keys(Rn.locks).length <= 0 ? document.body.classList.remove(Zu("$--lock")) : document.body.classList.add(Zu("$--lock"));
}
function mt(e) {
Rn.locks[e] = 1, cp();
}
function ht(e) {
delete Rn.locks[e], cp();
}
function it(e, n) {
const { uid: o } = xo();
n && fe(n, (r) => {
r === !1 ? ht(o) : r === !0 && e() === !0 && mt(o);
}), fe(e, (r) => {
n && n() === !1 || (r === !0 ? mt(o) : ht(o));
}), eb(() => {
n && n() === !1 || e() === !0 && mt(o);
}), Qr(() => {
n && n() === !1 || e() === !0 && ht(o);
}), Lo(() => {
n && n() === !1 || e() === !0 && mt(o);
}), wr(() => {
n && n() === !1 || e() === !0 && ht(o);
});
}
const wo = [];
function uu(e, n) {
const { uid: o } = xo();
fe(e, (i) => {
i && !a(o) ? t() : setTimeout(() => {
Io(wo, a(o));
});
}), yn(() => {
e() && t();
}), tt(() => {
Io(wo, a(o));
});
function r() {
return wo.length === 0 ? !0 : (wo.sort((i, l) => i.zIndex.value - l.zIndex.value), wo[wo.length - 1].uid === o);
}
function t() {
a(o) || wo.push({ uid: o, zIndex: n });
}
function a(i) {
return wo.find((l) => l.uid === i);
}
return {
onStackTop: r
};
}
function lt(e, n) {
const o = w(Rn.zIndex);
return fe(
e,
(r) => {
r && (Rn.zIndex += n, o.value = Rn.zIndex);
},
{ immediate: !0 }
), { zIndex: o };
}
const Sr = {
show: Boolean,
position: {
type: String,
default: "center"
},
transition: String,
overlay: {
type: Boolean,
default: !0
},
overlayClass: String,
overlayStyle: Object,
lockScroll: {
type: Boolean,
default: !0
},
closeOnClickOverlay: {
type: Boolean,
default: !0
},
closeOnKeyEscape: {
type: Boolean,
default: !0
},
defaultStyle: {
type: Boolean,
default: !0
},
zIndex: Number,
safeArea: Boolean,
safeAreaTop: Boolean,
teleport: {
type: [String, Object, Boolean],
default: "body"
},
onOpen: F(),
onOpened: F(),
onClose: F(),
onClosed: F(),
onKeyEscape: F(),
onClickOverlay: F(),
"onUpdate:show": F(),
// internal for Dialog
onRouteChange: F()
}, dp = Symbol("POPUP_BIND_POPUP_ITEM_KEY");
function fp() {
const { bindParent: e, parentProvider: n, index: o } = wn(dp);
return {
index: o,
popup: n,
bindPopup: e
};
}
function I0() {
const { bindChildren: e, childProviders: n, length: o } = kn(dp);
return {
length: o,
popupItems: n,
bindPopupItems: e
};
}
var A0 = Object.defineProperty, Ju = Object.getOwnPropertySymbols, M0 = Object.prototype.hasOwnProperty, N0 = Object.prototype.propertyIsEnumerable, Qu = (e, n, o) => n in e ? A0(e, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[n] = o, V0 = (e, n) => {
for (var o in n || (n = {}))
M0.call(n, o) && Qu(e, o, n[o]);
if (Ju)
for (var o of Ju(n))
N0.call(n, o) && Qu(e, o, n[o]);
return e;
};
const {
name: R0,
n: Wn,
classes: el
} = ne("popup");
var ha = ee({
name: R0,
inheritAttrs: !1,
props: Sr,
setup(e, {
slots: n,
attrs: o
}) {
const r = m0(() => e.show, !0), {
zIndex: t
} = lt(() => e.show, 3), a = B(() => {
var h;
return (h = e.zIndex) != null ? h : t.value;
}), {
onStackTop: i
} = uu(() => e.show, a), {
disabled: l
} = _o(), {
bindPopupItems: s
} = I0();
it(() => e.show, () => e.lockScroll), fe(() => e.show, (h) => {
$(h ? e.onOpen : e.onClose);
}), s({
show: B(() => e.show)
}), He(() => window, "keydown", v), z0(() => $(e.onRouteChange));
function u() {
const {
closeOnClickOverlay: h,
onClickOverlay: m
} = e;
$(m), h && $(e["onUpdate:show"], !1);
}
function c() {
const {
overlayClass: h = "",
overlayStyle: m
} = e;
return X("div", {
class: el(Wn("overlay"), h),
style: V0({
zIndex: a.value - 1
}, m),
onClick: u
}, null);
}
function d() {
return Ne(X("div", je({
class: el(Wn("content"), Wn(`--${e.position}`), [e.defaultStyle, Wn("--content-background-color")], [e.defaultStyle, Wn("$-elevation--3")], [e.safeArea, Wn("--safe-area")], [e.safeAreaTop, Wn("--safe-area-top")]),
style: {
zIndex: a.value
},
role: "dialog",
"aria-modal": "true"
}, o), [r.value && $(n.default)]), [[eo, e.show]]);
}
function f() {
return X(_e, {
name: Wn("$-fade"),
onAfterEnter: e.onOpened,
onAfterLeave: e.onClosed
}, {
default: () => [Ne(X("div", {
class: el(Wn("$--box"), Wn(), [!e.overlay, Wn("--pointer-events-none")]),
style: {
zIndex: a.value - 2
}
}, [e.overlay && c(), X(_e, {
name: e.transition || Wn(`$-pop-${e.position}`)
}, {
default: () => [d()]
})]), [[eo, e.show]])]
});
}
function v(h) {
!i() || h.key !== "Escape" || !e.show || ($(e.onKeyEscape),